qing-client 0.0.42 → 0.0.44

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 (64) hide show
  1. package/README.MD +0 -0
  2. package/lib/client/BaseClient.d.ts +0 -0
  3. package/lib/client/BaseClient.js +0 -0
  4. package/lib/client/index.d.ts +0 -0
  5. package/lib/client/index.js +0 -0
  6. package/lib/index.d.ts +0 -0
  7. package/lib/index.js +0 -0
  8. package/lib/service/AiService.d.ts +0 -0
  9. package/lib/service/AiService.js +0 -0
  10. package/lib/service/AigcService.d.ts +0 -0
  11. package/lib/service/AigcService.js +0 -0
  12. package/lib/service/AuditLogService.d.ts +0 -0
  13. package/lib/service/AuditLogService.js +0 -0
  14. package/lib/service/AuthService.d.ts +0 -0
  15. package/lib/service/AuthService.js +0 -0
  16. package/lib/service/DeliveryStreamService.d.ts +0 -0
  17. package/lib/service/DeliveryStreamService.js +0 -0
  18. package/lib/service/EzAbilityService.d.ts +88 -1
  19. package/lib/service/EzAbilityService.js +119 -0
  20. package/lib/service/FileService.d.ts +0 -0
  21. package/lib/service/FileService.js +0 -0
  22. package/lib/service/FrontHostService.d.ts +0 -0
  23. package/lib/service/FrontHostService.js +0 -0
  24. package/lib/service/MsgService.d.ts +0 -0
  25. package/lib/service/MsgService.js +0 -0
  26. package/lib/service/OrgService.d.ts +0 -0
  27. package/lib/service/OrgService.js +0 -0
  28. package/lib/service/ProviderService.d.ts +0 -0
  29. package/lib/service/ProviderService.js +0 -0
  30. package/lib/service/TokenService.d.ts +0 -0
  31. package/lib/service/TokenService.js +0 -0
  32. package/lib/service/UsageService.d.ts +0 -0
  33. package/lib/service/UsageService.js +0 -0
  34. package/lib/service/UserService.d.ts +0 -0
  35. package/lib/service/UserService.js +0 -0
  36. package/lib/types/ai.d.ts +0 -0
  37. package/lib/types/ai.js +0 -0
  38. package/lib/types/aigc.d.ts +0 -0
  39. package/lib/types/aigc.js +0 -0
  40. package/lib/types/audit.d.ts +0 -0
  41. package/lib/types/audit.js +0 -0
  42. package/lib/types/delivery-stream.d.ts +0 -0
  43. package/lib/types/delivery-stream.js +0 -0
  44. package/lib/types/ez-ability.d.ts +61 -0
  45. package/lib/types/ez-ability.js +1 -0
  46. package/lib/types/file.d.ts +0 -0
  47. package/lib/types/file.js +0 -0
  48. package/lib/types/fronthost.d.ts +0 -0
  49. package/lib/types/fronthost.js +0 -0
  50. package/lib/types/index.d.ts +0 -0
  51. package/lib/types/index.js +0 -0
  52. package/lib/types/msg.d.ts +0 -0
  53. package/lib/types/msg.js +0 -0
  54. package/lib/types/org.d.ts +0 -0
  55. package/lib/types/org.js +0 -0
  56. package/lib/types/provider.d.ts +0 -0
  57. package/lib/types/provider.js +0 -0
  58. package/lib/types/token.d.ts +0 -0
  59. package/lib/types/token.js +0 -0
  60. package/lib/types/usage.d.ts +0 -0
  61. package/lib/types/usage.js +0 -0
  62. package/lib/types/user.d.ts +0 -0
  63. package/lib/types/user.js +0 -0
  64. package/package.json +1 -1
package/README.MD CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
package/lib/index.d.ts CHANGED
File without changes
package/lib/index.js CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -1,11 +1,13 @@
1
1
  import { BaseClient } from "../client/BaseClient";
2
2
  import { ClientConfig } from "../types";
3
- import { EnumerateRequirementsRequest, EnumerateRequirementsResponse, TaskQueryResponse, GetTasksQuery, TaskListResponse } from "../types/ez-ability";
3
+ import { EnumerateRequirementsRequest, EnumerateRequirementsResponse, GeneratePRDRequest, GeneratePRDResponse, GenerateMVPRDRequest, GenerateMVPRDResponse, TaskQueryResponse, GetTasksQuery, GetPRDTasksQuery, GetMVPRDTasksQuery, TaskListResponse } from "../types/ez-ability";
4
4
  /**
5
5
  * EzAbility 服务 - AI 能力服务客户端
6
6
  *
7
7
  * 功能:
8
8
  * - 需求枚举(异步任务)
9
+ * - PRD生成(异步任务)
10
+ * - MVP PRD生成(异步任务)
9
11
  * - 任务列表查询(支持分页和过滤)
10
12
  * - 任务状态查询
11
13
  * - 任务取消
@@ -24,6 +26,91 @@ export declare class EzAbilityService extends BaseClient {
24
26
  * @returns 任务信息
25
27
  */
