pulse-coder-engine 0.0.1-alpha.8 → 0.0.1-alpha.9

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/index.d.cts CHANGED
@@ -1,5 +1,5 @@
1
- import { C as ClarificationRequest, T as Tool, L as LLMProviderFactory, S as SystemPromptOption, a as ToolHooks, b as Context, c as ToolExecutionContext, E as EnginePluginLoadOptions, I as ILogger, d as EngineRunHook } from './index-Dh5B8P2t.cjs';
2
- export { B as BuiltInPlanModeService, e as BuiltInSkillRegistry, f as EnginePlugin, g as EnginePluginContext, M as ModePolicy, P as PlanIntentLabel, h as PlanMode, i as PlanModeEvent, j as PlanModeEventName, k as PlanModeService, l as PlanModeTransitionResult, m as ToolCategory, n as ToolMeta, o as ToolRisk, p as builtInMCPPlugin, q as builtInPlanModePlugin, r as builtInPlugins, s as builtInSkillsPlugin } from './index-Dh5B8P2t.cjs';
1
+ import { C as ClarificationRequest, T as Tool, L as LLMProviderFactory, S as SystemPromptOption, a as ToolHooks, b as Context, c as ToolExecutionContext, E as EnginePluginLoadOptions, I as ILogger, P as PlanMode, d as EngineRunHook } from './index-C7fdydbL.cjs';
2
+ export { B as BuiltInPlanModeService, e as BuiltInSkillRegistry, f as EnginePlugin, g as EnginePluginContext, M as ModePolicy, h as PlanIntentLabel, i as PlanModeEvent, j as PlanModeEventName, k as PlanModeService, l as PlanModeTransitionResult, m as ToolCategory, n as ToolMeta, o as ToolRisk, p as builtInMCPPlugin, q as builtInPlanModePlugin, r as builtInPlugins, s as builtInSkillsPlugin } from './index-C7fdydbL.cjs';
3
3
  import { StepResult, ModelMessage, ToolSet, streamText, Tool as Tool$1 } from 'ai';
4
4
  import { z } from 'zod';
5
5
  import 'events';
