wave-agent-sdk 0.2.1 → 0.5.0

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 (194) hide show
  1. package/dist/agent.d.ts +66 -20
  2. package/dist/agent.d.ts.map +1 -1
  3. package/dist/agent.js +156 -83
  4. package/dist/constants/prompts.d.ts +7 -2
  5. package/dist/constants/prompts.d.ts.map +1 -1
  6. package/dist/constants/prompts.js +41 -5
  7. package/dist/constants/tools.d.ts +2 -2
  8. package/dist/constants/tools.js +2 -2
  9. package/dist/index.d.ts +1 -1
  10. package/dist/index.d.ts.map +1 -1
  11. package/dist/index.js +1 -1
  12. package/dist/managers/MemoryRuleManager.d.ts.map +1 -1
  13. package/dist/managers/MemoryRuleManager.js +16 -2
  14. package/dist/managers/aiManager.d.ts +14 -4
  15. package/dist/managers/aiManager.d.ts.map +1 -1
  16. package/dist/managers/aiManager.js +61 -9
  17. package/dist/managers/backgroundBashManager.d.ts.map +1 -1
  18. package/dist/managers/backgroundBashManager.js +1 -0
  19. package/dist/managers/backgroundTaskManager.d.ts +35 -0
  20. package/dist/managers/backgroundTaskManager.d.ts.map +1 -0
  21. package/dist/managers/backgroundTaskManager.js +249 -0
  22. package/dist/managers/bashManager.d.ts.map +1 -1
  23. package/dist/managers/bashManager.js +0 -3
  24. package/dist/managers/foregroundTaskManager.d.ts +9 -0
  25. package/dist/managers/foregroundTaskManager.d.ts.map +1 -0
  26. package/dist/managers/foregroundTaskManager.js +20 -0
  27. package/dist/managers/liveConfigManager.d.ts +1 -1
  28. package/dist/managers/liveConfigManager.d.ts.map +1 -1
  29. package/dist/managers/lspManager.d.ts.map +1 -1
  30. package/dist/managers/lspManager.js +3 -1
  31. package/dist/managers/messageManager.d.ts +34 -4
  32. package/dist/managers/messageManager.d.ts.map +1 -1
  33. package/dist/managers/messageManager.js +104 -13
  34. package/dist/managers/permissionManager.d.ts.map +1 -1
  35. package/dist/managers/permissionManager.js +11 -13
  36. package/dist/managers/pluginManager.d.ts.map +1 -1
  37. package/dist/managers/pluginManager.js +3 -2
  38. package/dist/managers/pluginScopeManager.d.ts +13 -2
  39. package/dist/managers/pluginScopeManager.d.ts.map +1 -1
  40. package/dist/managers/pluginScopeManager.js +38 -0
  41. package/dist/managers/reversionManager.d.ts +39 -0
  42. package/dist/managers/reversionManager.d.ts.map +1 -0
  43. package/dist/managers/reversionManager.js +118 -0
  44. package/dist/managers/slashCommandManager.d.ts +4 -1
  45. package/dist/managers/slashCommandManager.d.ts.map +1 -1
  46. package/dist/managers/slashCommandManager.js +16 -6
  47. package/dist/managers/subagentManager.d.ts +13 -2
  48. package/dist/managers/subagentManager.d.ts.map +1 -1
  49. package/dist/managers/subagentManager.js +144 -35
  50. package/dist/managers/toolManager.d.ts +11 -1
  51. package/dist/managers/toolManager.d.ts.map +1 -1
  52. package/dist/managers/toolManager.js +11 -3
  53. package/dist/services/GitService.d.ts.map +1 -1
  54. package/dist/services/GitService.js +6 -2
  55. package/dist/services/MarketplaceService.d.ts +14 -1
  56. package/dist/services/MarketplaceService.d.ts.map +1 -1
  57. package/dist/services/MarketplaceService.js +72 -4
  58. package/dist/services/MemoryRuleService.d.ts +1 -1
  59. package/dist/services/MemoryRuleService.d.ts.map +1 -1
  60. package/dist/services/MemoryRuleService.js +13 -2
  61. package/dist/services/aiService.js +1 -1
  62. package/dist/services/configurationService.d.ts +18 -2
  63. package/dist/services/configurationService.d.ts.map +1 -1
  64. package/dist/services/configurationService.js +62 -0
  65. package/dist/services/fileWatcher.d.ts +0 -5
  66. package/dist/services/fileWatcher.d.ts.map +1 -1
  67. package/dist/services/fileWatcher.js +0 -11
  68. package/dist/services/memory.js +1 -1
  69. package/dist/services/pluginLoader.d.ts.map +1 -1
  70. package/dist/services/pluginLoader.js +6 -1
  71. package/dist/services/reversionService.d.ts +24 -0
  72. package/dist/services/reversionService.d.ts.map +1 -0
  73. package/dist/services/reversionService.js +76 -0
  74. package/dist/services/session.d.ts +7 -0
  75. package/dist/services/session.d.ts.map +1 -1
  76. package/dist/services/session.js +126 -3
  77. package/dist/tools/bashTool.d.ts +0 -8
  78. package/dist/tools/bashTool.d.ts.map +1 -1
  79. package/dist/tools/bashTool.js +52 -174
  80. package/dist/tools/deleteFileTool.d.ts.map +1 -1
  81. package/dist/tools/deleteFileTool.js +9 -0
  82. package/dist/tools/editTool.d.ts.map +1 -1
  83. package/dist/tools/editTool.js +15 -4
  84. package/dist/tools/multiEditTool.d.ts.map +1 -1
  85. package/dist/tools/multiEditTool.js +16 -5
  86. package/dist/tools/taskOutputTool.d.ts +3 -0
  87. package/dist/tools/taskOutputTool.d.ts.map +1 -0
  88. package/dist/tools/taskOutputTool.js +149 -0
  89. package/dist/tools/taskStopTool.d.ts +3 -0
  90. package/dist/tools/taskStopTool.d.ts.map +1 -0
  91. package/dist/tools/taskStopTool.js +65 -0
  92. package/dist/tools/taskTool.d.ts.map +1 -1
  93. package/dist/tools/taskTool.js +105 -63
  94. package/dist/tools/types.d.ts +7 -0
  95. package/dist/tools/types.d.ts.map +1 -1
  96. package/dist/tools/writeTool.d.ts.map +1 -1
  97. package/dist/tools/writeTool.js +9 -0
  98. package/dist/types/commands.d.ts +1 -0
  99. package/dist/types/commands.d.ts.map +1 -1
  100. package/dist/types/configuration.d.ts +3 -0
  101. package/dist/types/configuration.d.ts.map +1 -1
  102. package/dist/types/environment.d.ts +2 -1
  103. package/dist/types/environment.d.ts.map +1 -1
  104. package/dist/types/environment.js +0 -6
  105. package/dist/types/history.d.ts +5 -0
  106. package/dist/types/history.d.ts.map +1 -0
  107. package/dist/types/history.js +1 -0
  108. package/dist/types/index.d.ts +1 -0
  109. package/dist/types/index.d.ts.map +1 -1
  110. package/dist/types/index.js +1 -0
  111. package/dist/types/marketplace.d.ts +4 -0
  112. package/dist/types/marketplace.d.ts.map +1 -1
  113. package/dist/types/messaging.d.ts +7 -1
  114. package/dist/types/messaging.d.ts.map +1 -1
  115. package/dist/types/processes.d.ts +24 -4
  116. package/dist/types/processes.d.ts.map +1 -1
  117. package/dist/types/reversion.d.ts +29 -0
  118. package/dist/types/reversion.d.ts.map +1 -0
  119. package/dist/types/reversion.js +1 -0
  120. package/dist/utils/builtinSubagents.d.ts.map +1 -1
  121. package/dist/utils/builtinSubagents.js +16 -0
  122. package/dist/utils/constants.d.ts +2 -2
  123. package/dist/utils/constants.d.ts.map +1 -1
  124. package/dist/utils/constants.js +2 -2
  125. package/dist/utils/editUtils.d.ts +4 -9
  126. package/dist/utils/editUtils.d.ts.map +1 -1
  127. package/dist/utils/editUtils.js +54 -55
  128. package/dist/utils/messageOperations.d.ts +3 -1
  129. package/dist/utils/messageOperations.d.ts.map +1 -1
  130. package/dist/utils/messageOperations.js +8 -1
  131. package/dist/utils/openaiClient.d.ts.map +1 -1
  132. package/dist/utils/openaiClient.js +56 -26
  133. package/dist/utils/promptHistory.d.ts +20 -0
  134. package/dist/utils/promptHistory.d.ts.map +1 -0
  135. package/dist/utils/promptHistory.js +117 -0
  136. package/package.json +5 -3
  137. package/src/agent.ts +193 -109
  138. package/src/constants/prompts.ts +45 -5
  139. package/src/constants/tools.ts +2 -2
  140. package/src/index.ts +1 -1
  141. package/src/managers/MemoryRuleManager.ts +18 -2
  142. package/src/managers/aiManager.ts +87 -18
  143. package/src/managers/backgroundBashManager.ts +1 -0
  144. package/src/managers/backgroundTaskManager.ts +306 -0
  145. package/src/managers/bashManager.ts +0 -4
  146. package/src/managers/foregroundTaskManager.ts +26 -0
  147. package/src/managers/liveConfigManager.ts +2 -1
  148. package/src/managers/lspManager.ts +3 -1
  149. package/src/managers/messageManager.ts +136 -18
  150. package/src/managers/permissionManager.ts +11 -13
  151. package/src/managers/pluginManager.ts +4 -3
  152. package/src/managers/pluginScopeManager.ts +57 -8
  153. package/src/managers/reversionManager.ts +152 -0
  154. package/src/managers/slashCommandManager.ts +30 -7
  155. package/src/managers/subagentManager.ts +176 -31
  156. package/src/managers/toolManager.ts +23 -4
  157. package/src/services/GitService.ts +6 -2
  158. package/src/services/MarketplaceService.ts +100 -4
  159. package/src/services/MemoryRuleService.ts +18 -6
  160. package/src/services/aiService.ts +1 -1
  161. package/src/services/configurationService.ts +79 -1
  162. package/src/services/fileWatcher.ts +0 -13
  163. package/src/services/memory.ts +1 -1
  164. package/src/services/pluginLoader.ts +7 -1
  165. package/src/services/reversionService.ts +94 -0
  166. package/src/services/session.ts +161 -3
  167. package/src/tools/bashTool.ts +73 -200
  168. package/src/tools/deleteFileTool.ts +15 -0
  169. package/src/tools/editTool.ts +20 -10
  170. package/src/tools/multiEditTool.ts +21 -11
  171. package/src/tools/taskOutputTool.ts +174 -0
  172. package/src/tools/taskStopTool.ts +72 -0
  173. package/src/tools/taskTool.ts +130 -74
  174. package/src/tools/types.ts +7 -0
  175. package/src/tools/writeTool.ts +14 -0
  176. package/src/types/commands.ts +3 -0
  177. package/src/types/configuration.ts +4 -0
  178. package/src/types/environment.ts +3 -1
  179. package/src/types/history.ts +4 -0
  180. package/src/types/index.ts +1 -0
  181. package/src/types/marketplace.ts +5 -0
  182. package/src/types/messaging.ts +9 -1
  183. package/src/types/processes.ts +33 -4
  184. package/src/types/reversion.ts +29 -0
  185. package/src/utils/builtinSubagents.ts +18 -0
  186. package/src/utils/constants.ts +2 -2
  187. package/src/utils/editUtils.ts +66 -58
  188. package/src/utils/messageOperations.ts +10 -0
  189. package/src/utils/openaiClient.ts +69 -35
  190. package/src/utils/promptHistory.ts +133 -0
  191. package/dist/utils/bashHistory.d.ts +0 -50
  192. package/dist/utils/bashHistory.d.ts.map +0 -1
  193. package/dist/utils/bashHistory.js +0 -256
  194. package/src/utils/bashHistory.ts +0 -320