26
28
  enumerateRequirements(request: EnumerateRequirementsRequest): Promise<EnumerateRequirementsResponse>;
29
+ /**
30
+ * 创建PRD生成任务
31
+ *
32
+ * 支持两种模式:
33
+ * 1. 模式1(推荐):只提供 userRequest,系统会自动枚举需求池
34
+ * 2. 模式2:直接提供 requirementsPool,跳过枚举步骤,直接生成PRD
35
+ *
36
+ * 异步任务,立即返回 taskId
37
+ * 进度通过 WebSocket 推送
38
+ *
39
+ * @param request PRD生成请求
40
+ * @returns 任务信息
41
+ */
42
+ generatePRD(request: GeneratePRDRequest): Promise<GeneratePRDResponse>;
43
+ /**
44
+ * 获取PRD任务列表
45
+ *
46
+ * 支持分页和过滤(按状态)
47
+ * 默认过滤PRD生成任务
48
+ *
49
+ * @param query 查询参数
50
+ * @returns 任务列表响应
51
+ */
52
+ getPRDTasks(query?: GetPRDTasksQuery): Promise<TaskListResponse>;
53
+ /**
54
+ * 查询PRD任务状态
55
+ *
56
+ * 用于轮询或重连后恢复任务状态
57
+ *
58
+ * @param taskId 任务ID
59
+ * @returns 任务详情
60
+ */
61
+ getPRDTask(taskId: string): Promise<TaskQueryResponse>;
62
+ /**
63
+ * 取消PRD任务
64
+ *
65
+ * @param taskId 任务ID
66
+ * @returns 取消结果
67
+ */
68
+ cancelPRDTask(taskId: string): Promise<{
69
+ message: string;
70
+ }>;
71
+ /**
72
+ * 创建MVP PRD生成任务
73
+ *
74
+ * 支持三种模式:
75
+ * 1. 模式1(推荐):只提供 userRequest,系统会自动枚举需求池(3轮)
76
+ * 2. 模式2:直接提供 requirementsPool,跳过枚举步骤,直接生成PRD
77
+ * 3. 模式3:设置 skipEnumeration=true,跳过枚举阶段,直接生成PRD
78
+ *
79
+ * 异步任务,立即返回 taskId
80
+ * 进度通过 WebSocket 推送
81
+ *
82
+ * @param request MVP PRD生成请求
83
+ * @returns 任务信息
84
+ */
85
+ generateMVPRD(request: GenerateMVPRDRequest): Promise<GenerateMVPRDResponse>;
86
+ /**
87
+ * 获取MVP PRD任务列表
88
+ *
89
+ * 支持分页和过滤(按状态)
90
+ * 默认过滤MVP PRD生成任务
91
+ *
92
+ * @param query 查询参数
93
+ * @returns 任务列表响应
94
+ */
95
+ getMVPRDTasks(query?: GetMVPRDTasksQuery): Promise<TaskListResponse>;
96
+ /**
97
+ * 查询MVP PRD任务状态
98
+ *
99
+ * 用于轮询或重连后恢复任务状态
100
+ *
101
+ * @param taskId 任务ID
102
+ * @returns 任务详情
103
+ */
104
+ getMVPRDTask(taskId: string): Promise<TaskQueryResponse>;
105
+ /**
106
+ * 取消MVP PRD任务
107
+ *
108
+ * @param taskId 任务ID
109
+ * @returns 取消结果
110
+ */
111
+ cancelMVPRDTask(taskId: string): Promise<{
112
+ message: string;
113
+ }>;
27
114
  /**
28
115
  * 获取任务列表
29
116
  *
@@ -8,6 +8,8 @@ const BaseClient_1 = require("../client/BaseClient");
8
8
  *
9
9
  * 功能:
10
10
  * - 需求枚举(异步任务)
11
+ * - PRD生成(异步任务)
12
+ * - MVP PRD生成(异步任务)
11
13
  * - 任务列表查询(支持分页和过滤)
12
14
  * - 任务状态查询
13
15
  * - 任务取消
@@ -34,6 +36,123 @@ class EzAbilityService extends BaseClient_1.BaseClient {
34
36
  body: request,
35
37
  });
36
38
  }
39
+ // ==================== PRD生成 ====================
40
+ /**
41
+ * 创建PRD生成任务
42
+ *
43
+ * 支持两种模式:
44
+ * 1. 模式1(推荐):只提供 userRequest,系统会自动枚举需求池
45
+ * 2. 模式2:直接提供 requirementsPool,跳过枚举步骤,直接生成PRD
46
+ *
47
+ * 异步任务,立即返回 taskId
48
+ * 进度通过 WebSocket 推送
49
+ *
50
+ * @param request PRD生成请求
51
+ * @returns 任务信息
52
+ */
53
+ async generatePRD(request) {
54
+ return this.request("/prd/generate", {
55
+ method: "POST",
56
+ body: request,
57
+ });
58
+ }
59
+ /**
60
+ * 获取PRD任务列表
61
+ *
62
+ * 支持分页和过滤(按状态)
63
+ * 默认过滤PRD生成任务
64
+ *
65
+ * @param query 查询参数
66
+ * @returns 任务列表响应
67
+ */
68
+ async getPRDTasks(query) {
69
+ return this.request("/prd/tasks", {
70
+ method: "GET",
71
+ params: {
72
+ ...query,
73
+ type: query?.type || 'prd-generate', // 默认过滤PRD任务
74
+ },
75
+ });
76
+ }
77
+ /**
78
+ * 查询PRD任务状态
79
+ *
80
+ * 用于轮询或重连后恢复任务状态
81
+ *
82
+ * @param taskId 任务ID
83
+ * @returns 任务详情
84
+ */
85
+ async getPRDTask(taskId) {
86
+ return this.request(`/prd/tasks/${taskId}`, { method: "GET" });
87
+ }
88
+ /**
89
+ * 取消PRD任务
90
+ *
91
+ * @param taskId 任务ID
92
+ * @returns 取消结果
93
+ */
94
+ async cancelPRDTask(taskId) {
95
+ return this.request(`/prd/tasks/${taskId}`, { method: "DELETE" });
96
+ }
97
+ // ==================== MVP PRD生成 ====================
98
+ /**
99
+ * 创建MVP PRD生成任务
100
+ *
101
+ * 支持三种模式:
102
+ * 1. 模式1(推荐):只提供 userRequest,系统会自动枚举需求池(3轮)
103
+ * 2. 模式2:直接提供 requirementsPool,跳过枚举步骤,直接生成PRD
104
+ * 3. 模式3:设置 skipEnumeration=true,跳过枚举阶段,直接生成PRD
105
+ *
106
+ * 异步任务,立即返回 taskId
107
+ * 进度通过 WebSocket 推送
108
+ *
109
+ * @param request MVP PRD生成请求
110
+ * @returns 任务信息
111
+ */
112
+ async generateMVPRD(request) {
113
+ return this.request("/prd-mvp/generate", {
114
+ method: "POST",
115
+ body: request,
116
+ });
117
+ }
118
+ /**
119
+ * 获取MVP PRD任务列表
120
+ *
121
+ * 支持分页和过滤(按状态)
122
+ * 默认过滤MVP PRD生成任务
123
+ *
124
+ * @param query 查询参数
125
+ * @returns 任务列表响应
126
+ */
127
+ async getMVPRDTasks(query) {
128
+ return this.request("/prd-mvp/tasks", {
129
+ method: "GET",
130
+ params: {
131
+ ...query,
132
+ type: query?.type || 'prd-mvp-generate', // 默认过滤MVP PRD任务
133
+ },
134
+ });
135
+ }
136
+ /**
137
+ * 查询MVP PRD任务状态
138
+ *
139
+ * 用于轮询或重连后恢复任务状态
140
+ *
141
+ * @param taskId 任务ID
142
+ * @returns 任务详情
143
+ */
144
+ async getMVPRDTask(taskId) {
145
+ return this.request(`/prd-mvp/tasks/${taskId}`, { method: "GET" });
146
+ }
147
+ /**
148
+ * 取消MVP PRD任务
149
+ *
150
+ * @param taskId 任务ID
151
+ * @returns 取消结果
152
+ */
153
+ async cancelMVPRDTask(taskId) {
154
+ return this.request(`/prd-mvp/tasks/${taskId}`, { method: "DELETE" });
155
+ }
37
156
  // ==================== 任务管理 ====================
