wave-agent-sdk 0.14.1 → 0.14.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.
Files changed (78) hide show
  1. package/builtin/skills/settings/HOOKS.md +69 -0
  2. package/builtin/skills/settings/PLUGINS.md +171 -0
  3. package/builtin/skills/settings/SKILL.md +8 -3
  4. package/dist/agent.d.ts +2 -2
  5. package/dist/agent.d.ts.map +1 -1
  6. package/dist/agent.js +12 -3
  7. package/dist/managers/aiManager.d.ts +6 -6
  8. package/dist/managers/aiManager.d.ts.map +1 -1
  9. package/dist/managers/aiManager.js +122 -59
  10. package/dist/managers/backgroundTaskManager.d.ts.map +1 -1
  11. package/dist/managers/backgroundTaskManager.js +28 -18
  12. package/dist/managers/hookManager.d.ts +16 -1
  13. package/dist/managers/hookManager.d.ts.map +1 -1
  14. package/dist/managers/hookManager.js +97 -8
  15. package/dist/managers/messageManager.d.ts +19 -4
  16. package/dist/managers/messageManager.d.ts.map +1 -1
  17. package/dist/managers/messageManager.js +63 -18
  18. package/dist/prompts/index.d.ts +1 -1
  19. package/dist/prompts/index.d.ts.map +1 -1
  20. package/dist/prompts/index.js +1 -1
  21. package/dist/services/MarketplaceService.d.ts +0 -11
  22. package/dist/services/MarketplaceService.d.ts.map +1 -1
  23. package/dist/services/MarketplaceService.js +21 -89
  24. package/dist/services/aiService.d.ts +3 -3
  25. package/dist/services/aiService.d.ts.map +1 -1
  26. package/dist/services/aiService.js +7 -7
  27. package/dist/services/hook.d.ts.map +1 -1
  28. package/dist/services/hook.js +15 -0
  29. package/dist/services/initializationService.d.ts.map +1 -1
  30. package/dist/services/initializationService.js +24 -1
  31. package/dist/services/interactionService.js +1 -1
  32. package/dist/services/pluginLoader.d.ts +0 -6
  33. package/dist/services/pluginLoader.d.ts.map +1 -1
  34. package/dist/services/pluginLoader.js +14 -53
  35. package/dist/services/session.d.ts +1 -1
  36. package/dist/services/session.js +7 -7
  37. package/dist/services/taskManager.d.ts +1 -1
  38. package/dist/services/taskManager.js +1 -1
  39. package/dist/types/core.d.ts +1 -1
  40. package/dist/types/core.d.ts.map +1 -1
  41. package/dist/types/hooks.d.ts +9 -1
  42. package/dist/types/hooks.d.ts.map +1 -1
  43. package/dist/types/hooks.js +2 -0
  44. package/dist/types/marketplace.d.ts +1 -26
  45. package/dist/types/marketplace.d.ts.map +1 -1
  46. package/dist/types/messaging.d.ts +3 -3
  47. package/dist/types/messaging.d.ts.map +1 -1
  48. package/dist/types/plugins.d.ts +1 -13
  49. package/dist/types/plugins.d.ts.map +1 -1
  50. package/dist/utils/convertMessagesForAPI.d.ts +1 -1
  51. package/dist/utils/convertMessagesForAPI.js +7 -7
  52. package/dist/utils/groupMessagesByApiRound.d.ts +1 -1
  53. package/dist/utils/groupMessagesByApiRound.js +6 -6
  54. package/dist/utils/messageOperations.d.ts.map +1 -1
  55. package/dist/utils/messageOperations.js +3 -3
  56. package/package.json +1 -1
  57. package/src/agent.ts +16 -3
  58. package/src/managers/aiManager.ts +142 -63
  59. package/src/managers/backgroundTaskManager.ts +32 -22
  60. package/src/managers/hookManager.ts +125 -10
  61. package/src/managers/messageManager.ts +76 -22
  62. package/src/prompts/index.ts +1 -1
  63. package/src/services/MarketplaceService.ts +26 -127
  64. package/src/services/aiService.ts +11 -11
  65. package/src/services/hook.ts +17 -0
  66. package/src/services/initializationService.ts +33 -1
  67. package/src/services/interactionService.ts +1 -1
  68. package/src/services/pluginLoader.ts +14 -67
  69. package/src/services/session.ts +7 -7
  70. package/src/services/taskManager.ts +1 -1
  71. package/src/types/core.ts +1 -1
  72. package/src/types/hooks.ts +16 -2
  73. package/src/types/marketplace.ts +1 -24
  74. package/src/types/messaging.ts +3 -3
  75. package/src/types/plugins.ts +1 -13
  76. package/src/utils/convertMessagesForAPI.ts +8 -8
  77. package/src/utils/groupMessagesByApiRound.ts +6 -6
  78. package/src/utils/messageOperations.ts +3 -5
@@ -9,6 +9,7 @@ export class MessageManager {
9
9
  this.container = container;
10
10
  this.filesInContext = new Set(); // Track files mentioned in the conversation
11
11
  this.recentFileReads = new Map(); // Track file read contents
12
+ this.invokedSkills = new Map(); // Track invoked skill names
12
13
  this._usages = [];
13
14
  this.sessionId = generateSessionId();
14
15
  this.rootSessionId = this.sessionId;
@@ -152,11 +153,13 @@ export class MessageManager {
152
153
  for (const message of newMessages) {
153
154
  this.addPathsFromMessage(message);
154
155
  this.extractFileReadsFromMessage(message);
156
+ this.extractSkillInvocationsFromMessage(message);
155
157
  }
156
158
  // Also check if the last message was updated (common for tool blocks)
157
159
  if (messages.length > 0 && messages.length === oldLength) {
158
160
  this.addPathsFromMessage(messages[messages.length - 1]);
159
161
  this.extractFileReadsFromMessage(messages[messages.length - 1]);
162
+ this.extractSkillInvocationsFromMessage(messages[messages.length - 1]);
160
163
  }
161
164
  this.callbacks.onMessagesChange?.([...messages]);
162
165
  }
@@ -317,26 +320,26 @@ export class MessageManager {
317
320
  }
318
321
  }