@@ -437,6 +437,18 @@ declare class Engine {
437
437
  * 获取服务
438
438
  */
439
439
  getService<T>(name: string): T | undefined;
440
+ /**
441
+ * 获取 plan mode 服务
442
+ */
443
+ private getPlanModeService;
444
+ /**
445
+ * 获取当前模式
446
+ */
447
+ getMode(): PlanMode | undefined;
448
+ /**
449
+ * 设置当前模式
450
+ */
451
+ setMode(mode: PlanMode, reason?: string): boolean;
440
452
  /**
441
453
  * 获取配置
442
454
  */
@@ -544,4 +556,4 @@ declare class PluginManager {
544
556
  private resolvePath;
545
557
  }
546
558
 
547
- export { BashTool, BuiltinTools, BuiltinToolsMap, ClarificationRequest, ClarifyTool, Context, EditTool, Engine, GrepTool, ILogger, LLMProviderFactory, LsTool, PluginManager, Engine as PulseAgent, ReadTool, SystemPromptOption, TavilyTool, Tool, ToolExecutionContext, ToolHooks, type UserConfigPlugin, type UserConfigPluginLoadOptions, WriteTool, getFinalToolsMap, loop, maybeCompactContext, streamTextAI };
559
+ export { BashTool, BuiltinTools, BuiltinToolsMap, ClarificationRequest, ClarifyTool, Context, EditTool, Engine, GrepTool, ILogger, LLMProviderFactory, LsTool, PlanMode, PluginManager, Engine as PulseAgent, ReadTool, SystemPromptOption, TavilyTool, Tool, ToolExecutionContext, ToolHooks, type UserConfigPlugin, type UserConfigPluginLoadOptions, WriteTool, getFinalToolsMap, loop, maybeCompactContext, streamTextAI };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { C as ClarificationRequest, T as Tool, L as LLMProviderFactory, S as SystemPromptOption, a as ToolHooks, b as Context, c as ToolExecutionContext, E as EnginePluginLoadOptions, I as ILogger, d as EngineRunHook } from './index-Dh5B8P2t.js';
2
- export { B as BuiltInPlanModeService, e as BuiltInSkillRegistry, f as EnginePlugin, g as EnginePluginContext, M as ModePolicy, P as PlanIntentLabel, h as PlanMode, i as PlanModeEvent, j as PlanModeEventName, k as PlanModeService, l as PlanModeTransitionResult, m as ToolCategory, n as ToolMeta, o as ToolRisk, p as builtInMCPPlugin, q as builtInPlanModePlugin, r as builtInPlugins, s as builtInSkillsPlugin } from './index-Dh5B8P2t.js';
1
+ import { C as ClarificationRequest, T as Tool, L as LLMProviderFactory, S as SystemPromptOption, a as ToolHooks, b as Context, c as ToolExecutionContext, E as EnginePluginLoadOptions, I as ILogger, P as PlanMode, d as EngineRunHook } from './index-C7fdydbL.js';
2
+ export { B as BuiltInPlanModeService, e as BuiltInSkillRegistry, f as EnginePlugin, g as EnginePluginContext, M as ModePolicy, h as PlanIntentLabel, i as PlanModeEvent, j as PlanModeEventName, k as PlanModeService, l as PlanModeTransitionResult, m as ToolCategory, n as ToolMeta, o as ToolRisk, p as builtInMCPPlugin, q as builtInPlanModePlugin, r as builtInPlugins, s as builtInSkillsPlugin } from './index-C7fdydbL.js';
3
3
  import { StepResult, ModelMessage, ToolSet, streamText, Tool as Tool$1 } from 'ai';
4
4
  import { z } from 'zod';
5
5
  import 'events';
@@ -437,6 +437,18 @@ declare class Engine {
437
437
  * 获取服务
438
438
  */
439
439
  getService<T>(name: string): T | undefined;
440
+ /**
441
+ * 获取 plan mode 服务
442
+ */
443
+ private getPlanModeService;
444
+ /**
445
+ * 获取当前模式
446
+ */
447
+ getMode(): PlanMode | undefined;
448
+ /**
449
+ * 设置当前模式
450
+ */
451
+ setMode(mode: PlanMode, reason?: string): boolean;
440
452
  /**
441
453
  * 获取配置
442
454
  */
@@ -544,4 +556,4 @@ declare class PluginManager {
544
556
  private resolvePath;
545
557
  }
546
558
 
547
- export { BashTool, BuiltinTools, BuiltinToolsMap, ClarificationRequest, ClarifyTool, Context, EditTool, Engine, GrepTool, ILogger, LLMProviderFactory, LsTool, PluginManager, Engine as PulseAgent, ReadTool, SystemPromptOption, TavilyTool, Tool, ToolExecutionContext, ToolHooks, type UserConfigPlugin, type UserConfigPluginLoadOptions, WriteTool, getFinalToolsMap, loop, maybeCompactContext, streamTextAI };
559
+ export { BashTool, BuiltinTools, BuiltinToolsMap, ClarificationRequest, ClarifyTool, Context, EditTool, Engine, GrepTool, ILogger, LLMProviderFactory, LsTool, PlanMode, PluginManager, Engine as PulseAgent, ReadTool, SystemPromptOption, TavilyTool, Tool, ToolExecutionContext, ToolHooks, type UserConfigPlugin, type UserConfigPluginLoadOptions, WriteTool, getFinalToolsMap, loop, maybeCompactContext, streamTextAI };
package/dist/index.js CHANGED
@@ -2260,6 +2260,29 @@ var Engine = class {
2260
2260
  getService(name) {
2261
2261
  return this.pluginManager.getService(name);
2262
2262
  }
2263
+ /**
2264
+ * 获取 plan mode 服务
2265
+ */
2266
+ getPlanModeService() {
2267
+ return this.getService("planMode") ?? this.getService("planModeService");
2268
+ }
2269
+ /**
2270
+ * 获取当前模式
2271
+ */
2272
+ getMode() {
2273
+ return this.getPlanModeService()?.getMode();
2274
+ }
2275
+ /**
2276
+ * 设置当前模式
2277
+ */
2278
+ setMode(mode, reason = "manual") {
2279
+ const planModeService = this.getPlanModeService();
2280
+ if (!planModeService) {
2281
+ return false;
2282
+ }
2283
+ planModeService.setMode(mode, reason);
2284
+ return true;
2285
+ }
2263
2286
  /**
2264
2287
  * 获取配置
2265
2288
  */