pulse-coder-engine 0.0.1-alpha.11 → 0.0.1-alpha.12
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/dist/built-in/index.cjs +544 -97
- package/dist/built-in/index.cjs.map +1 -1
- package/dist/built-in/index.d.cts +1 -1
- package/dist/built-in/index.d.ts +1 -1
- package/dist/built-in/index.js +531 -86
- package/dist/built-in/index.js.map +1 -1
- package/dist/{index-BeWyLfso.d.cts → index-CPgs_IXY.d.cts} +84 -2
- package/dist/{index-BeWyLfso.d.ts → index-CPgs_IXY.d.ts} +84 -2
- package/dist/index.cjs +473 -26
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +471 -26
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -218,7 +218,15 @@ declare class BuiltInSkillRegistry {
|
|
|
218
218
|
*/
|
|
219
219
|
getAll(): SkillInfo[];
|
|
220
220
|
/**
|
|
221
|
-
*
|
|
221
|
+
* 注册或更新一个技能(支持插件在运行期追加技能)
|
|
222
|
+
*/
|
|
223
|
+
registerSkill(skill: SkillInfo): {
|
|
224
|
+
skillName: string;
|
|
225
|
+
replaced: boolean;
|
|
226
|
+
total: number;
|
|
227
|
+
};
|
|
228
|
+
/**
|
|
229
|
+
* 根据名称获取技能(大小写不敏感)
|
|
222
230
|
*/
|
|
223
231
|
get(name: string): SkillInfo | undefined;
|
|
224
232
|
/**
|
|
@@ -299,10 +307,84 @@ declare class BuiltInPlanModeService implements PlanModeService {
|
|
|
299
307
|
}
|
|
300
308
|
declare const builtInPlanModePlugin: EnginePlugin;
|
|
301
309
|
|
|
310
|
+
declare const TASK_STATUSES: readonly ["pending", "in_progress", "completed", "blocked"];
|
|
311
|
+
type TaskStatus = (typeof TASK_STATUSES)[number];
|
|
312
|
+
interface WorkTask {
|
|
313
|
+
id: string;
|
|
314
|
+
title: string;
|
|
315
|
+
details?: string;
|
|
316
|
+
status: TaskStatus;
|
|
317
|
+
dependencies: string[];
|
|
318
|
+
blockedReason?: string;
|
|
319
|
+
metadata?: Record<string, any>;
|
|
320
|
+
createdAt: number;
|
|
321
|
+
updatedAt: number;
|
|
322
|
+
completedAt?: number;
|
|
323
|
+
}
|
|
324
|
+
interface WorkTaskListSnapshot {
|
|
325
|
+
taskListId: string;
|
|
326
|
+
storagePath: string;
|
|
327
|
+
createdAt: number;
|
|
328
|
+
updatedAt: number;
|
|
329
|
+
total: number;
|
|
330
|
+
tasks: WorkTask[];
|
|
331
|
+
}
|
|
332
|
+
interface CreateTaskInput {
|
|
333
|
+
title: string;
|
|
334
|
+
details?: string;
|
|
335
|
+
status?: TaskStatus;
|
|
336
|
+
dependencies?: string[];
|
|
337
|
+
blockedReason?: string;
|
|
338
|
+
metadata?: Record<string, any>;
|
|
339
|
+
}
|
|
340
|
+
interface ListTaskOptions {
|
|
341
|
+
statuses?: TaskStatus[];
|
|
342
|
+
includeCompleted?: boolean;
|
|
343
|
+
limit?: number;
|
|
344
|
+
}
|
|
345
|
+
interface UpdateTaskInput {
|
|
346
|
+
id: string;
|
|
347
|
+
title?: string;
|
|
348
|
+
details?: string;
|
|
349
|
+
status?: TaskStatus;
|
|
350
|
+
dependencies?: string[];
|
|
351
|
+
blockedReason?: string;
|
|
352
|
+
metadata?: Record<string, any>;
|
|
353
|
+
delete?: boolean;
|
|
354
|
+
}
|
|
355
|
+
declare class TaskListService {
|
|
356
|
+
taskListId: string;
|
|
357
|
+
storagePath: string;
|
|
358
|
+
private readonly storageDir;
|
|
359
|
+
private initialized;
|
|
360
|
+
private createdAt;
|
|
361
|
+
private updatedAt;
|
|
362
|
+
private tasks;
|
|
363
|
+
constructor(taskListId?: string, storageDir?: string);
|
|
364
|
+
static resolveTaskListId(): string;
|
|
365
|
+
static resolveStorageDir(): string;
|
|
366
|
+
initialize(): Promise<void>;
|
|
367
|
+
setTaskListId(taskListId: string): Promise<{
|
|
368
|
+
switched: boolean;
|
|
369
|
+
taskListId: string;
|
|
370
|
+
storagePath: string;
|
|
371
|
+
}>;
|
|
372
|
+
createTask(input: CreateTaskInput): Promise<WorkTask>;
|
|
373
|
+
createTasks(inputs: CreateTaskInput[]): Promise<WorkTask[]>;
|
|
374
|
+
listTasks(options?: ListTaskOptions): Promise<WorkTask[]>;
|
|
375
|
+
getTask(id: string): Promise<WorkTask | null>;
|
|
376
|
+
updateTask(input: UpdateTaskInput): Promise<WorkTask | null>;
|
|
377
|
+
snapshot(options?: ListTaskOptions): Promise<WorkTaskListSnapshot>;
|
|
378
|
+
private resolveBlockedReason;
|
|
379
|
+
private loadTaskList;
|
|
380
|
+
private persist;
|
|
381
|
+
}
|
|
382
|
+
declare const builtInTaskTrackingPlugin: EnginePlugin;
|
|
383
|
+
|
|
302
384
|
/**
|
|
303
385
|
* 默认内置插件列表
|
|
304
386
|
* 这些插件会在引擎启动时自动加载
|
|
305
387
|
*/
|
|
306
388
|
declare const builtInPlugins: (EnginePlugin | SubAgentPlugin)[];
|
|
307
389
|
|
|
308
|
-
export { type AfterLLMCallInput as A, type BeforeLLMCallInput as B, type ClarificationRequest as C,
|
|
390
|
+
export { type AfterLLMCallInput as A, type BeforeLLMCallInput as B, type ClarificationRequest as C, type ToolRisk as D, type EngineHookMap as E, type WorkTaskListSnapshot as F, builtInMCPPlugin as G, builtInPlanModePlugin as H, type ILogger as I, builtInPlugins as J, builtInSkillsPlugin as K, type LLMProviderFactory as L, type ModePolicy as M, builtInTaskTrackingPlugin as N, SubAgentPlugin as O, type PlanMode as P, type SystemPromptOption as S, type Tool as T, type WorkTask as W, type Context as a, type ToolExecutionContext as b, type EnginePluginLoadOptions as c, type ToolHooks as d, type EngineHookName as e, type AfterRunInput as f, type AfterToolCallInput as g, type AfterToolCallResult as h, type BeforeLLMCallResult as i, type BeforeRunInput as j, type BeforeRunResult as k, type BeforeToolCallInput as l, type BeforeToolCallResult as m, BuiltInPlanModeService as n, BuiltInSkillRegistry as o, type EnginePlugin as p, type EnginePluginContext as q, type PlanIntentLabel as r, type PlanModeEvent as s, type PlanModeEventName as t, type PlanModeService as u, type PlanModeTransitionResult as v, TaskListService as w, type TaskStatus as x, type ToolCategory as y, type ToolMeta as z };
|
|
@@ -218,7 +218,15 @@ declare class BuiltInSkillRegistry {
|
|
|
218
218
|
*/
|
|
219
219
|
getAll(): SkillInfo[];
|
|
220
220
|
/**
|
|
221
|
-
*
|
|
221
|
+
* 注册或更新一个技能(支持插件在运行期追加技能)
|
|
222
|
+
*/
|
|
223
|
+
registerSkill(skill: SkillInfo): {
|
|
224
|
+
skillName: string;
|
|
225
|
+
replaced: boolean;
|
|
226
|
+
total: number;
|
|
227
|
+
};
|
|
228
|
+
/**
|
|
229
|
+
* 根据名称获取技能(大小写不敏感)
|
|
222
230
|
*/
|
|
223
231
|
get(name: string): SkillInfo | undefined;
|
|
224
232
|
/**
|
|
@@ -299,10 +307,84 @@ declare class BuiltInPlanModeService implements PlanModeService {
|
|
|
299
307
|
}
|
|
300
308
|
declare const builtInPlanModePlugin: EnginePlugin;
|
|
301
309
|
|
|
310
|
+
declare const TASK_STATUSES: readonly ["pending", "in_progress", "completed", "blocked"];
|
|
311
|
+
type TaskStatus = (typeof TASK_STATUSES)[number];
|
|
312
|
+
interface WorkTask {
|
|
313
|
+
id: string;
|
|
314
|
+
title: string;
|
|
315
|
+
details?: string;
|
|
316
|
+
status: TaskStatus;
|
|
317
|
+
dependencies: string[];
|
|
318
|
+
blockedReason?: string;
|
|
319
|
+
metadata?: Record<string, any>;
|
|
320
|
+
createdAt: number;
|
|
321
|
+
updatedAt: number;
|
|
322
|
+
completedAt?: number;
|
|
323
|
+
}
|
|
324
|
+
interface WorkTaskListSnapshot {
|
|
325
|
+
taskListId: string;
|
|
326
|
+
storagePath: string;
|
|
327
|
+
createdAt: number;
|
|
328
|
+
updatedAt: number;
|
|
329
|
+
total: number;
|
|
330
|
+
tasks: WorkTask[];
|
|
331
|
+
}
|
|
332
|
+
interface CreateTaskInput {
|
|
333
|
+
title: string;
|
|
334
|
+
details?: string;
|
|
335
|
+
status?: TaskStatus;
|
|
336
|
+
dependencies?: string[];
|
|
337
|
+
blockedReason?: string;
|
|
338
|
+
metadata?: Record<string, any>;
|
|
339
|
+
}
|
|
340
|
+
interface ListTaskOptions {
|
|
341
|
+
statuses?: TaskStatus[];
|
|
342
|
+
includeCompleted?: boolean;
|
|
343
|
+
limit?: number;
|
|
344
|
+
}
|
|
345
|
+
interface UpdateTaskInput {
|
|
346
|
+
id: string;
|
|
347
|
+
title?: string;
|
|
348
|
+
details?: string;
|
|
349
|
+
status?: TaskStatus;
|
|
350
|
+
dependencies?: string[];
|
|
351
|
+
blockedReason?: string;
|
|
352
|
+
metadata?: Record<string, any>;
|
|
353
|
+
delete?: boolean;
|
|
354
|
+
}
|
|
355
|
+
declare class TaskListService {
|
|
356
|
+
taskListId: string;
|
|
357
|
+
storagePath: string;
|
|
358
|
+
private readonly storageDir;
|
|
359
|
+
private initialized;
|
|
360
|
+
private createdAt;
|
|
361
|
+
private updatedAt;
|
|
362
|
+
private tasks;
|
|
363
|
+
constructor(taskListId?: string, storageDir?: string);
|
|
364
|
+
static resolveTaskListId(): string;
|
|
365
|
+
static resolveStorageDir(): string;
|
|
366
|
+
initialize(): Promise<void>;
|
|
367
|
+
setTaskListId(taskListId: string): Promise<{
|
|
368
|
+
switched: boolean;
|
|
369
|
+
taskListId: string;
|
|
370
|
+
storagePath: string;
|
|
371
|
+
}>;
|
|
372
|
+
createTask(input: CreateTaskInput): Promise<WorkTask>;
|
|
373
|
+
createTasks(inputs: CreateTaskInput[]): Promise<WorkTask[]>;
|
|
374
|
+
listTasks(options?: ListTaskOptions): Promise<WorkTask[]>;
|
|
375
|
+
getTask(id: string): Promise<WorkTask | null>;
|
|
376
|
+
updateTask(input: UpdateTaskInput): Promise<WorkTask | null>;
|
|
377
|
+
snapshot(options?: ListTaskOptions): Promise<WorkTaskListSnapshot>;
|
|
378
|
+
private resolveBlockedReason;
|
|
379
|
+
private loadTaskList;
|
|
380
|
+
private persist;
|
|
381
|
+
}
|
|
382
|
+
declare const builtInTaskTrackingPlugin: EnginePlugin;
|
|
383
|
+
|
|
302
384
|
/**
|
|
303
385
|
* 默认内置插件列表
|
|
304
386
|
* 这些插件会在引擎启动时自动加载
|
|
305
387
|
*/
|
|
306
388
|
declare const builtInPlugins: (EnginePlugin | SubAgentPlugin)[];
|
|
307
389
|
|
|
308
|
-
export { type AfterLLMCallInput as A, type BeforeLLMCallInput as B, type ClarificationRequest as C,
|
|
390
|
+
export { type AfterLLMCallInput as A, type BeforeLLMCallInput as B, type ClarificationRequest as C, type ToolRisk as D, type EngineHookMap as E, type WorkTaskListSnapshot as F, builtInMCPPlugin as G, builtInPlanModePlugin as H, type ILogger as I, builtInPlugins as J, builtInSkillsPlugin as K, type LLMProviderFactory as L, type ModePolicy as M, builtInTaskTrackingPlugin as N, SubAgentPlugin as O, type PlanMode as P, type SystemPromptOption as S, type Tool as T, type WorkTask as W, type Context as a, type ToolExecutionContext as b, type EnginePluginLoadOptions as c, type ToolHooks as d, type EngineHookName as e, type AfterRunInput as f, type AfterToolCallInput as g, type AfterToolCallResult as h, type BeforeLLMCallResult as i, type BeforeRunInput as j, type BeforeRunResult as k, type BeforeToolCallInput as l, type BeforeToolCallResult as m, BuiltInPlanModeService as n, BuiltInSkillRegistry as o, type EnginePlugin as p, type EnginePluginContext as q, type PlanIntentLabel as r, type PlanModeEvent as s, type PlanModeEventName as t, type PlanModeService as u, type PlanModeTransitionResult as v, TaskListService as w, type TaskStatus as x, type ToolCategory as y, type ToolMeta as z };
|