319
322
  /**
320
- * Compress messages and update session, delete compressed messages, only keep compressed messages and last 3 messages
323
+ * Compact messages and update session, delete compacted messages, only keep compacted messages and last 3 messages
321
324
  */
322
- compressMessagesAndUpdateSession(compressedContent, usage) {
325
+ compactMessagesAndUpdateSession(compactedContent, usage) {
323
326
  // Get last 2 API rounds to preserve (structurally safe boundary)
324
327
  const lastThreeMessages = getLastApiRounds(this.messages, 2);
325
- // Create compressed message
326
- const compressMessage = {
328
+ // Create compacted message
329
+ const compactMessage = {
327
330
  id: generateMessageId(),
328
331
  role: "assistant",
329
332
  blocks: [
330
333
  {
331
- type: "compress",
332
- content: compressedContent,
334
+ type: "compact",
335
+ content: compactedContent,
333
336
  sessionId: this.sessionId,
334
337
  },
335
338
  ],
336
339
  ...(usage && { usage }),
337
340
  };
338
- // Build new message array: keep the compressed message and last 3 messages
339
- const newMessages = [compressMessage, ...lastThreeMessages];
341
+ // Build new message array: keep the compacted message and last 3 messages
342
+ const newMessages = [compactMessage, ...lastThreeMessages];
340
343
  // Update sessionId and parentSessionId
341
344
  const oldSessionId = this.sessionId;
342
345
  this.setSessionId(generateSessionId());
@@ -352,14 +355,14 @@ export class MessageManager {
352
355
  for (const message of this.messages) {
353
356
  this.addPathsFromMessage(message);
354
357
  }
355
- // Scan compressedContent for file mentions
358
+ // Scan compactedContent for file mentions
356
359
  const fileMentionRegex = /(?:^|\s)@([\w.\-/]+)/g;
357
360
  let match;
358
- while ((match = fileMentionRegex.exec(compressedContent)) !== null) {
361
+ while ((match = fileMentionRegex.exec(compactedContent)) !== null) {
359
362
  this.touchFile(match[1]);
360
363
  }
361
- // Trigger compression callback
362
- this.callbacks.onCompressBlockAdded?.(compressedContent);
364
+ // Trigger compaction callback
365
+ this.callbacks.onCompactBlockAdded?.(compactedContent);
363
366
  }
364
367
  addFileHistoryBlock(snapshots) {
365
368
  if (snapshots.length === 0)
@@ -597,7 +600,7 @@ export class MessageManager {
597
600
  // Find which session the index belongs to
598
601
  let targetSessionId = this.sessionId;
599
602
  let targetIndexInSession = index;
600
- // We need to be careful here because loadFullMessageThread might have removed "compress" blocks
603
+ // We need to be careful here because loadFullMessageThread might have removed "compact" blocks
601
604
  // Let's re-calculate based on the actual messages returned.
602
605
  // Actually, it's easier to just load sessions one by one again or keep track of counts.
603
606
  // For simplicity, let's assume we want to truncate the WHOLE thread.
@@ -615,15 +618,15 @@ export class MessageManager {
615
618
  if (!sessionData)
616
619
  continue;
617
620
  const sessionMessages = sessionData.messages;
618
- // If this is not the first session in the thread, it might have a compress block at the start
621
+ // If this is not the first session in the thread, it might have a compact block at the start
619
622
  // that was removed in getFullMessageThread.
620
- const hasCompressBlock = sessionMessages[0]?.blocks.some((b) => b.type === "compress");
621
- const effectiveMessages = hasCompressBlock && sid !== sessionIds[0]
623
+ const hasCompactBlock = sessionMessages[0]?.blocks.some((b) => b.type === "compact");
624
+ const effectiveMessages = hasCompactBlock && sid !== sessionIds[0]
622
625
  ? sessionMessages.slice(1)
623
626
  : sessionMessages;
624
627
  if (remainingIndex < effectiveMessages.length) {
625
628
  targetSessionId = sid;
626
- targetIndexInSession = hasCompressBlock
629
+ targetIndexInSession = hasCompactBlock
627
630
  ? remainingIndex + 1
628
631
  : remainingIndex;
629
632
  break;
@@ -653,7 +656,7 @@ export class MessageManager {
653
656
  await this.rewriteSessionFile(newMessagesInSession);
654
657
  // Update in-memory messages to the truncated session messages
655
658
  // We do NOT include ancestor messages here to avoid exceeding context limits.
656
- // The 'compress' block at the start of the session (if any) already summarizes them.
659
+ // The 'compact' block at the start of the session (if any) already summarizes them.
657
660
  this.setMessages(newMessagesInSession);
658
661
  // Update saved message count
659
662
  this.savedMessageCount = newMessagesInSession.length;
@@ -751,4 +754,46 @@ export class MessageManager {
751
754
  }
752
755
  return result;
753
756
  }
757
+ /**
758
+ * Extract skill invocations from tool blocks in a message.
759
+ */
760
+ extractSkillInvocationsFromMessage(message) {
761
+ for (const block of message.blocks) {
762
+ if (block.type === "tool" &&
763
+ block.name === "Skill" &&
764
+ block.stage === "end" &&
765
+ block.parameters) {
766
+ try {
767
+ const params = JSON.parse(block.parameters);
768
+ const skillName = params.skill_name;
769
+ if (skillName) {
770
+ this.invokedSkills.set(skillName, {
771
+ skillName,
772
+ timestamp: Date.now(),
773
+ });
774
+ }
775
+ }
776
+ catch {
777
+ // Ignore parse errors
778
+ }
779
+ }
780
+ }
781
+ }
782
+ /**
783
+ * Get recently invoked skill names, sorted by timestamp (newest first).
784
+ * @param maxSkills - Maximum number of skills to return
785
+ * @returns Array of skill names sorted by recency
786
+ */
787
+ getInvokedSkillNames(maxSkills = 10) {
788
+ const sorted = Array.from(this.invokedSkills.entries())
789
+ .sort(([, a], [, b]) => b.timestamp - a.timestamp)
790
+ .slice(0, maxSkills);
791
+ return sorted.map(([, { skillName }]) => skillName);
792
+ }
793
+ /**
794
+ * Clear all invoked skills (e.g., after compaction).
795
+ */
796
+ clearInvokedSkills() {
797
+ this.invokedSkills.clear();
798
+ }
754
799
  }
@@ -12,7 +12,7 @@ export declare const OUTPUT_EFFICIENCY_PROMPT = "# Output efficiency\n\nIMPORTAN
12
12
  export declare const TONE_AND_STYLE_PROMPT = "# Tone and style\n\n- Only use emojis if the user explicitly requests it. Avoid using emojis in all communication unless asked.\n- Your responses should be short and concise.\n- When referencing specific functions or pieces of code include the pattern file_path:line_number to allow the user to easily navigate to the source code location.\n- When referencing GitHub issues or pull requests, use the owner/repo#123 format (e.g. anthropics/claude-code#100) so they render as clickable links.\n- Do not use a colon before tool calls. Your tool calls may not be shown directly in the output, so text like \"Let me read the file:\" followed by a read tool call should just be \"Let me read the file.\" with a period.";
13
13
  export declare function buildPlanModePrompt(planFilePath: string, planExists: boolean, isSubagent?: boolean): string;
14
14
  export declare const DEFAULT_SYSTEM_PROMPT = "You are an interactive CLI tool that helps users with software engineering tasks. Use the instructions below and the tools available to you to assist the user.";
15
- export declare const COMPRESS_MESSAGES_SYSTEM_PROMPT = "You are continuing work on a software engineering task. Write a detailed continuation summary that will allow you (or another instance of yourself) to resume work efficiently in a future context window where the conversation history will be replaced with this summary.\n\nFirst, write your analysis in <analysis> tags as a thinking scratchpad:\n- Chronologically review the conversation\n- Identify user intents and goals\n- Note files read/modified, approaches tried, decisions made\n- Check for accuracy and completeness \u2014 ensure nothing critical is missing\n\nThen produce a structured summary in <summary> tags with these sections:\n\n## Primary Request and Intent\n- The user's core request and success criteria\n- Clarifications, constraints, or scope changes\n\n## Key Technical Concepts\n- Frameworks, libraries, patterns, architectural decisions\n\n## Files and Code Sections\n- Files read, modified, created (with full paths)\n- Critical code snippets (function signatures, bug fixes, key logic)\n- Focus on recent messages \u2014 include full code for important sections\n\n## Errors and Fixes\n- Errors encountered, root causes, how they were resolved\n- Approaches tried that didn't work and why\n\n## Problem Solving\n- Approach evolution, trade-offs considered, decisions made\n\n## All User Messages\n- Complete list of all user messages (non-tool content)\n- Preserve exact wording where load-bearing\n\n## Pending Tasks\n- Outstanding work, TODOs, unresolved questions\n\n## Current Work\n- What was being worked on at the time of summarization\n- Exact state of in-progress changes\n\n## Optional Next Step\n- Immediate next action needed\n- Include verbatim quotes from recent conversation if relevant\n\nBe concise but complete \u2014 include information that prevents duplicate work or repeated mistakes.\nRespond with text only. Do NOT call any tools.\nWrap your summary in <summary></summary> tags.";
15
+ export declare const COMPACT_MESSAGES_SYSTEM_PROMPT = "You are continuing work on a software engineering task. Write a detailed continuation summary that will allow you (or another instance of yourself) to resume work efficiently in a future context window where the conversation history will be replaced with this summary.\n\nFirst, write your analysis in <analysis> tags as a thinking scratchpad:\n- Chronologically review the conversation\n- Identify user intents and goals\n- Note files read/modified, approaches tried, decisions made\n- Check for accuracy and completeness \u2014 ensure nothing critical is missing\n\nThen produce a structured summary in <summary> tags with these sections:\n\n## Primary Request and Intent\n- The user's core request and success criteria\n- Clarifications, constraints, or scope changes\n\n## Key Technical Concepts\n- Frameworks, libraries, patterns, architectural decisions\n\n## Files and Code Sections\n- Files read, modified, created (with full paths)\n- Critical code snippets (function signatures, bug fixes, key logic)\n- Focus on recent messages \u2014 include full code for important sections\n\n## Errors and Fixes\n- Errors encountered, root causes, how they were resolved\n- Approaches tried that didn't work and why\n\n## Problem Solving\n- Approach evolution, trade-offs considered, decisions made\n\n## All User Messages\n- Complete list of all user messages (non-tool content)\n- Preserve exact wording where load-bearing\n\n## Pending Tasks\n- Outstanding work, TODOs, unresolved questions\n\n## Current Work\n- What was being worked on at the time of summarization\n- Exact state of in-progress changes\n\n## Optional Next Step\n- Immediate next action needed\n- Include verbatim quotes from recent conversation if relevant\n\nBe concise but complete \u2014 include information that prevents duplicate work or repeated mistakes.\nRespond with text only. Do NOT call any tools.\nWrap your summary in <summary></summary> tags.";
16
16
  export declare const WEB_CONTENT_SYSTEM_PROMPT = "You are a helpful assistant that extracts information from web content. The content is provided in Markdown format.";
17
17
  export declare const BTW_SYSTEM_PROMPT = "You are a helpful assistant. Answer the user's side question based on the conversation history. \nDo NOT say things like \"Let me try...\", \"I'll now...\", \"Let me check...\", or promise to take any action. \nIf you don't know the answer, say so - do not offer to look it up or investigate. \nSimply answer the question with the information you have.";
18
18
  export declare function buildSystemPrompt(basePrompt: string | undefined, tools: ToolPlugin[], options?: {
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/prompts/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAG/C,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAiBzD,eAAO,MAAM,uBAAuB,IAAI,CAAC;AAEzC,eAAO,MAAM,kBAAkB,oKAAoK,CAAC;AAEpM,eAAO,MAAM,kBAAkB,opIAcqQ,CAAC;AAErS,eAAO,MAAM,wBAAwB,25DASqmB,CAAC;AAE3oB,eAAO,MAAM,WAAW,knDAYqH,CAAC;AAE9I;;GAEG;AACH,eAAO,MAAM,wBAAwB,+uBAWiH,CAAC;AAEvJ,eAAO,MAAM,qBAAqB,6sBAMuL,CAAC;AAE1N,wBAAgB,mBAAmB,CACjC,YAAY,EAAE,MAAM,EACpB,UAAU,EAAE,OAAO,EACnB,UAAU,GAAE,OAAe,GAC1B,MAAM,CAmFR;AAED,eAAO,MAAM,qBAAqB,oKAAqB,CAAC;AAExD,eAAO,MAAM,+BAA+B,44DA8CG,CAAC;AAEhD,eAAO,MAAM,yBAAyB,wHAAwH,CAAC;AAC/J,eAAO,MAAM,iBAAiB,qWAG4B,CAAC;AAE3D,wBAAgB,iBAAiB,CAC/B,UAAU,EAAE,MAAM,GAAG,SAAS,EAC9B,KAAK,EAAE,UAAU,EAAE,EACnB,OAAO,GAAE;IACP,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE;QACT,YAAY,EAAE,MAAM,CAAC;QACrB,UAAU,EAAE,OAAO,CAAC;KACr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AAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE;QACT,YAAY,EAAE,MAAM,CAAC;QACrB,UAAU,EAAE,OAAO,CAAC;KACrB,CAAC;IACF,UAAU,CAAC,EAAE;QACX,SAAS,EAAE,MAAM,CAAC;QAClB,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC;IACF,cAAc,CAAC,EAAE,cAAc,CAAC;CAC5B,GACL,MAAM,CA+DR;AAED,wBAAgB,iCAAiC,CAC/C,oBAAoB,EAAE,MAAM,EAC5B,OAAO,EAAE,MAAM,GACd,MAAM,CAgCR"}
@@ -148,7 +148,7 @@ This is critical - your turn should only end with either using the ${ASK_USER_QU
148
148
  NOTE: At any point in time through this workflow you should feel free to ask the user questions or clarifications using the ${ASK_USER_QUESTION_TOOL_NAME} tool. Don't make large assumptions about user intent. The goal is to present a well researched plan to the user, and tie any loose ends before implementation begins.`;
149
149
  }
150
150
  export const DEFAULT_SYSTEM_PROMPT = BASE_SYSTEM_PROMPT;
151
- export const COMPRESS_MESSAGES_SYSTEM_PROMPT = `You are continuing work on a software engineering task. Write a detailed continuation summary that will allow you (or another instance of yourself) to resume work efficiently in a future context window where the conversation history will be replaced with this summary.
151
+ export const COMPACT_MESSAGES_SYSTEM_PROMPT = `You are continuing work on a software engineering task. Write a detailed continuation summary that will allow you (or another instance of yourself) to resume work efficiently in a future context window where the conversation history will be replaced with this summary.
152
152
 
153
153
  First, write your analysis in <analysis> tags as a thinking scratchpad:
154
154
  - Chronologically review the conversation
@@ -69,12 +69,6 @@ export declare class MarketplaceService {
69
69
  * Saves the installed plugins registry
70
70
  */
71
71
  saveInstalledPlugins(registry: InstalledPluginsRegistry): Promise<void>;
72
- /**
73
- * Finds the first existing marketplace manifest path.
74
- * Prefers .wave-plugin/ for backward compatibility, falls back to .claude-plugin/.
75
- * Returns null if neither exists.
76
- */
77
- private findMarketplaceManifestPath;
78
72
  /**
79
73
  * Loads a marketplace manifest from a local path
80
74
  */
@@ -117,11 +111,6 @@ export declare class MarketplaceService {
117
111
  * Toggles auto-update for a marketplace
118
112
  */
119
113
  toggleAutoUpdate(name: string, enabled: boolean): Promise<void>;
120
- /**
121
- * Resolves a plugin source into a consistent format for installation.
122
- * Handles both string sources (local paths or git URLs) and object-style MarketplaceSource.
123
- */
124
- private resolvePluginSource;
125
114
  /**
126
115
  * Installs a plugin from a marketplace
127
116
  */
@@ -1 +1 @@
1
- {"version":3,"file":"MarketplaceService.d.ts","sourceRoot":"","sources":["../../src/services/MarketplaceService.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,gBAAgB,EAChB,yBAAyB,EACzB,eAAe,EACf,wBAAwB,EACxB,mBAAmB,EAEnB,iBAAiB,EAClB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,KAAK,EAAqB,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAE1E;;;;;;;;GAQG;AACH,qBAAa,kBAAkB;IAC7B,OAAO,CAAC,MAAM,CAAC,iBAAiB,CAAS;IACzC,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,CAAC,qBAAqB,CAAS;IACtC,OAAO,CAAC,oBAAoB,CAAS;IACrC,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,eAAe,CAAS;IAChC,OAAO,CAAC,UAAU,CAAa;IAC/B,OAAO,CAAC,oBAAoB,CAAuB;IACnD,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,mBAAmB,CAOzC;gBAGA,OAAO,GAAE,MAAsB,EAC/B,oBAAoB,GAAE,oBAAiD;IAuBzE;;OAEG;IACH,OAAO,CAAC,wBAAwB;IAUhC;;;OAGG;YACW,YAAY;IAkC1B;;;OAGG;YACW,W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AuBpC;;OAEG;IACG,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IA6BrE;;OAEG;IACG,aAAa,CACjB,mBAAmB,EAAE,MAAM,EAC3B,WAAW,CAAC,EAAE,MAAM,GACnB,OAAO,CAAC,eAAe,CAAC;IA8H3B;;OAEG;IACG,eAAe,CACnB,mBAAmB,EAAE,MAAM,EAC3B,WAAW,CAAC,EAAE,MAAM,GACnB,OAAO,CAAC,IAAI,CAAC;IAoChB;;OAEG;IACG,YAAY,CAAC,mBAAmB,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC;CAM1E"}
@@ -4,6 +4,7 @@ import * as crypto from "crypto";
4
4
  import { getPluginsDir } from "../utils/configPaths.js";
5
5
  import { GitService } from "./GitService.js";
6
6
  import { ConfigurationService } from "./configurationService.js";
7
+ import { logger } from "../utils/globalLogger.js";
7
8
  /**
8
9
  * Marketplace Service
9
10
  *
@@ -243,29 +244,13 @@ export class MarketplaceService {
243
244
  await fs.writeFile(tmpPath, JSON.stringify(registry, null, 2));
244
245
  await fs.rename(tmpPath, this.installedPluginsPath);
245
246
  }
246
- /**
247
- * Finds the first existing marketplace manifest path.
248
- * Prefers .wave-plugin/ for backward compatibility, falls back to .claude-plugin/.
249
- * Returns null if neither exists.
250
- */
251
- async findMarketplaceManifestPath(dir) {
252
- const waveManifestPath = path.join(dir, ".wave-plugin", "marketplace.json");
253
- const claudeManifestPath = path.join(dir, ".claude-plugin", "marketplace.json");
254
- if (existsSync(waveManifestPath)) {
255
- return waveManifestPath;
256
- }
257
- if (existsSync(claudeManifestPath)) {
258
- return claudeManifestPath;
259
- }
260
- return null;
261
- }
262
247
  /**
263
248
  * Loads a marketplace manifest from a local path
264
249
  */
265
250
  async loadMarketplaceManifest(marketplacePath) {
266
- const manifestPath = await this.findMarketplaceManifestPath(marketplacePath);
267
- if (!manifestPath) {
268
- throw new Error(`Marketplace manifest not found at ${marketplacePath}. Neither .wave-plugin/marketplace.json nor .claude-plugin/marketplace.json exists.`);
251
+ const manifestPath = path.join(marketplacePath, ".wave-plugin", "marketplace.json");
252
+ if (!existsSync(manifestPath)) {
253
+ throw new Error(`Marketplace manifest not found at ${manifestPath}`);
269
254
  }
270
255
  const content = await fs.readFile(manifestPath, "utf-8");
271
256
  const manifest = JSON.parse(content);
@@ -494,7 +479,7 @@ export class MarketplaceService {
494
479
  for (const plugin of pluginsToUpdate) {
495
480
  const pluginEntry = manifest.plugins.find((p) => p.name === plugin.name);
496
481
  if (!pluginEntry) {
497
- console.warn(`Plugin "${plugin.name}" no longer found in marketplace "${marketplace.name}". Uninstalling...`);
482
+ logger.warn(`Plugin "${plugin.name}" no longer found in marketplace "${marketplace.name}". Uninstalling...`);
498
483
  try {
499
484
  await this.uninstallPlugin(`${plugin.name}@${plugin.marketplace}`, plugin.projectPath);
500
485
  }
@@ -564,59 +549,6 @@ export class MarketplaceService {
564
549
  await this.updateCacheMarketplace(name, { autoUpdate: enabled });
565
550
  });
566
551
  }
567
- /**
568
- * Resolves a plugin source into a consistent format for installation.
569
- * Handles both string sources (local paths or git URLs) and object-style MarketplaceSource.
570
- */
571
- resolvePluginSource(pluginEntry, marketplacePath) {
572
- const { source } = pluginEntry;
573
- if (typeof source === "string") {
574
- // String source: could be a git URL or a relative local path
575
- const isGitUrl = source.startsWith("http://") ||
576
- source.startsWith("https://") ||
577
- source.startsWith("git@") ||
578
- source.startsWith("ssh://");
579
- if (isGitUrl) {
580
- let url = source;
581
- let ref;
582
- if (url.includes("#")) {
583
- [url, ref] = url.split("#");
584
- }
585
- return { isGit: true, url, ref, localPath: "" };
586
- }
587
- // Relative local path
588
- return { isGit: false, localPath: path.resolve(marketplacePath, source) };
589
- }
590
- // Object-style source
591
- if (source.source === "git") {
592
- return { isGit: true, url: source.url, ref: source.ref, localPath: "" };
593
- }
594
- if (source.source === "github") {
595
- return {
596
- isGit: true,
597
- url: `https://github.com/${source.repo}.git`,
598
- ref: source.ref,
599
- localPath: "",
600
- };
601
- }
602
- if (source.source === "url") {
603
- let url = source.url;
604
- let ref = source.ref;
605
- if (url.includes("#")) {
606
- [url, ref] = url.split("#");
607
- }
608
- return { isGit: true, url, ref, localPath: "" };
609
- }
610
- if (source.source === "directory") {
611
- return {
612
- isGit: false,
613
- localPath: path.resolve(marketplacePath, source.path),
614
- };
615
- }
616
- // Exhaustiveness: this should be unreachable given the union type
617
- const _exhaustive = source;
618
- throw new Error(`Unsupported plugin source type: ${_exhaustive.source}`);
619
- }
620
552
  /**
621
553
  * Installs a plugin from a marketplace
622
554
  */
@@ -637,36 +569,36 @@ export class MarketplaceService {
637
569
  if (!pluginEntry) {
638
570
  throw new Error(`Plugin ${pluginName} not found in marketplace ${marketplaceName}`);
639
571
  }
640
- const resolved = this.resolvePluginSource(pluginEntry, marketplacePath);
572
+ const isGitSource = pluginEntry.source.startsWith("http://") ||
573
+ pluginEntry.source.startsWith("https://") ||
574
+ pluginEntry.source.startsWith("git@") ||
575
+ pluginEntry.source.startsWith("ssh://");
641
576
  let pluginSrcPath;
642
577
  let tempCloneDir;
643
578
  try {
644
- if (resolved.isGit) {
579
+ if (isGitSource) {
645
580
  tempCloneDir = path.join(this.tmpDir, `clone-${Date.now()}`);
646
- await this.gitService.clone(resolved.url, tempCloneDir, resolved.ref);
581
+ let url = pluginEntry.source;
582
+ let ref;
583
+ if (url.includes("#")) {
584
+ [url, ref] = url.split("#");
585
+ }
586
+ await this.gitService.clone(url, tempCloneDir, ref);
647
587
  pluginSrcPath = tempCloneDir;
648
588
  }
649
589
  else {
650
- pluginSrcPath = resolved.localPath;
651
- }
652
- let pluginManifestPath;
653
- const wavePluginPath = path.join(pluginSrcPath, ".wave-plugin", "plugin.json");
654
- const claudePluginPath = path.join(pluginSrcPath, ".claude-plugin", "plugin.json");
655
- if (existsSync(wavePluginPath)) {
656
- pluginManifestPath = wavePluginPath;
657
- }
658
- else if (existsSync(claudePluginPath)) {
659
- pluginManifestPath = claudePluginPath;
590
+ pluginSrcPath = path.resolve(marketplacePath, pluginEntry.source);
660
591
  }
661
- if (!pluginManifestPath) {
662
- throw new Error(`Plugin manifest not found at ${pluginSrcPath}. Neither .wave-plugin/plugin.json nor .claude-plugin/plugin.json exists.`);
592
+ const pluginManifestPath = path.join(pluginSrcPath, ".wave-plugin", "plugin.json");
593
+ if (!existsSync(pluginManifestPath)) {
594
+ throw new Error(`Plugin manifest not found at ${pluginManifestPath}`);
663
595
  }
664
596
  const pluginManifestContent = await fs.readFile(pluginManifestPath, "utf-8");
665
597
  const pluginManifest = JSON.parse(pluginManifestContent);
666
598
  const version = pluginManifest.version || "1.0.0";
667
599
  const tmpPluginDir = path.join(this.tmpDir, `${pluginName}-${Date.now()}`);
668
600
  try {
669
- if (resolved.isGit) {
601
+ if (isGitSource) {
670
602
  await fs.rename(pluginSrcPath, tmpPluginDir);
671
603
  tempCloneDir = undefined;
672
604
  }
@@ -37,14 +37,14 @@ export interface CallAgentResult {
37
37
  additionalFields?: Record<string, unknown>;
38
38
  }
39
39
  export declare function callAgent(options: CallAgentOptions): Promise<CallAgentResult>;
40
- export interface CompressMessagesOptions {
40
+ export interface CompactMessagesOptions {
41
41
  gatewayConfig: GatewayConfig;
42
42
  modelConfig: ModelConfig;
43
43
  messages: ChatCompletionMessageParam[];
44
44
  abortSignal?: AbortSignal;
45
45
  model?: string;
46
46
  }
47
- export interface CompressMessagesResult {
47
+ export interface CompactMessagesResult {
48
48
  content: string;
49
49
  usage?: {
50
50
  prompt_tokens: number;
@@ -52,7 +52,7 @@ export interface CompressMessagesResult {
52
52
  total_tokens: number;
53
53
  };
54
54
  }
55
- export declare function compressMessages(options: CompressMessagesOptions): Promise<CompressMessagesResult>;
55
+ export declare function compactMessages(options: CompactMessagesOptions): Promise<CompactMessagesResult>;
56
56
  export interface ProcessWebContentOptions {
57
57
  gatewayConfig: GatewayConfig;
58
58
  modelConfig: ModelConfig;
@@ -1 +1 @@
1
- {"version":3,"file":"aiService.d.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AM,CAAC;QACtB,iBAAiB,EAAE,MAAM,CAAC;QAC1B,YAAY,EAAE,MAAM,CAAC;KACtB,CAAC;CACH;AAED,wBAAsB,GAAG,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,SAAS,CAAC,CAuFjE"}
@@ -5,7 +5,7 @@ import { transformMessagesForClaudeCache, addCacheControlToLastTool, supportsPro
5
5
  import * as os from "os";
6
6
  import * as fs from "fs";
7
7
  import * as path from "path";
8
- import { COMPRESS_MESSAGES_SYSTEM_PROMPT, WEB_CONTENT_SYSTEM_PROMPT, BTW_SYSTEM_PROMPT, } from "../prompts/index.js";
8
+ import { COMPACT_MESSAGES_SYSTEM_PROMPT, WEB_CONTENT_SYSTEM_PROMPT, BTW_SYSTEM_PROMPT, } from "../prompts/index.js";
9
9
  // Global rate limiter state for 1 QPS
10
10
  let nextAllowedTime = 0;
11
11
  const MIN_INTERVAL = 1000; // 1 second for 1 QPS
@@ -450,7 +450,7 @@ async function processStreamingResponse(stream, onContentUpdate, onToolUpdate, o
450
450
  }
451
451
  return result;
452
452
  }
453
- export async function compressMessages(options) {
453
+ export async function compactMessages(options) {
454
454
  const { gatewayConfig, modelConfig, messages, abortSignal } = options;
455
455
  // Apply global 1 QPS rate limit
456
456
  if (process.env.NODE_ENV !== "test" ||
@@ -492,7 +492,7 @@ export async function compressMessages(options) {
492
492
  messages: [
493
493
  {
494
494
  role: "system",
495
- content: COMPRESS_MESSAGES_SYSTEM_PROMPT,
495
+ content: COMPACT_MESSAGES_SYSTEM_PROMPT,
496
496
  },
497
497
  ...cleanedMessages,
498
498
  {
@@ -505,7 +505,7 @@ export async function compressMessages(options) {
505
505
  });
506
506
  const content = response.choices[0]?.message?.content?.trim();
507
507
  if (!content) {
508
- throw new Error("Failed to compress conversation history: Empty response from AI");
508
+ throw new Error("Failed to compact conversation history: Empty response from AI");
509
509
  }
510
510
  const usage = response.usage
511
511
  ? {
@@ -521,10 +521,10 @@ export async function compressMessages(options) {
521
521
  }
522
522
  catch (error) {
523
523
  if (error.name === "AbortError") {
524
- logger.info("Compression request was aborted");
525
- throw new Error("Compression request was aborted");
524
+ logger.info("Compaction request was aborted");
525
+ throw new Error("Compaction request was aborted");
526
526
  }
527
- logger.error("Failed to compress messages:", error);
527
+ logger.error("Failed to compact messages:", error);
528
528
  throw error;
529
529
  }
530
530
  }
@@ -1 +1 @@
1
- {"version":3,"file":"hook.d.ts","sourceRoot":"","sources":["../../src/services/hook.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EACL,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EACzB,KAAK,4BAA4B,EAElC,MAAM,mBAAmB,CAAC;AA0E3B;;GAEG;AACH,wBAAsB,cAAc,CAClC,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,oBAAoB,GAAG,4BAA4B,EAC5D,OAAO,CAAC,EAAE,oBAAoB,GAC7B,OAAO,CAAC,mBAAmB,CAAC,CA6I9B;AAED;;GAEG;AACH,wBAAsB,eAAe,CACnC,QAAQ,EAAE,MAAM,EAAE,EAClB,OAAO,EAAE,oBAAoB,GAAG,4BAA4B,EAC5D,OAAO,CAAC,EAAE,oBAAoB,GAC7B,OAAO,CAAC,mBAAmB,EAAE,CAAC,CAchC;AAED;;GAEG;AACH,wBAAsB,sBAAsB,CAC1C,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,4BAA4B,GACpC,OAAO,CAAC,mBAAmB,EAAE,CAAC,CAMhC;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAsBtD"}
1
+ {"version":3,"file":"hook.d.ts","sourceRoot":"","sources":["../../src/services/hook.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EACL,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EACzB,KAAK,4BAA4B,EAElC,MAAM,mBAAmB,CAAC;AA2F3B;;GAEG;AACH,wBAAsB,cAAc,CAClC,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,oBAAoB,GAAG,4BAA4B,EAC5D,OAAO,CAAC,EAAE,oBAAoB,GAC7B,OAAO,CAAC,mBAAmB,CAAC,CA6I9B;AAED;;GAEG;AACH,wBAAsB,eAAe,CACnC,QAAQ,EAAE,MAAM,EAAE,EAClB,OAAO,EAAE,oBAAoB,GAAG,4BAA4B,EAC5D,OAAO,CAAC,EAAE,oBAAoB,GAC7B,OAAO,CAAC,mBAAmB,EAAE,CAAC,CAchC;AAED;;GAEG;AACH,wBAAsB,sBAAsB,CAC1C,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,4BAA4B,GACpC,OAAO,CAAC,mBAAmB,EAAE,CAAC,CAMhC;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAsBtD"}
@@ -58,6 +58,21 @@ async function buildHookJsonInput(context) {
58
58
  jsonInput.name = context.worktreeName;
59
59
  }
60
60
  }
61
+ // Add SessionStart-specific fields
62
+ if (context.event === "SessionStart") {
63
+ if (context.source !== undefined) {
64
+ jsonInput.source = context.source;
65
+ }
66
+ if (context.agentType !== undefined) {
67
+ jsonInput.agent_type = context.agentType;
68
+ }
69
+ }
70
+ // Add SessionEnd-specific fields
71
+ if (context.event === "SessionEnd") {
72
+ if (context.endSource !== undefined) {
73
+ jsonInput.end_source = context.endSource;
74
+ }
75
+ }
61
76
  return jsonInput;
62
77
  }
63
78
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"initializationService.d.ts","sourceRoot":"","sources":["../../src/services/initializationService.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,OAAO,EACP,MAAM,EACN,YAAY,EACZ,WAAW,EACZ,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,KAAK,EAAE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AC1E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAC1E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAIpD,MAAM,WAAW,qBAAqB;IACpC,YAAY,EAAE,YAAY,CAAC;IAC3B,eAAe,EAAE,eAAe,CAAC;IACjC,SAAS,EAAE,SAAS,CAAC;IACrB,WAAW,EAAE,WAAW,CAAC;IACzB,aAAa,EAAE,aAAa,CAAC;IAC7B,OAAO,EAAE,YAAY,CAAC;IACtB,mBAAmB,EAAE,mBAAmB,CAAC;IACzC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,UAAU,CAAC;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,WAAW,CAAC;IACxB,oBAAoB,EAAE,oBAAoB,CAAC;IAC3C,WAAW,EAAE,WAAW,CAAC;IACzB,cAAc,EAAE,cAAc,CAAC;IAC/B,iBAAiB,EAAE,iBAAiB,CAAC;IACrC,iBAAiB,EAAE,iBAAiB,CAAC;IACrC,WAAW,EAAE,WAAW,CAAC;IACzB,gBAAgB,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5C,aAAa,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,wBAAwB,EAAE,MAAM,IAAI,CAAC;CACtC;AAED,qBAAa,qBAAqB;WACZ,UAAU,CAC5B,OAAO,EAAE,qBAAqB,EAC9B,OAAO,CAAC,EAAE;QACR,gBAAgB,CAAC,EAAE,MAAM,CAAC;QAC1B,mBAAmB,CAAC,EAAE,OAAO,CAAC;QAC9B,QAAQ,CAAC,EAAE,OAAO,EAAE,CAAC;KACtB,GACA,OAAO,CAAC,IAAI,CAAC;CAyTjB"}
@@ -75,6 +75,29 @@ export class InitializationService {
75
75
  logger?.error("Failed to initialize hooks system:", error);
76
76
  // Don't throw error to prevent app startup failure
77
77
  }
78
+ // Execute SessionStart hooks
79
+ try {
80
+ const phaseStart = performance.now();
81
+ const sessionStartResult = await hookManager.executeSessionStartHooks("startup", messageManager.getSessionId(), messageManager.getTranscriptPath());
82
+ // Inject additionalContext as a meta user message (matches Claude Code)
83
+ if (sessionStartResult.additionalContext) {
84
+ messageManager.addUserMessage({
85
+ content: `<system-reminder>\nSessionStart hook additional context: ${sessionStartResult.additionalContext}\n</system-reminder>`,
86
+ isMeta: true,
87
+ });
88
+ }
89
+ // Inject initialUserMessage as a meta user message
90
+ if (sessionStartResult.initialUserMessage) {
91
+ messageManager.addUserMessage({
92
+ content: sessionStartResult.initialUserMessage,
93
+ isMeta: true,
94
+ });
95
+ }
96
+ logger?.debug(`Initialization Phase [SessionStart Hooks] took ${(performance.now() - phaseStart).toFixed(2)}ms`);
97
+ }
98
+ catch (error) {
99
+ logger?.warn("SessionStart hooks execution failed:", error);
100
+ }
78
101
  // Trigger WorktreeCreate hook if this is a new worktree
79
102
  if (agentOptions.isNewWorktree && hookManager) {
80
103
  try {
@@ -188,7 +211,7 @@ export class InitializationService {
188
211
  messageManager.rebuildUsageFromMessages(sessionToRestore?.messages || []);
189
212
  if (sessionToRestore) {
190
213
  messageManager.initializeFromSession(sessionToRestore);
191
- // Update task manager with the root session ID to ensure continuity across compressions
214
+ // Update task manager with the root session ID to ensure continuity across compactions
192
215
  taskManager.setTaskListId(sessionToRestore.rootSessionId || sessionToRestore.id);
193
216
  // After session is initialized, load tasks for the session
194
217
  const tasks = await taskManager.listTasks();
@@ -103,7 +103,7 @@ export class InteractionService {
103
103
  messageManager.rebuildUsageFromMessages(sessionData.messages);
104
104
  // 6. Initialize session state last
105
105
  messageManager.initializeFromSession(sessionData);
106
- // Update task manager with the root session ID to ensure continuity across compressions
106
+ // Update task manager with the root session ID to ensure continuity across compactions
107
107
  taskManager.setTaskListId(sessionData.rootSessionId || sessionData.id);
108
108
  // 7. Load tasks for the restored session
109
109
  const tasks = await taskManager.listTasks();
@@ -1,11 +1,5 @@
1
1
  import { PluginManifest, CustomSlashCommand, Skill, LspConfig, McpConfig, PartialHookConfiguration } from "../types/index.js";
2
2
  export declare class PluginLoader {
3
- /**
4
- * Finds the first existing plugin manifest path.
5
- * Prefers .wave-plugin/ for backward compatibility, falls back to .claude-plugin/.
6
- * Returns null if neither exists.
7
- */
8
- private static findPluginManifestPath;
9
3
  /**
10
4
  * Load and validate a plugin manifest from a directory
11
5
  * @param pluginPath Absolute path to the plugin directory
@@ -1 +1 @@
1
- {"version":3,"file":"pluginLoader.d.ts","sourceRoot":"","sources":["../../src/services/pluginLoader.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,cAAc,EACd,kBAAkB,EAClB,KAAK,EACL,SAAS,EACT,SAAS,EACT,wBAAwB,EACzB,MAAM,mBAAmB,CAAC;AAK3B,qBAAa,YAAY;IACvB;;;;OAIG;IACH,OAAO,CAAC,MAAM,CAAC,sBAAsB;IAkCrC;;;OAGG;WACU,YAAY,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC;IAgEtE;;;OAGG;IACH,MAAM,CAAC,YAAY,CAAC,UAAU,EAAE,MAAM,GAAG,kBAAkB,EAAE;IAK7D;;;OAGG;WACU,UAAU,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,KAAK,EAAE,CAAC;IAuC7D;;OAEG;WACU,aAAa,CACxB,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,SAAS,GAAG,SAAS,CAAC;IAUjC;;OAEG;WACU,aAAa,CACxB,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,SAAS,GAAG,SAAS,CAAC;IAUjC;;OAEG;WACU,eAAe,CAC1B,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,wBAAwB,GAAG,SAAS,CAAC;IAUhD;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,gBAAgB;CAgBhC"}
1
+ {"version":3,"file":"pluginLoader.d.ts","sourceRoot":"","sources":["../../src/services/pluginLoader.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,c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