@ai-zen/agents-sdk 0.2.0-alpha.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 +21 -0
- package/README.md +100 -0
- package/dist/capabilities/Capabilities.d.ts +71 -0
- package/dist/capabilities/Capabilities.js +161 -0
- package/dist/capabilities/PermissionEvaluator.d.ts +19 -0
- package/dist/capabilities/PermissionEvaluator.js +50 -0
- package/dist/capabilities/disclosure.d.ts +10 -0
- package/dist/capabilities/disclosure.js +17 -0
- package/dist/capabilities/discovery/builtin.d.ts +8 -0
- package/dist/capabilities/discovery/builtin.js +17 -0
- package/dist/capabilities/discovery/mcp.d.ts +7 -0
- package/dist/capabilities/discovery/mcp.js +29 -0
- package/dist/capabilities/discovery/skills.d.ts +43 -0
- package/dist/capabilities/discovery/skills.js +175 -0
- package/dist/capabilities/discovery/subagents.d.ts +7 -0
- package/dist/capabilities/discovery/subagents.js +39 -0
- package/dist/capabilities/discovery/usertools.d.ts +13 -0
- package/dist/capabilities/discovery/usertools.js +136 -0
- package/dist/capabilities/implements/builtin/batchEdit.d.ts +2 -0
- package/dist/capabilities/implements/builtin/batchEdit.js +76 -0
- package/dist/capabilities/implements/builtin/copy.d.ts +2 -0
- package/dist/capabilities/implements/builtin/copy.js +38 -0
- package/dist/capabilities/implements/builtin/cwd.d.ts +2 -0
- package/dist/capabilities/implements/builtin/cwd.js +15 -0
- package/dist/capabilities/implements/builtin/downloadFile.d.ts +2 -0
- package/dist/capabilities/implements/builtin/downloadFile.js +70 -0
- package/dist/capabilities/implements/builtin/edit.d.ts +2 -0
- package/dist/capabilities/implements/builtin/edit.js +79 -0
- package/dist/capabilities/implements/builtin/exec.d.ts +2 -0
- package/dist/capabilities/implements/builtin/exec.js +31 -0
- package/dist/capabilities/implements/builtin/exist.d.ts +2 -0
- package/dist/capabilities/implements/builtin/exist.js +25 -0
- package/dist/capabilities/implements/builtin/findText.d.ts +2 -0
- package/dist/capabilities/implements/builtin/findText.js +86 -0
- package/dist/capabilities/implements/builtin/generateImage.d.ts +9 -0
- package/dist/capabilities/implements/builtin/generateImage.js +112 -0
- package/dist/capabilities/implements/builtin/glob.d.ts +2 -0
- package/dist/capabilities/implements/builtin/glob.js +45 -0
- package/dist/capabilities/implements/builtin/index.d.ts +19 -0
- package/dist/capabilities/implements/builtin/index.js +34 -0
- package/dist/capabilities/implements/builtin/ls.d.ts +2 -0
- package/dist/capabilities/implements/builtin/ls.js +28 -0
- package/dist/capabilities/implements/builtin/mkdir.d.ts +2 -0
- package/dist/capabilities/implements/builtin/mkdir.js +34 -0
- package/dist/capabilities/implements/builtin/readFile.d.ts +2 -0
- package/dist/capabilities/implements/builtin/readFile.js +31 -0
- package/dist/capabilities/implements/builtin/rename.d.ts +2 -0
- package/dist/capabilities/implements/builtin/rename.js +32 -0
- package/dist/capabilities/implements/builtin/rm.d.ts +2 -0
- package/dist/capabilities/implements/builtin/rm.js +34 -0
- package/dist/capabilities/implements/builtin/writeFile.d.ts +2 -0
- package/dist/capabilities/implements/builtin/writeFile.js +34 -0
- package/dist/capabilities/implements/mcpTools.d.ts +20 -0
- package/dist/capabilities/implements/mcpTools.js +147 -0
- package/dist/capabilities/implements/skillTools.d.ts +15 -0
- package/dist/capabilities/implements/skillTools.js +113 -0
- package/dist/capabilities/implements/subAgentTools.d.ts +11 -0
- package/dist/capabilities/implements/subAgentTools.js +53 -0
- package/dist/config/ConfigManager.d.ts +49 -0
- package/dist/config/ConfigManager.js +126 -0
- package/dist/config/constants.d.ts +20 -0
- package/dist/config/constants.js +185 -0
- package/dist/crud/AgentRepository.d.ts +9 -0
- package/dist/crud/AgentRepository.js +10 -0
- package/dist/crud/ConversationRepository.d.ts +9 -0
- package/dist/crud/ConversationRepository.js +10 -0
- package/dist/crud/DraftRepository.d.ts +15 -0
- package/dist/crud/DraftRepository.js +41 -0
- package/dist/index.d.ts +40 -0
- package/dist/index.js +37 -0
- package/dist/plugin/AutoDraftPlugin.d.ts +26 -0
- package/dist/plugin/AutoDraftPlugin.js +58 -0
- package/dist/plugin/AutoMigratePlugin.d.ts +25 -0
- package/dist/plugin/AutoMigratePlugin.js +74 -0
- package/dist/plugin/AutoRefreshToolsPlugin.d.ts +12 -0
- package/dist/plugin/AutoRefreshToolsPlugin.js +23 -0
- package/dist/runtime/McpConnectionManager.d.ts +42 -0
- package/dist/runtime/McpConnectionManager.js +238 -0
- package/dist/runtime/Provider.d.ts +44 -0
- package/dist/runtime/Provider.js +38 -0
- package/dist/runtime/SdkAgent.d.ts +100 -0
- package/dist/runtime/SdkAgent.js +103 -0
- package/dist/runtime/TaskMigrationService.d.ts +24 -0
- package/dist/runtime/TaskMigrationService.js +71 -0
- package/dist/runtime/createAgent.d.ts +14 -0
- package/dist/runtime/createAgent.js +41 -0
- package/dist/runtime/createModel.d.ts +11 -0
- package/dist/runtime/createModel.js +28 -0
- package/dist/shared/EntityRepository.d.ts +24 -0
- package/dist/shared/EntityRepository.js +62 -0
- package/dist/shared/errors.d.ts +8 -0
- package/dist/shared/errors.js +15 -0
- package/dist/shared/logger.d.ts +10 -0
- package/dist/shared/logger.js +10 -0
- package/dist/types/index.d.ts +178 -0
- package/dist/types/index.js +5 -0
- package/package.json +47 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { OpenAI, ChatGPT } from "@ai-zen/agents-core";
|
|
2
|
+
/**
|
|
3
|
+
* 模型工厂 — 根据 modelId 和 config 构建 Core ChatCompletionModel。
|
|
4
|
+
*
|
|
5
|
+
* 属于独立的 runtime 子层,不依赖 capabilities/ 或其他模块。
|
|
6
|
+
* 通过 Provider 实例获取 AppConfig 后调用。
|
|
7
|
+
*
|
|
8
|
+
* 改为同步版本,使用 endpoint.chatCompletionSync() 避免不必要的 async。
|
|
9
|
+
*/
|
|
10
|
+
export function createModel(config, modelId) {
|
|
11
|
+
const modelConfig = config.models.find((m) => m.id === modelId);
|
|
12
|
+
if (!modelConfig)
|
|
13
|
+
throw new Error(`模型 "${modelId}" 不存在`);
|
|
14
|
+
const endpointConfig = config.endpoints.find((e) => e.id === modelConfig.endpointId);
|
|
15
|
+
if (!endpointConfig)
|
|
16
|
+
throw new Error(`端点 "${modelConfig.endpointId}" 未配置`);
|
|
17
|
+
const endpoint = new OpenAI({
|
|
18
|
+
openai_endpoint: endpointConfig.baseUrl,
|
|
19
|
+
api_key: endpointConfig.apiKey,
|
|
20
|
+
});
|
|
21
|
+
// 发送给 API 的模型名:modelName > id
|
|
22
|
+
const apiModelName = modelConfig.modelName || modelConfig.id;
|
|
23
|
+
const model = new ChatGPT({
|
|
24
|
+
model_config: modelConfig.defaultParams,
|
|
25
|
+
request_config: endpoint.chatCompletionSync(apiModelName),
|
|
26
|
+
});
|
|
27
|
+
return model;
|
|
28
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 通用实体仓储 — 对磁盘 JSON 文件的 CRUD 操作。
|
|
3
|
+
*
|
|
4
|
+
* 约定:
|
|
5
|
+
* - 每个实体一个 JSON 文件,文件名 = `${id}.json`
|
|
6
|
+
* - 目录不存在时自动创建
|
|
7
|
+
* - 解析失败的文件会被跳过(list 时)
|
|
8
|
+
*/
|
|
9
|
+
export declare class EntityRepository<T extends {
|
|
10
|
+
id: string;
|
|
11
|
+
}> {
|
|
12
|
+
private dir;
|
|
13
|
+
constructor(dir: string);
|
|
14
|
+
/** 获取实体的文件路径 */
|
|
15
|
+
protected path(id: string): string;
|
|
16
|
+
/** 列出目录下所有实体(跳过解析失败的文件) */
|
|
17
|
+
list(): T[];
|
|
18
|
+
/** 读取单个实体,不存在返回 null */
|
|
19
|
+
read(id: string): T | null;
|
|
20
|
+
/** 写入实体(创建或更新) */
|
|
21
|
+
write(entity: T): void;
|
|
22
|
+
/** 删除实体,不存在时不抛异常 */
|
|
23
|
+
delete(id: string): void;
|
|
24
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { readFileSync, writeFileSync, existsSync, unlinkSync, readdirSync, mkdirSync } from "node:fs";
|
|
2
|
+
import { join } from "node:path";
|
|
3
|
+
/**
|
|
4
|
+
* 通用实体仓储 — 对磁盘 JSON 文件的 CRUD 操作。
|
|
5
|
+
*
|
|
6
|
+
* 约定:
|
|
7
|
+
* - 每个实体一个 JSON 文件,文件名 = `${id}.json`
|
|
8
|
+
* - 目录不存在时自动创建
|
|
9
|
+
* - 解析失败的文件会被跳过(list 时)
|
|
10
|
+
*/
|
|
11
|
+
export class EntityRepository {
|
|
12
|
+
dir;
|
|
13
|
+
constructor(dir) {
|
|
14
|
+
this.dir = dir;
|
|
15
|
+
}
|
|
16
|
+
/** 获取实体的文件路径 */
|
|
17
|
+
path(id) {
|
|
18
|
+
return join(this.dir, `${id}.json`);
|
|
19
|
+
}
|
|
20
|
+
/** 列出目录下所有实体(跳过解析失败的文件) */
|
|
21
|
+
list() {
|
|
22
|
+
if (!existsSync(this.dir))
|
|
23
|
+
return [];
|
|
24
|
+
const ids = readdirSync(this.dir)
|
|
25
|
+
.filter((f) => f.endsWith(".json"))
|
|
26
|
+
.map((f) => f.replace(/\.json$/, ""));
|
|
27
|
+
const entities = [];
|
|
28
|
+
for (const id of ids) {
|
|
29
|
+
const entity = this.read(id);
|
|
30
|
+
if (entity)
|
|
31
|
+
entities.push(entity);
|
|
32
|
+
}
|
|
33
|
+
return entities;
|
|
34
|
+
}
|
|
35
|
+
/** 读取单个实体,不存在返回 null */
|
|
36
|
+
read(id) {
|
|
37
|
+
const p = this.path(id);
|
|
38
|
+
if (!existsSync(p))
|
|
39
|
+
return null;
|
|
40
|
+
try {
|
|
41
|
+
const raw = readFileSync(p, "utf-8");
|
|
42
|
+
return JSON.parse(raw);
|
|
43
|
+
}
|
|
44
|
+
catch {
|
|
45
|
+
return null;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
/** 写入实体(创建或更新) */
|
|
49
|
+
write(entity) {
|
|
50
|
+
if (!existsSync(this.dir)) {
|
|
51
|
+
mkdirSync(this.dir, { recursive: true });
|
|
52
|
+
}
|
|
53
|
+
writeFileSync(this.path(entity.id), JSON.stringify(entity, null, 2), "utf-8");
|
|
54
|
+
}
|
|
55
|
+
/** 删除实体,不存在时不抛异常 */
|
|
56
|
+
delete(id) {
|
|
57
|
+
const p = this.path(id);
|
|
58
|
+
if (existsSync(p)) {
|
|
59
|
+
unlinkSync(p);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SDK 统一错误模型。
|
|
3
|
+
* code 为机器可读错误码(如 "CONFIG_READ_FAILED"),message 为人可读描述。
|
|
4
|
+
*/
|
|
5
|
+
export class SdkError extends Error {
|
|
6
|
+
code;
|
|
7
|
+
constructor(code, message, cause) {
|
|
8
|
+
super(message);
|
|
9
|
+
this.name = "SdkError";
|
|
10
|
+
this.code = code;
|
|
11
|
+
if (cause) {
|
|
12
|
+
this.cause = cause;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export interface LogFunctions {
|
|
2
|
+
info: (message: string) => void;
|
|
3
|
+
warn: (message: string) => void;
|
|
4
|
+
error: (message: string) => void;
|
|
5
|
+
}
|
|
6
|
+
export type Logger = LogFunctions;
|
|
7
|
+
/**
|
|
8
|
+
* 创建可注入的 Logger,默认使用 console。
|
|
9
|
+
*/
|
|
10
|
+
export declare function createLogger(log?: Partial<LogFunctions>): Logger;
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
import type { AgentNS } from "@ai-zen/agents-core";
|
|
2
|
+
/** 单维度权限策略:allow 或 deny 互斥 */
|
|
3
|
+
export type PermissionPolicy = {
|
|
4
|
+
allow: string[];
|
|
5
|
+
} | {
|
|
6
|
+
deny: string[];
|
|
7
|
+
};
|
|
8
|
+
/** Agent 四维度权限 */
|
|
9
|
+
export interface AgentPermissions {
|
|
10
|
+
tools?: PermissionPolicy;
|
|
11
|
+
skills?: PermissionPolicy;
|
|
12
|
+
mcps?: PermissionPolicy;
|
|
13
|
+
subagents?: PermissionPolicy;
|
|
14
|
+
}
|
|
15
|
+
/** API 端点 */
|
|
16
|
+
export interface Endpoint {
|
|
17
|
+
id: string;
|
|
18
|
+
name: string;
|
|
19
|
+
baseUrl: string;
|
|
20
|
+
apiKey: string;
|
|
21
|
+
description?: string;
|
|
22
|
+
}
|
|
23
|
+
/** 模型配置,绑定一个 Endpoint */
|
|
24
|
+
export interface Model {
|
|
25
|
+
id: string;
|
|
26
|
+
name: string;
|
|
27
|
+
endpointId: string;
|
|
28
|
+
modelName?: string;
|
|
29
|
+
maxContextTokens: number;
|
|
30
|
+
maxContextChars?: number;
|
|
31
|
+
defaultParams?: Record<string, unknown>;
|
|
32
|
+
description?: string;
|
|
33
|
+
version?: number;
|
|
34
|
+
}
|
|
35
|
+
/** Agent 定义,有 function 字段时为 SubAgent */
|
|
36
|
+
export interface AgentDefinition {
|
|
37
|
+
id: string;
|
|
38
|
+
name: string;
|
|
39
|
+
description?: string;
|
|
40
|
+
messages: AgentNS.Message[];
|
|
41
|
+
modelId?: string;
|
|
42
|
+
permissions?: AgentPermissions;
|
|
43
|
+
function?: AgentNS.FunctionDefine;
|
|
44
|
+
createdAt: string;
|
|
45
|
+
updatedAt: string;
|
|
46
|
+
version?: number;
|
|
47
|
+
}
|
|
48
|
+
/** 对话记录 */
|
|
49
|
+
export interface Conversation {
|
|
50
|
+
id: string;
|
|
51
|
+
agentId: string;
|
|
52
|
+
modelId: string;
|
|
53
|
+
messages: AgentNS.Message[];
|
|
54
|
+
lastPromptTokens?: number;
|
|
55
|
+
cwd?: string;
|
|
56
|
+
createdAt: string;
|
|
57
|
+
updatedAt: string;
|
|
58
|
+
}
|
|
59
|
+
/** 当前会话草稿 */
|
|
60
|
+
export interface Draft {
|
|
61
|
+
conversationId?: string;
|
|
62
|
+
agentId: string;
|
|
63
|
+
modelId: string;
|
|
64
|
+
messages: AgentNS.Message[];
|
|
65
|
+
cwd?: string;
|
|
66
|
+
updatedAt: string;
|
|
67
|
+
}
|
|
68
|
+
/** 图片生成模型配置 */
|
|
69
|
+
export interface ImageModel {
|
|
70
|
+
id: string;
|
|
71
|
+
name: string;
|
|
72
|
+
endpointId: string;
|
|
73
|
+
modelName: string;
|
|
74
|
+
description?: string;
|
|
75
|
+
defaultSize?: string;
|
|
76
|
+
defaultQuality?: string;
|
|
77
|
+
version?: number;
|
|
78
|
+
}
|
|
79
|
+
/** config.json 结构 */
|
|
80
|
+
export interface AppConfig {
|
|
81
|
+
defaultModel?: string;
|
|
82
|
+
endpoints: Endpoint[];
|
|
83
|
+
models: Model[];
|
|
84
|
+
/** 图片生成模型列表 */
|
|
85
|
+
imageModels?: ImageModel[];
|
|
86
|
+
/** 默认图片生成模型 ID */
|
|
87
|
+
defaultImageModel?: string;
|
|
88
|
+
/** 默认 Agent ID(CLI/Desktop 使用) */
|
|
89
|
+
defaultAgent?: string;
|
|
90
|
+
/** 默认迁移模型 ID */
|
|
91
|
+
defaultMigrationModel?: string;
|
|
92
|
+
}
|
|
93
|
+
/** MCP 连接状态 */
|
|
94
|
+
export type McpConnectionState = "disconnected" | "connecting" | "connected" | "error";
|
|
95
|
+
/** MCP 服务器配置(含 CLI/Desktop 需要的额外字段) */
|
|
96
|
+
export interface McpServerConfig {
|
|
97
|
+
id: string;
|
|
98
|
+
name: string;
|
|
99
|
+
transport: "stdio" | "http" | "sse";
|
|
100
|
+
/** 是否启用 */
|
|
101
|
+
enabled?: boolean;
|
|
102
|
+
command?: string;
|
|
103
|
+
args?: string[];
|
|
104
|
+
env?: Record<string, string>;
|
|
105
|
+
url?: string;
|
|
106
|
+
headers?: Record<string, string>;
|
|
107
|
+
oauth?: {
|
|
108
|
+
authorizationUrl: string;
|
|
109
|
+
tokenUrl: string;
|
|
110
|
+
clientId: string;
|
|
111
|
+
clientSecret?: string;
|
|
112
|
+
scope?: string;
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* MCP 底层传输适配器(已废弃)。
|
|
117
|
+
*
|
|
118
|
+
* 现在由 @modelcontextprotocol/sdk 内置的 StdioClientTransport 和
|
|
119
|
+
* StreamableHTTPClientTransport 实现,不再需要外部注入。
|
|
120
|
+
*
|
|
121
|
+
* McpConnectionManager 内部使用官方 SDK 的 Transport 接口,
|
|
122
|
+
* 上层无需关心 transport 实现细节。
|
|
123
|
+
*
|
|
124
|
+
* @deprecated 改用 @modelcontextprotocol/sdk 的 Transport
|
|
125
|
+
*/
|
|
126
|
+
/** 图标(MCP 规范 §Icons) */
|
|
127
|
+
export interface McpIcon {
|
|
128
|
+
src: string;
|
|
129
|
+
mimeType?: string;
|
|
130
|
+
sizes?: string[];
|
|
131
|
+
theme?: "light" | "dark";
|
|
132
|
+
}
|
|
133
|
+
/** 注解(MCP 规范 §Annotations) */
|
|
134
|
+
export interface McpAnnotations {
|
|
135
|
+
audience?: ("user" | "assistant")[];
|
|
136
|
+
priority?: number;
|
|
137
|
+
lastModified?: string;
|
|
138
|
+
}
|
|
139
|
+
/** load_mcp 成功后返回的工具/资源/提示清单 */
|
|
140
|
+
export interface McpServerManifest {
|
|
141
|
+
tools: McpToolDef[];
|
|
142
|
+
resources: McpResourceDef[];
|
|
143
|
+
prompts?: McpPromptDef[];
|
|
144
|
+
}
|
|
145
|
+
/** 工具定义(MCP 规范 §Tools) */
|
|
146
|
+
export interface McpToolDef {
|
|
147
|
+
name: string;
|
|
148
|
+
title?: string;
|
|
149
|
+
description: string;
|
|
150
|
+
icons?: McpIcon[];
|
|
151
|
+
inputSchema: Record<string, unknown>;
|
|
152
|
+
outputSchema?: Record<string, unknown>;
|
|
153
|
+
annotations?: McpAnnotations;
|
|
154
|
+
execution?: {
|
|
155
|
+
taskSupport?: "forbidden" | "optional" | "required";
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
/** 资源定义(MCP 规范 §Resources) */
|
|
159
|
+
export interface McpResourceDef {
|
|
160
|
+
uri: string;
|
|
161
|
+
name: string;
|
|
162
|
+
description?: string;
|
|
163
|
+
mimeType?: string;
|
|
164
|
+
size?: number;
|
|
165
|
+
icons?: McpIcon[];
|
|
166
|
+
annotations?: McpAnnotations;
|
|
167
|
+
}
|
|
168
|
+
/** 提示模板定义(MCP 规范 §Prompts) */
|
|
169
|
+
export interface McpPromptDef {
|
|
170
|
+
name: string;
|
|
171
|
+
title?: string;
|
|
172
|
+
description?: string;
|
|
173
|
+
arguments?: {
|
|
174
|
+
name: string;
|
|
175
|
+
description?: string;
|
|
176
|
+
required?: boolean;
|
|
177
|
+
}[];
|
|
178
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@ai-zen/agents-sdk",
|
|
3
|
+
"version": "0.2.0-alpha.2",
|
|
4
|
+
"description": "AI-Zen Agents SDK — shared business logic for CLI and Desktop",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"keywords": [
|
|
9
|
+
"ai",
|
|
10
|
+
"agent",
|
|
11
|
+
"sdk",
|
|
12
|
+
"llm",
|
|
13
|
+
"mcp",
|
|
14
|
+
"model-context-protocol"
|
|
15
|
+
],
|
|
16
|
+
"author": "",
|
|
17
|
+
"license": "ISC",
|
|
18
|
+
"dependencies": {
|
|
19
|
+
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
20
|
+
"dayjs": "^1.11.21",
|
|
21
|
+
"@ai-zen/agents-core": "3.0.0-alpha.2"
|
|
22
|
+
},
|
|
23
|
+
"devDependencies": {
|
|
24
|
+
"@types/node": "^24.12.2",
|
|
25
|
+
"dotenv": "^17.4.2",
|
|
26
|
+
"prettier": "^3.9.5",
|
|
27
|
+
"rimraf": "^6.0.0",
|
|
28
|
+
"typescript": "^5.3.3",
|
|
29
|
+
"vitest": "^4.1.9"
|
|
30
|
+
},
|
|
31
|
+
"files": [
|
|
32
|
+
"dist",
|
|
33
|
+
"CHANGELOG.md"
|
|
34
|
+
],
|
|
35
|
+
"scripts": {
|
|
36
|
+
"clean": "rimraf ./dist",
|
|
37
|
+
"prebuild": "npm run clean",
|
|
38
|
+
"build": "tsc",
|
|
39
|
+
"format": "prettier --write .",
|
|
40
|
+
"format:check": "prettier --check .",
|
|
41
|
+
"pretest": "tsc --noEmit",
|
|
42
|
+
"test": "vitest run",
|
|
43
|
+
"test:integration": "npm run pretest && vitest run --config vitest.integration.config.ts",
|
|
44
|
+
"test:e2e": "npm run pretest && vitest run --config vitest.e2e.config.ts",
|
|
45
|
+
"test:all": "npm run pretest && vitest run && vitest run --config vitest.integration.config.ts && vitest run --config vitest.e2e.config.ts"
|
|
46
|
+
}
|
|
47
|
+
}
|