38
157
  /**
39
158
  * 获取任务列表
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
package/lib/types/ai.d.ts CHANGED
File without changes
package/lib/types/ai.js CHANGED
File without changes
File without changes
package/lib/types/aigc.js CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -28,9 +28,66 @@ export interface EnumerateRequirementsResult {
28
28
  totalRounds: number;
29
29
  totalCount: number;
30
30
  }
31
+ export interface GeneratePRDRequest {
32
+ /** 需求描述(用户的原始需求文本) */
33
+ userRequest: string;
34
+ /** 可选:直接提供需求池,跳过枚举步骤 */
35
+ requirementsPool?: string[];
36
+ /** 枚举轮数(3-10),如果提供了需求池,此参数会被忽略,默认 5 */
37
+ maxEnumerationRounds?: number;
38
+ /** 指定使用的模型(不传则使用服务默认模型) */
39
+ model?: string;
40
+ }
41
+ export interface GeneratePRDResponse {
42
+ taskId: string;
43
+ status: TaskStatus;
44
+ message: string;
45
+ /** 使用的模式:'enumerate' = 自动枚举需求池,'direct' = 直接使用提供的需求池 */
46
+ mode?: 'enumerate' | 'direct';
47
+ }
48
+ export interface GeneratePRDResult {
49
+ taskId: string;
50
+ prdFilePath?: string;
51
+ prdContent?: string;
52
+ totalRequirements: number;
53
+ totalSections: number;
54
+ processingTime: number;
55
+ }
56
+ export interface GenerateMVPRDRequest {
57
+ /** 需求描述(用户的原始需求文本) */
58
+ userRequest: string;
59
+ /** 可选:直接提供需求池,跳过枚举步骤 */
60
+ requirementsPool?: string[];
61
+ /** 枚举轮数(2-5),如果提供了需求池或skipEnumeration=true,此参数会被忽略,默认 3 */
62
+ maxEnumerationRounds?: number;
63
+ /** 可选:跳过枚举阶段,直接生成PRD */
64
+ skipEnumeration?: boolean;
65
+ /** 指定使用的模型(不传则使用服务默认模型) */
66
+ model?: string;
67
+ }
68
+ export interface GenerateMVPRDResponse {
69
+ taskId: string;
70
+ status: TaskStatus;
71
+ message: string;
72
+ /** 使用的模式:'enumerate' = 自动枚举需求池,'direct' = 直接使用提供的需求池,'skip-enumeration' = 跳过枚举 */
73
+ mode?: 'enumerate' | 'direct' | 'skip-enumeration';
74
+ }
75
+ export interface GenerateMVPRDResult {
76
+ taskId: string;
77
+ prdFilePath?: string;
78
+ prdContent?: string;
79
+ totalRequirements: number;
80
+ totalSections: number;
81
+ processingTime: number;
82
+ }
83
+ export interface GetMVPRDTasksQuery extends GetTasksQuery {
84
+ /** 默认过滤MVP PRD生成任务 */
85
+ type?: 'prd-mvp-generate';
86
+ }
31
87
  export declare const TASK_TYPES: {
32
88
  readonly ENUMERATE_REQUIREMENTS: "enumerate-requirements";
33
89
  readonly PRD_GENERATE: "prd-generate";
90
+ readonly PRD_MVP_GENERATE: "prd-mvp-generate";
34
91
  readonly DATA_ANALYSIS: "data-analysis";
35
92
  readonly GATEWAY_TASK: "gateway-task";
36
93
  };