@@ -1 +1 @@
1
- {"version":3,"file":"permissionManager.d.ts","sourceRoot":"","sources":["../../src/managers/permissionManager.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,OAAO,KAAK,EACV,kBAAkB,EAClB,qBAAqB,EACrB,kBAAkB,EAClB,cAAc,EACf,MAAM,yBAAyB,CAAC;AAEjC,OAAO,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AAI;IAQ/C;;OAEG;IACI,mBAAmB,IAAI,IAAI;IAKlC;;OAEG;IACH,2BAA2B,CAAC,WAAW,EAAE,MAAM,EAAE,GAAG,IAAI;IAYxD;;OAEG;IACH,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAOpC;;OAEG;IACI,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI;IAKtD;;OAEG;IACI,eAAe,IAAI,MAAM,GAAG,SAAS;IAI5C;;OAEG;IACH,OAAO,CAAC,gBAAgB;IAiCxB;;OAEG;IACH,uBAAuB,CAAC,iBAAiB,CAAC,EAAE,cAAc,GAAG,cAAc;IAI3E;;OAEG;IACH,8BAA8B,CAC5B,iBAAiB,CAAC,EAAE,cAAc,GACjC,cAAc;IAuBjB;;;OAGG;IACG,eAAe,CACnB,OAAO,EAAE,qBAAqB,GAC7B,OAAO,CAAC,kBAAkB,CAAC;IAgL9B;;OAEG;IACH,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO;IAW3C;;OAEG;IACH,aAAa,CACX,QAAQ,EAAE,MAAM,EAChB,cAAc,EAAE,cAAc,EAC9B,QAAQ,CAAC,EAAE,kBAAkB,EAC7B,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAClC,qBAAqB;IAuExB;;OAEG;IACH,OAAO,CAAC,WAAW;IAqDnB;;OAEG;IACH,OAAO,CAAC,eAAe;IAoFvB;;;;;;;OAOG;IACI,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE;CAiFlE"}
@@ -159,13 +159,7 @@ export class PermissionManager {
159
159
  * Get the current effective permission mode for tool execution context
160
160
  */
161
161
  getCurrentEffectiveMode(cliPermissionMode) {
162
- const mode = this.resolveEffectivePermissionMode(cliPermissionMode);
163
- this.logger?.debug("getCurrentEffectiveMode", {
164
- cliPermissionMode,
165
- configuredDefaultMode: this.configuredDefaultMode,
166
- resolvedMode: mode,
167
- });
168
- return mode;
162
+ return this.resolveEffectivePermissionMode(cliPermissionMode);
169
163
  }
170
164
  /**
171
165
  * Resolve the effective permission mode based on CLI override and configured default
@@ -422,7 +416,7 @@ export class PermissionManager {
422
416
  if (rule === context.toolName) {
423
417
  return true;
424
418
  }
425
- // 2. Tool with pattern match (e.g., "Bash(rm:*)", "Read(**/*.env)")
419
+ // 2. Tool with pattern match (e.g., "Bash(rm *)", "Read(**/*.env)")
426
420
  const match = rule.match(/^(\w+)\((.*)\)$/);
427
421
  if (!match) {
428
422
  return false;
@@ -435,10 +429,14 @@ export class PermissionManager {
435
429
  if (toolName === BASH_TOOL_NAME) {
436
430
  const command = String(context.toolInput?.command || "");
437
431
  const processedPart = stripRedirections(stripEnvVars(command));
438
- if (pattern.endsWith(":*")) {
439
- return processedPart.startsWith(pattern.slice(0, -2));
440
- }
441
- return processedPart === pattern;
432
+ // For Bash commands, we want '*' to match everything including slashes and spaces
433
+ // minimatch's default behavior for '*' is to not match across directory separators
434
+ // We use a regex to replace '*' with '.*' (match anything)
435
+ const regexPattern = pattern
436
+ .replace(/[.+^${}()|[\]\\?]/g, "\\$&") // Escape regex special chars including ?
437
+ .replace(/\*/g, ".*"); // Replace * with .*
438
+ const regex = new RegExp(`^${regexPattern}$`);
439
+ return regex.test(processedPart);
442
440
  }
443
441
  // Handle path-based rules (e.g., "Read(**/*.env)")
444
442
  const pathTools = [
@@ -587,7 +585,7 @@ export class PermissionManager {
587
585
  }
588
586
  const smartPrefix = getSmartPrefix(processedPart);
589
587
  if (smartPrefix) {
590
- rules.push(`Bash(${smartPrefix}:*)`);
588
+ rules.push(`Bash(${smartPrefix}*)`);
591
589
  }
592
590
  else {
593
591
  rules.push(`Bash(${processedPart})`);
@@ -1 +1 @@
1
- {"version":3,"file":"pluginManager.d.ts","sourceRoot":"","sources":["../../src/managers/pluginManager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,E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AAM,CAAC,CAAS;IACxB,OAAO,CAAC,YAAY,CAAC,CAAe;IACpC,OAAO,CAAC,WAAW,CAAC,CAAc;IAClC,OAAO,CAAC,UAAU,CAAC,CAAa;IAChC,OAAO,CAAC,UAAU,CAAC,CAAa;IAChC,OAAO,CAAC,mBAAmB,CAAC,CAAsB;IAClD,OAAO,CAAC,cAAc,CAA0B;IAChD,OAAO,CAAC,oBAAoB,CAAC,CAAuB;gBAExC,OAAO,EAAE,oBAAoB;IAYzC;;OAEG;IACH,oBAAoB,CAAC,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI;IAInE;;OAEG;YACW,oBAAoB;IA2BlC;;OAEG;YACW,gBAAgB;IA2D9B;;;OAGG;IACG,WAAW,CAAC,OAAO,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAmBzD;;OAEG;IACH,UAAU,IAAI,MAAM,EAAE;IAItB;;OAEG;IACH,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;CAG5C"}
@@ -96,8 +96,7 @@ export class PluginManager {
96
96
  * @param configs Array of plugin configurations
97
97
  */
98
98
  async loadPlugins(configs) {
99
- // Load installed plugins from marketplace first
100
- await this.loadInstalledPlugins();
99
+ // Load plugins from configuration (e.g. --plugin-dir) first to give them higher priority
101
100
  for (const config of configs) {
102
101
  if (config.type !== "local") {
103
102
  this.logger?.warn(`Unsupported plugin type: ${config.type}`);
@@ -108,6 +107,8 @@ export class PluginManager {
108
107
  : path.resolve(this.workdir, config.path);
109
108
  await this.loadSinglePlugin(absolutePath);
110
109
  }
110
+ // Load installed plugins from marketplace
111
+ await this.loadInstalledPlugins();
111
112
  }
112
113
  /**
113
114
  * Get all loaded plugins
@@ -1,6 +1,7 @@
1
1
  import { ConfigurationService } from "../services/configurationService.js";
2
2
  import { PluginManager } from "./pluginManager.js";
3
3
  import { Logger } from "../types/index.js";
4
+ import { Scope } from "../types/configuration.js";
4
5
  export interface PluginScopeManagerOptions {
5
6
  workdir: string;
6
7
  configurationService: ConfigurationService;
@@ -16,15 +17,25 @@ export declare class PluginScopeManager {
16
17
  /**
17
18
  * Enable a plugin in the specified scope
18
19
  */
19
- enablePlugin(scope: "user" | "project" | "local", pluginId: string): Promise<void>;
20
+ enablePlugin(scope: Scope, pluginId: string): Promise<void>;
20
21
  /**
21
22
  * Disable a plugin in the specified scope
22
23
  */
23
- disablePlugin(scope: "user" | "project" | "local", pluginId: string): Promise<void>;
24
+ disablePlugin(scope: Scope, pluginId: string): Promise<void>;
24
25
  /**
25
26
  * Get the merged enabled state of all plugins
26
27
  */
27
28
  getMergedEnabledPlugins(): Record<string, boolean>;
29
+ /**
30
+ * Find the scope where a plugin is currently enabled/disabled.
31
+ * Priority: local > project > user
32
+ */
33
+ findPluginScope(pluginId: string): Scope | null;
34
+ /**
35
+ * Remove a plugin from all scopes (user, project, local)
36
+ * This is useful when uninstalling a plugin to clean up all configuration
37
+ */
38
+ removePluginFromAllScopes(pluginId: string): Promise<void>;
28
39
  /**
29
40
  * Refresh the plugin manager with the latest configuration
30
41
  * Note: This only updates the configuration, it doesn't reload plugins.
@@ -1 +1 @@
1
- {"version":3,"file":"pluginScopeManager.d.ts","sourceRoot":"","sources":["../../src/managers/pluginScopeManager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAE3C,MAAM,WAAW,yBAAyB;IACxC,OAAO,EAAE,MAAM,CAAC;IAChB,oBAAoB,EAAE,oBAAoB,CAAC;IAC3C,aAAa,EAAE,aAAa,CAAC;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,qBAAa,kBAAkB;IAC7B,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,oBAAoB,CAAuB;IACnD,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aAAa,CAAC,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAWlE;;OAEG;IACH,uBAAuB,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAIlD;;;OAGG;IACH,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,KAAK,GAAG,IAAI;IAyB/C;;;OAGG;IACG,yBAAyB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAqBhE;;;;OAIG;IACH,OAAO,CAAC,oBAAoB;CAI7B"}
@@ -27,6 +27,44 @@ export class PluginScopeManager {
27
27
  getMergedEnabledPlugins() {
28
28
  return this.configurationService.getMergedEnabledPlugins(this.workdir);
29
29
  }
30
+ /**
31
+ * Find the scope where a plugin is currently enabled/disabled.
32
+ * Priority: local > project > user
33
+ */
34
+ findPluginScope(pluginId) {
35
+ const projectPaths = this.configurationService.getConfigurationPaths(this.workdir).projectPaths; // [local, json]
36
+ const userPaths = this.configurationService.getConfigurationPaths(this.workdir).userPaths; // [local, json]
37
+ const checkPaths = [
38
+ { path: projectPaths[0], scope: "local" },
39
+ { path: projectPaths[1], scope: "project" },
40
+ { path: userPaths[0], scope: "user" }, // user local is still user scope
41
+ { path: userPaths[1], scope: "user" },
42
+ ];
43
+ for (const { path, scope } of checkPaths) {
44
+ const config = this.configurationService.loadWaveConfigFromFile(path);
45
+ if (config?.enabledPlugins && pluginId in config.enabledPlugins) {
46
+ return scope;
47
+ }
48
+ }
49
+ return null;
50
+ }
51
+ /**
52
+ * Remove a plugin from all scopes (user, project, local)
53
+ * This is useful when uninstalling a plugin to clean up all configuration
54
+ */
55
+ async removePluginFromAllScopes(pluginId) {
56
+ const scopes = ["user", "project", "local"];
57
+ for (const scope of scopes) {
58
+ try {
59
+ await this.configurationService.removeEnabledPlugin(this.workdir, scope, pluginId);
60
+ }
61
+ catch (error) {
62
+ // Continue removing from other scopes even if one fails
63
+ this.logger?.warn(`Failed to remove plugin ${pluginId} from ${scope} scope: ${error instanceof Error ? error.message : String(error)}`);
64
+ }
65
+ }
66
+ this.refreshPluginManager();
67
+ }
30
68
  /**
31
69
  * Refresh the plugin manager with the latest configuration
32
70
  * Note: This only updates the configuration, it doesn't reload plugins.
@@ -0,0 +1,39 @@
1
+ import { FileSnapshot } from "../types/reversion.js";
2
+ import { ReversionService } from "../services/reversionService.js";
3
+ export declare class ReversionManager {
4
+ private buffer;
5
+ private reversionService;
6
+ constructor(reversionService: ReversionService);
7
+ /**
8
+ * Records the current state of a file into a temporary buffer.
9
+ * Returns a snapshotId.
10
+ */
11
+ recordSnapshot(messageId: string, filePath: string, operation: "create" | "modify" | "delete"): Promise<string>;
12
+ /**
13
+ * Records the current state of a file into a temporary buffer.
14
+ * Returns a snapshotId.
15
+ */
16
+ recordSnapshotWithId(messageId: string, filePath: string, operation: "create" | "modify" | "delete"): Promise<string>;
17
+ /**
18
+ * Moves the buffered snapshot to the permanent session log.
19
+ * Called only if the tool succeeds.
20
+ */
21
+ commitSnapshot(snapshotId: string): Promise<void>;
22
+ private committedSnapshots;
23
+ /**
24
+ * Gets and clears committed snapshots for the current turn.
25
+ */
26
+ getAndClearCommittedSnapshots(): FileSnapshot[];
27
+ /**
28
+ * Discards the buffered snapshot.
29
+ * Called if the tool fails.
30
+ */
31
+ discardSnapshot(snapshotId: string): void;
32
+ /**
33
+ * Reverts all file changes associated with messages from the end of history
34
+ * down to (and including) the specified message index.
35
+ * This should be called by MessageManager.
36
+ */
37
+ revertTo(messageIds: string[], allMessages: import("../types/index.js").Message[]): Promise<number>;
38
+ }
39
+ //# sourceMappingURL=reversionManager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reversionManager.d.ts","sourceRoot":"","sources":["../../src/managers/reversionManager.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAEnE,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,MAAM,CAAwC;IACtD,OAAO,CAAC,gBAAgB,CAAmB;gBAE/B,gBAAgB,EAAE,gBAAgB;IAI9C;;;OAGG;IACG,cAAc,CAClB,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,QAAQ,GAAG,QAAQ,GAAG,QAAQ,GACxC,OAAO,CAAC,MAAM,CAAC;IAuBlB;;;OAGG;IACG,oBAAoB,CACxB,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,QAAQ,GAAG,QAAQ,GAAG,QAAQ,GACxC,OAAO,CAAC,MAAM,CAAC;IAIlB;;;OAGG;IACG,cAAc,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAoBvD,OAAO,CAAC,kBAAkB,CAAsB;IAEhD;;OAEG;IACH,6BAA6B,IAAI,YAAY,EAAE;IAM/C;;;OAGG;IACH,eAAe,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI;IAIzC;;;;OAIG;IACG,QAAQ,CACZ,UAAU,EAAE,MAAM,EAAE,EACpB,WAAW,EAAE,OAAO,mBAAmB,EAAE,OAAO,EAAE,GACjD,OAAO,CAAC,MAAM,CAAC;CA6CnB"}
@@ -0,0 +1,118 @@
1
+ import fs from "fs/promises";
2
+ export class ReversionManager {
3
+ constructor(reversionService) {
4
+ this.buffer = new Map();
5
+ this.committedSnapshots = [];
6
+ this.reversionService = reversionService;
7
+ }
8
+ /**
9
+ * Records the current state of a file into a temporary buffer.
10
+ * Returns a snapshotId.
11
+ */
12
+ async recordSnapshot(messageId, filePath, operation) {
13
+ let content = null;
14
+ try {
15
+ content = await fs.readFile(filePath, "utf-8");
16
+ }
17
+ catch {
18
+ // File doesn't exist, which is expected for 'create' operation
19
+ }
20
+ const snapshot = {
21
+ messageId,
22
+ filePath,
23
+ timestamp: Date.now(),
24
+ operation,
25
+ };
26
+ // We temporarily store the content in the buffer, it will be saved to disk on commit
27
+ const snapshotId = `${messageId}-${filePath}-${snapshot.timestamp}`;
28
+ this.buffer.set(snapshotId, { ...snapshot, content });
29
+ return snapshotId;
30
+ }
31
+ /**
32
+ * Records the current state of a file into a temporary buffer.
33
+ * Returns a snapshotId.
34
+ */
35
+ async recordSnapshotWithId(messageId, filePath, operation) {
36
+ return this.recordSnapshot(messageId, filePath, operation);
37
+ }
38
+ /**
39
+ * Moves the buffered snapshot to the permanent session log.
40
+ * Called only if the tool succeeds.
41
+ */
42
+ async commitSnapshot(snapshotId) {
43
+ const snapshotWithContent = this.buffer.get(snapshotId);
44
+ if (snapshotWithContent) {
45
+ const { content, ...snapshot } = snapshotWithContent;
46
+ const snapshotPath = await this.reversionService.saveSnapshot({
47
+ ...snapshot,
48
+ content,
49
+ });
50
+ snapshot.snapshotPath = snapshotPath;
51
+ this.buffer.delete(snapshotId);
52
+ // We need to return the snapshot so it can be added to the message block
53
+ // But the current API doesn't support it.
54
+ // Let's store committed snapshots in another buffer for the current turn.
55
+ this.committedSnapshots.push(snapshot);
56
+ }
57
+ }
58
+ /**
59
+ * Gets and clears committed snapshots for the current turn.
60
+ */
61
+ getAndClearCommittedSnapshots() {
62
+ const snapshots = [...this.committedSnapshots];
63
+ this.committedSnapshots = [];
64
+ return snapshots;
65
+ }
66
+ /**
67
+ * Discards the buffered snapshot.
68
+ * Called if the tool fails.
69
+ */
70
+ discardSnapshot(snapshotId) {
71
+ this.buffer.delete(snapshotId);
72
+ }
73
+ /**
74
+ * Reverts all file changes associated with messages from the end of history
75
+ * down to (and including) the specified message index.
76
+ * This should be called by MessageManager.
77
+ */
78
+ async revertTo(messageIds, allMessages) {
79
+ const messageIdSet = new Set(messageIds);
80
+ const snapshots = [];
81
+ for (const message of allMessages) {
82
+ if (message.id && messageIdSet.has(message.id)) {
83
+ const historyBlock = message.blocks.find((b) => b.type === "file_history");
84
+ if (historyBlock && historyBlock.snapshots) {
85
+ snapshots.push(...historyBlock.snapshots);
86
+ }
87
+ }
88
+ }
89
+ // Revert in reverse chronological order (LIFO)
90
+ const sortedSnapshots = snapshots.sort((a, b) => b.timestamp - a.timestamp);
91
+ let revertedCount = 0;
92
+ for (const snapshot of sortedSnapshots) {
93
+ try {
94
+ if (!snapshot.snapshotPath) {
95
+ // File didn't exist before, so delete it
96
+ await fs.rm(snapshot.filePath, { force: true });
97
+ }
98
+ else {
99
+ // Restore previous content
100
+ const content = await this.reversionService.readSnapshotContent(snapshot.snapshotPath);
101
+ if (content !== null) {
102
+ await fs.writeFile(snapshot.filePath, content, "utf-8");
103
+ }
104
+ else {
105
+ // If snapshotPath exists but content is null, it means the file should be deleted
106
+ // (This handles the case where snapshotPath was set but content was null in saveSnapshot)
107
+ await fs.rm(snapshot.filePath, { force: true });
108
+ }
109
+ }
110
+ revertedCount++;
111
+ }
112
+ catch (error) {
113
+ console.error(`Failed to revert file ${snapshot.filePath}:`, error);
114
+ }
115
+ }
116
+ return revertedCount;
117
+ }
118
+ }
@@ -1,9 +1,11 @@
1
1
  import type { MessageManager } from "./messageManager.js";
2
2
  import type { AIManager } from "./aiManager.js";
3
+ import type { BackgroundTaskManager } from "./backgroundTaskManager.js";
3
4
  import type { SlashCommand, CustomSlashCommand, Logger } from "../types/index.js";
4
5
  export interface SlashCommandManagerOptions {
5
6
  messageManager: MessageManager;
6
7
  aiManager: AIManager;
8
+ backgroundTaskManager: BackgroundTaskManager;
7
9
  workdir: string;
8
10
  logger?: Logger;
9
11
  }
@@ -12,6 +14,7 @@ export declare class SlashCommandManager {
12
14
  private customCommands;
13
15
  private messageManager;
14
16
  private aiManager;
17
+ private backgroundTaskManager;
15
18
  private workdir;
16
19
  private logger?;
17
20
  constructor(options: SlashCommandManagerOptions);
@@ -31,7 +34,7 @@ export declare class SlashCommandManager {
31
34
  /**
32
35
  * Register new command
33
36
  */
34
- private registerCommand;
37
+ registerCommand(command: SlashCommand): void;
35
38
  /**
36
39
  * Unregister command
37
40
  */
@@ -1 +1 @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AAyB;IAiCjC;;OAEG;IACH,OAAO,CAAC,kBAAkB;IAyD1B;;OAEG;IACI,sBAAsB,CAC3B,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,kBAAkB,EAAE,GAC7B,IAAI;IAwDP;;OAEG;IACI,oBAAoB,IAAI,IAAI;IAWnC;;OAEG;IACI,eAAe,CAAC,OAAO,EAAE,YAAY,GAAG,IAAI;IAKnD;;OAEG;IACH,OAAO,CAAC,iBAAiB;IAIzB;;OAEG;IACI,WAAW,IAAI,YAAY,EAAE;IAIpC;;OAEG;IACI,UAAU,CAAC,SAAS,EAAE,MAAM,GAAG,YAAY,GAAG,SAAS;IAI9D;;OAEG;IACU,cAAc,CACzB,SAAS,EAAE,MAAM,EACjB,IAAI,CAAC,EAAE,MAAM,GACZ,OAAO,CAAC,OAAO,CAAC;IAenB;;;OAGG;IACI,4BAA4B,CAAC,KAAK,EAAE,MAAM,GAAG;QAClD,OAAO,EAAE,OAAO,CAAC;QACjB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,IAAI,CAAC,EAAE,MAAM,CAAC;KACf;IAeD;;OAEG;IACI,UAAU,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO;IAI7C;;OAEG;IACI,gBAAgB,CAAC,SAAS,EAAE,MAAM,GAAG,kBAAkB,GAAG,SAAS;IAI1E;;OAEG;IACI,iBAAiB,IAAI,kBAAkB,EAAE;IAIhD;;OAEG;YACW,+BAA+B;IA0E7C;;OAEG;IACI,mBAAmB,IAAI,IAAI;CAInC"}
@@ -11,6 +11,7 @@ export class SlashCommandManager {
11
11
  this.customCommands = new Map();
12
12
  this.messageManager = options.messageManager;
13
13
  this.aiManager = options.aiManager;
14
+ this.backgroundTaskManager = options.backgroundTaskManager;
14
15
  this.workdir = options.workdir;
15
16
  this.logger = options.logger;
16
17
  this.initializeBuiltinCommands();
@@ -64,13 +65,17 @@ export class SlashCommandManager {
64
65
  handler: async (args) => {
65
66
  // Substitute parameters in the command content
66
67
  let processedContent = command.content;
68
+ // Substitute $WAVE_PLUGIN_ROOT placeholder for plugin commands
69
+ if (command.pluginPath) {
70
+ processedContent = processedContent.replace(/\$WAVE_PLUGIN_ROOT/g, command.pluginPath);
71
+ }
67
72
  if (args) {
68
- if (hasParameterPlaceholders(command.content)) {
69
- processedContent = substituteCommandParameters(command.content, args);
73
+ if (hasParameterPlaceholders(processedContent)) {
74
+ processedContent = substituteCommandParameters(processedContent, args);
70
75
  }
71
76
  else {
72
77
  // If no placeholders, append arguments to the content
73
- processedContent = `${command.content.trim()} ${args}`;
78
+ processedContent = `${processedContent.trim()} ${args}`;
74
79
  }
75
80
  }
76
81
  await this.executeCustomCommandInMainAgent(command.name, processedContent, command.config, args);
@@ -102,13 +107,17 @@ export class SlashCommandManager {
102
107
  handler: async (args) => {
103
108
  // Substitute parameters in the command content
104
109
  let processedContent = command.content;
110
+ // Substitute $WAVE_PLUGIN_ROOT placeholder for plugin commands
111
+ if (command.pluginPath) {
112
+ processedContent = processedContent.replace(/\$WAVE_PLUGIN_ROOT/g, command.pluginPath);
113
+ }
105
114
  if (args) {
106
- if (hasParameterPlaceholders(command.content)) {
107
- processedContent = substituteCommandParameters(command.content, args);
115
+ if (hasParameterPlaceholders(processedContent)) {
116
+ processedContent = substituteCommandParameters(processedContent, args);
108
117
  }
109
118
  else {
110
119
  // If no placeholders, append arguments to the content
111
- processedContent = `${command.content.trim()} ${args}`;
120
+ processedContent = `${processedContent.trim()} ${args}`;
112
121
  }
113
122
  }
114
123
  await this.executeCustomCommandInMainAgent(namespacedName, processedContent, command.config, args);
@@ -134,6 +143,7 @@ export class SlashCommandManager {
134
143
  */
135
144
  registerCommand(command) {
136
145
  this.commands.set(command.id, command);
146
+ this.messageManager.triggerSlashCommandsChange(this.getCommands());
137
147
  }
138
148
  /**
139
149
  * Unregister command
@@ -1,3 +1,4 @@
1
+ import type { MemoryRuleManager } from "./MemoryRuleManager.js";
1
2
  import type { SubagentConfiguration } from "../utils/subagentParser.js";
2
3
  import type { Message, Logger, GatewayConfig, ModelConfig, Usage } from "../types/index.js";
3
4
  import type { SessionData } from "../services/session.js";
@@ -6,6 +7,7 @@ import { MessageManager } from "./messageManager.js";
6
7
  import { ToolManager } from "./toolManager.js";
7
8
  import { HookManager } from "./hookManager.js";
8
9
  import { UserMessageParams, type AgentToolBlockUpdateParams } from "../utils/messageOperations.js";
10
+ import { BackgroundTaskManager } from "./backgroundTaskManager.js";
9
11
  export interface SubagentManagerCallbacks {
10
12
  /** Triggered when subagent adds user message */
11
13
  onSubagentUserMessageAdded?: (subagentId: string, params: UserMessageParams) => void;
@@ -29,6 +31,7 @@ export interface SubagentInstance {
29
31
  status: "initializing" | "active" | "completed" | "error" | "aborted";
30
32
  messages: Message[];
31
33
  subagentType: string;
34
+ backgroundTaskId?: string;
32
35
  }
33
36
  export interface SubagentManagerOptions {
34
37
  workdir: string;
@@ -39,8 +42,11 @@ export interface SubagentManagerOptions {
39
42
  getGatewayConfig: () => GatewayConfig;
40
43
  getModelConfig: () => ModelConfig;
41
44
  getMaxInputTokens: () => number;
45
+ getLanguage: () => string | undefined;
42
46
  hookManager?: HookManager;
43
47
  onUsageAdded?: (usage: Usage) => void;
48
+ backgroundTaskManager?: BackgroundTaskManager;
49
+ memoryRuleManager?: MemoryRuleManager;
44
50
  }
45
51
  export declare class SubagentManager {
46
52
  private instances;
@@ -53,8 +59,11 @@ export declare class SubagentManager {
53
59
  private getGatewayConfig;
54
60
  private getModelConfig;
55
61
  private getMaxInputTokens;
62
+ private getLanguage;
56
63
  private hookManager?;
57
64
  private onUsageAdded?;
65
+ private backgroundTaskManager?;
66
+ private memoryRuleManager?;
58
67
  constructor(options: SubagentManagerOptions);
59
68
  /**
60
69
  * Initialize the SubagentManager by loading and caching configurations
@@ -79,14 +88,16 @@ export declare class SubagentManager {
79
88
  description: string;
80
89
  prompt: string;
81
90
  subagent_type: string;
82
- }): Promise<SubagentInstance>;
91
+ }, runInBackground?: boolean): Promise<SubagentInstance>;
83
92
  /**
84
93
  * Execute task using subagent instance
85
94
  *
86
95
  * IMPORTANT: This method automatically filters out the Task tool from allowedTools
87
96
  * to prevent subagents from spawning other subagents (infinite recursion protection)
88
97
  */
89
- executeTask(instance: SubagentInstance, prompt: string, abortSignal?: AbortSignal): Promise<string>;
98
+ executeTask(instance: SubagentInstance, prompt: string, abortSignal?: AbortSignal, runInBackground?: boolean): Promise<string>;
99
+ backgroundInstance(subagentId: string): Promise<string>;
100
+ private internalExecute;
90
101
  /**
91
102
  * Get instance by subagent ID
92
103
  */
@@ -1 +1 @@
1
- {"version":3,"file":"subagentManager.d.ts","sourceRoot":"","sources":["../../src/managers/subagentManager.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACxE,OAAO,KAAK,EACV,OAAO,EACP,MAAM,EACN,aAAa,EACb,WAAW,EACX,KAAK,EACN,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EACL,iBAAiB,EACjB,KAAK,0BAA0B,EAChC,MAAM,+BAA+B,CAAC;AAMvC,MAAM,WAAW,wBAAwB;IAEvC,gDAAgD;IAChD,0BAA0B,CAAC,EAAE,CAC3B,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,iBAAiB,KACtB,IAAI,CAAC;IACV,wDAAwD;IACxD,+BAA+B,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/D,0DAA0D;IAC1D,iCAAiC,CAAC,EAAE,CAClC,UAAU,EAAE,MAAM,EAClB,KAAK,EAAE,MAAM,EACb,WA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