@@ -57,6 +114,10 @@ export interface GetTasksQuery {
57
114
  /** 偏移量,默认 0 */
58
115
  offset?: number;
59
116
  }
117
+ export interface GetPRDTasksQuery extends GetTasksQuery {
118
+ /** 默认过滤PRD生成任务 */
119
+ type?: 'prd-generate';
120
+ }
60
121
  export interface TaskListItem {
61
122
  taskId: string;
62
123
  type: string;
@@ -7,6 +7,7 @@ exports.TASK_TYPES = void 0;
7
7
  exports.TASK_TYPES = {
8
8
  ENUMERATE_REQUIREMENTS: 'enumerate-requirements',
9
9
  PRD_GENERATE: 'prd-generate',
10
+ PRD_MVP_GENERATE: 'prd-mvp-generate',
10
11
  DATA_ANALYSIS: 'data-analysis',
11
12
  GATEWAY_TASK: 'gateway-task',
12
13
  };
File without changes
package/lib/types/file.js CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
package/lib/types/msg.js CHANGED
File without changes
File without changes
package/lib/types/org.js CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
package/lib/types/user.js CHANGED
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "qing-client",
3
- "version": "0.0.42",
3
+ "version": "0.0.44",
4
4
  "main": "lib/index.js",
5
5
  "types": "lib/index.d.ts",
6
6
  "scripts": {