wave-agent-sdk 0.13.6 → 0.14.1
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/agent.d.ts.map +1 -1
- package/dist/agent.js +4 -2
- package/dist/core/plugin.d.ts +2 -2
- package/dist/core/plugin.d.ts.map +1 -1
- package/dist/core/plugin.js +7 -7
- package/dist/managers/aiManager.d.ts +3 -0
- package/dist/managers/aiManager.d.ts.map +1 -1
- package/dist/managers/aiManager.js +93 -8
- package/dist/managers/backgroundTaskManager.d.ts.map +1 -1
- package/dist/managers/backgroundTaskManager.js +0 -12
- package/dist/managers/messageManager.d.ts +15 -0
- package/dist/managers/messageManager.d.ts.map +1 -1
- package/dist/managers/messageManager.js +52 -2
- package/dist/managers/permissionManager.d.ts +4 -0
- package/dist/managers/permissionManager.d.ts.map +1 -1
- package/dist/managers/permissionManager.js +6 -0
- package/dist/managers/pluginManager.d.ts.map +1 -1
- package/dist/managers/pluginManager.js +1 -1
- package/dist/managers/subagentManager.d.ts.map +1 -1
- package/dist/managers/subagentManager.js +23 -17
- package/dist/prompts/index.d.ts +2 -1
- package/dist/prompts/index.d.ts.map +1 -1
- package/dist/prompts/index.js +50 -25
- package/dist/services/MarketplaceService.d.ts +53 -12
- package/dist/services/MarketplaceService.d.ts.map +1 -1
- package/dist/services/MarketplaceService.js +311 -123
- package/dist/services/aiService.d.ts.map +1 -1
- package/dist/services/aiService.js +11 -1
- package/dist/services/configurationService.d.ts +17 -1
- package/dist/services/configurationService.d.ts.map +1 -1
- package/dist/services/configurationService.js +104 -0
- package/dist/services/pluginLoader.d.ts +6 -0
- package/dist/services/pluginLoader.d.ts.map +1 -1
- package/dist/services/pluginLoader.js +52 -7
- package/dist/tools/agentTool.d.ts.map +1 -1
- package/dist/tools/agentTool.js +14 -2
- package/dist/tools/bashTool.d.ts.map +1 -1
- package/dist/tools/bashTool.js +27 -5
- package/dist/tools/types.d.ts +1 -0
- package/dist/tools/types.d.ts.map +1 -1
- package/dist/tools/webFetchTool.d.ts.map +1 -1
- package/dist/tools/webFetchTool.js +202 -78
- package/dist/types/configuration.d.ts +7 -0
- package/dist/types/configuration.d.ts.map +1 -1
- package/dist/types/marketplace.d.ts +28 -1
- package/dist/types/marketplace.d.ts.map +1 -1
- package/dist/types/messaging.d.ts +1 -0
- package/dist/types/messaging.d.ts.map +1 -1
- package/dist/types/plugins.d.ts +13 -1
- package/dist/types/plugins.d.ts.map +1 -1
- package/dist/utils/convertMessagesForAPI.js +1 -1
- package/dist/utils/groupMessagesByApiRound.d.ts +24 -0
- package/dist/utils/groupMessagesByApiRound.d.ts.map +1 -0
- package/dist/utils/groupMessagesByApiRound.js +97 -0
- package/dist/utils/messageOperations.d.ts +1 -0
- package/dist/utils/messageOperations.d.ts.map +1 -1
- package/dist/utils/microcompact.d.ts +7 -0
- package/dist/utils/microcompact.d.ts.map +1 -0
- package/dist/utils/microcompact.js +78 -0
- package/package.json +2 -1
- package/src/agent.ts +4 -2
- package/src/core/plugin.ts +13 -7
- package/src/managers/aiManager.ts +117 -15
- package/src/managers/backgroundTaskManager.ts +1 -20
- package/src/managers/messageManager.ts +64 -2
- package/src/managers/permissionManager.ts +7 -0
- package/src/managers/pluginManager.ts +4 -1
- package/src/managers/subagentManager.ts +28 -24
- package/src/prompts/index.ts +51 -25
- package/src/services/MarketplaceService.ts +425 -134
- package/src/services/aiService.ts +14 -1
- package/src/services/configurationService.ts +131 -0
- package/src/services/pluginLoader.ts +66 -7
- package/src/tools/agentTool.ts +14 -2
- package/src/tools/bashTool.ts +27 -5
- package/src/tools/types.ts +1 -0
- package/src/tools/webFetchTool.ts +276 -86
- package/src/types/configuration.ts +8 -0
- package/src/types/marketplace.ts +26 -1
- package/src/types/messaging.ts +1 -0
- package/src/types/plugins.ts +13 -1
- package/src/utils/convertMessagesForAPI.ts +1 -1
- package/src/utils/groupMessagesByApiRound.ts +120 -0
- package/src/utils/messageOperations.ts +1 -0
- package/src/utils/microcompact.ts +101 -0
|
@@ -371,20 +371,23 @@ export class SubagentManager {
|
|
|
371
371
|
instance.logStream?.end();
|
|
372
372
|
const task = backgroundTaskManager.getTask(instance.backgroundTaskId);
|
|
373
373
|
if (task) {
|
|
374
|
+
const wasAlreadyKilled = task.status === "killed";
|
|
374
375
|
task.status = "completed";
|
|
375
376
|
task.stdout = response || "Agent completed with no text response";
|
|
376
377
|
task.endTime = Date.now();
|
|
377
378
|
if (task.startTime) {
|
|
378
379
|
task.runtime = task.endTime - task.startTime;
|
|
379
380
|
}
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
381
|
+
// Skip notification if task was already stopped (e.g. by main agent shutdown)
|
|
382
|
+
if (!wasAlreadyKilled) {
|
|
383
|
+
const notificationQueue = this.container.has("NotificationQueue")
|
|
384
|
+
? this.container.get("NotificationQueue")
|
|
385
|
+
: undefined;
|
|
386
|
+
if (notificationQueue) {
|
|
387
|
+
const summary = `Agent task "${instance.description}" completed`;
|
|
388
|
+
notificationQueue.enqueue(`<task-notification>\n<task-id>${instance.backgroundTaskId}</task-id>\n<task-type>agent</task-type>\n<status>completed</status>\n<summary>${summary}</summary>\n</task-notification>`);
|
|
389
|
+
}
|
|
390
|
+
}
|
|
388
391
|
}
|
|
389
392
|
}
|
|
390
393
|
return response || "Agent completed with no text response";
|
|
@@ -400,21 +403,24 @@ export class SubagentManager {
|
|
|
400
403
|
instance.logStream?.end();
|
|
401
404
|
const task = backgroundTaskManager.getTask(instance.backgroundTaskId);
|
|
402
405
|
if (task) {
|
|
406
|
+
const wasAlreadyKilled = task.status === "killed";
|
|
403
407
|
task.status = "failed";
|
|
404
408
|
task.stderr = error instanceof Error ? error.message : String(error);
|
|
405
409
|
task.endTime = Date.now();
|
|
406
410
|
if (task.startTime) {
|
|
407
411
|
task.runtime = task.endTime - task.startTime;
|
|
408
412
|
}
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
413
|
+
// Skip notification if task was already stopped (e.g. by main agent shutdown)
|
|
414
|
+
if (!wasAlreadyKilled) {
|
|
415
|
+
const notificationQueue = this.container.has("NotificationQueue")
|
|
416
|
+
? this.container.get("NotificationQueue")
|
|
417
|
+
: undefined;
|
|
418
|
+
if (notificationQueue) {
|
|
419
|
+
const errorMsg = error instanceof Error ? error.message : String(error);
|
|
420
|
+
const summary = `Agent task "${instance.description}" failed: ${errorMsg}`;
|
|
421
|
+
notificationQueue.enqueue(`<task-notification>\n<task-id>${instance.backgroundTaskId}</task-id>\n<task-type>agent</task-type>\n<status>failed</status>\n<summary>${summary}</summary>\n</task-notification>`);
|
|
422
|
+
}
|
|
423
|
+
}
|
|
418
424
|
}
|
|
419
425
|
}
|
|
420
426
|
throw error;
|
package/dist/prompts/index.d.ts
CHANGED
|
@@ -12,11 +12,12 @@ 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
|
|
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.";
|
|
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?: {
|
|
19
19
|
workdir?: string;
|
|
20
|
+
originalWorkdir?: string;
|
|
20
21
|
memory?: string;
|
|
21
22
|
language?: string;
|
|
22
23
|
isSubagent?: boolean;
|
|
@@ -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,
|
|
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;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"}
|
package/dist/prompts/index.js
CHANGED
|
@@ -148,28 +148,52 @@ 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
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
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.
|
|
152
|
+
|
|
153
|
+
First, write your analysis in <analysis> tags as a thinking scratchpad:
|
|
154
|
+
- Chronologically review the conversation
|
|
155
|
+
- Identify user intents and goals
|
|
156
|
+
- Note files read/modified, approaches tried, decisions made
|
|
157
|
+
- Check for accuracy and completeness — ensure nothing critical is missing
|
|
158
|
+
|
|
159
|
+
Then produce a structured summary in <summary> tags with these sections:
|
|
160
|
+
|
|
161
|
+
## Primary Request and Intent
|
|
162
|
+
- The user's core request and success criteria
|
|
163
|
+
- Clarifications, constraints, or scope changes
|
|
164
|
+
|
|
165
|
+
## Key Technical Concepts
|
|
166
|
+
- Frameworks, libraries, patterns, architectural decisions
|
|
167
|
+
|
|
168
|
+
## Files and Code Sections
|
|
169
|
+
- Files read, modified, created (with full paths)
|
|
170
|
+
- Critical code snippets (function signatures, bug fixes, key logic)
|
|
171
|
+
- Focus on recent messages — include full code for important sections
|
|
172
|
+
|
|
173
|
+
## Errors and Fixes
|
|
174
|
+
- Errors encountered, root causes, how they were resolved
|
|
175
|
+
- Approaches tried that didn't work and why
|
|
176
|
+
|
|
177
|
+
## Problem Solving
|
|
178
|
+
- Approach evolution, trade-offs considered, decisions made
|
|
179
|
+
|
|
180
|
+
## All User Messages
|
|
181
|
+
- Complete list of all user messages (non-tool content)
|
|
182
|
+
- Preserve exact wording where load-bearing
|
|
183
|
+
|
|
184
|
+
## Pending Tasks
|
|
185
|
+
- Outstanding work, TODOs, unresolved questions
|
|
186
|
+
|
|
187
|
+
## Current Work
|
|
188
|
+
- What was being worked on at the time of summarization
|
|
189
|
+
- Exact state of in-progress changes
|
|
190
|
+
|
|
191
|
+
## Optional Next Step
|
|
192
|
+
- Immediate next action needed
|
|
193
|
+
- Include verbatim quotes from recent conversation if relevant
|
|
194
|
+
|
|
195
|
+
Be concise but complete — include information that prevents duplicate work or repeated mistakes.
|
|
196
|
+
Respond with text only. Do NOT call any tools.
|
|
173
197
|
Wrap your summary in <summary></summary> tags.`;
|
|
174
198
|
export const WEB_CONTENT_SYSTEM_PROMPT = `You are a helpful assistant that extracts information from web content. The content is provided in Markdown format.`;
|
|
175
199
|
export const BTW_SYSTEM_PROMPT = `You are a helpful assistant. Answer the user's side question based on the conversation history.
|
|
@@ -194,8 +218,9 @@ export function buildSystemPrompt(basePrompt, tools, options = {}) {
|
|
|
194
218
|
if (options.planMode) {
|
|
195
219
|
prompt += `\n\n${buildPlanModePrompt(options.planMode.planFilePath, options.planMode.planExists, options.isSubagent)}`;
|
|
196
220
|
}
|
|
197
|
-
|
|
198
|
-
|
|
221
|
+
const workdirForPrompt = options.originalWorkdir || options.workdir;
|
|
222
|
+
if (workdirForPrompt) {
|
|
223
|
+
const isGitRepo = isGitRepository(workdirForPrompt);
|
|
199
224
|
const platform = os.platform();
|
|
200
225
|
const osVersion = `${os.type()} ${os.release()}`;
|
|
201
226
|
const today = new Date().toISOString().split("T")[0];
|
|
@@ -209,7 +234,7 @@ export function buildSystemPrompt(basePrompt, tools, options = {}) {
|
|
|
209
234
|
|
|
210
235
|
Here is useful information about the environment you are running in:
|
|
211
236
|
<env>
|
|
212
|
-
Working directory: ${
|
|
237
|
+
Working directory: ${workdirForPrompt}
|
|
213
238
|
Is directory a git repo: ${isGitRepo}
|
|
214
239
|
Platform: ${platform}
|
|
215
240
|
Shell: ${shellName}
|
|
@@ -1,9 +1,14 @@
|
|
|
1
|
-
import { KnownMarketplace, KnownMarketplacesRegistry, InstalledPlugin, InstalledPluginsRegistry, MarketplaceManifest } from "../types/marketplace.js";
|
|
1
|
+
import { KnownMarketplace, KnownMarketplacesRegistry, InstalledPlugin, InstalledPluginsRegistry, MarketplaceManifest, MarketplaceSource } from "../types/marketplace.js";
|
|
2
|
+
import { ConfigurationService } from "./configurationService.js";
|
|
3
|
+
import type { Scope } from "../types/configuration.js";
|
|
2
4
|
/**
|
|
3
5
|
* Marketplace Service
|
|
4
6
|
*
|
|
5
7
|
* Handles local plugin marketplace registration, plugin installation,
|
|
6
8
|
* and state management for installed plugins.
|
|
9
|
+
*
|
|
10
|
+
* Marketplace declarations are now scoped (user/project/local) via settings files.
|
|
11
|
+
* known_marketplaces.json is kept as a cache for installLocation/lastUpdated metadata.
|
|
7
12
|
*/
|
|
8
13
|
export declare class MarketplaceService {
|
|
9
14
|
private static isLockedInProcess;
|
|
@@ -15,12 +20,19 @@ export declare class MarketplaceService {
|
|
|
15
20
|
private cacheDir;
|
|
16
21
|
private marketplacesDir;
|
|
17
22
|
private gitService;
|
|
23
|
+
private configurationService;
|
|
24
|
+
private workdir;
|
|
18
25
|
private static readonly BUILTIN_MARKETPLACE;
|
|
19
|
-
constructor();
|
|
26
|
+
constructor(workdir?: string, configurationService?: ConfigurationService);
|
|
20
27
|
/**
|
|
21
28
|
* Ensures the required directory structure exists in ~/.wave/plugins
|
|
22
29
|
*/
|
|
23
30
|
private ensureDirectoryStructure;
|
|
31
|
+
/**
|
|
32
|
+
* Backwards compatibility migration: migrate entries from known_marketplaces.json
|
|
33
|
+
* to user-level settings if they aren't already declared there.
|
|
34
|
+
*/
|
|
35
|
+
private runMigration;
|
|
24
36
|
/**
|
|
25
37
|
* Check if a lock file is stale by reading its PID and checking if the process is alive.
|
|
26
38
|
* Returns true if the lock is stale and safe to remove.
|
|
@@ -32,21 +44,37 @@ export declare class MarketplaceService {
|
|
|
32
44
|
*/
|
|
33
45
|
private withLock;
|
|
34
46
|
/**
|
|
35
|
-
* Loads the
|
|
47
|
+
* Loads the cache registry from known_marketplaces.json
|
|
48
|
+
* Returns null if the file doesn't exist or has no parseable content (for first-run detection).
|
|
49
|
+
*/
|
|
50
|
+
getCacheRegistry(): Promise<KnownMarketplacesRegistry | null>;
|
|
51
|
+
/**
|
|
52
|
+
* Legacy method: loads known marketplaces with builtin injection.
|
|
53
|
+
* @deprecated Use listMarketplaces() instead, which combines scoped settings.
|
|
36
54
|
*/
|
|
37
55
|
getKnownMarketplaces(): Promise<KnownMarketplacesRegistry>;
|
|
38
56
|
/**
|
|
39
|
-
*
|
|
57
|
+
* Updates the cache registry with metadata for a marketplace
|
|
40
58
|
*/
|
|
41
|
-
|
|
59
|
+
private updateCacheMarketplace;
|
|
42
60
|
/**
|
|
43
|
-
*
|
|
61
|
+
* Removes a marketplace from the cache registry
|
|
44
62
|
*/
|
|
45
|
-
|
|
63
|
+
private removeFromCache;
|
|
64
|
+
/**
|
|
65
|
+
* Loads the installed plugins registry
|
|
66
|
+
*/
|
|
67
|
+
getInstalledPlugins(): Promise<InstalledPluginsRegistry>;
|
|
46
68
|
/**
|
|
47
69
|
* Saves the installed plugins registry
|
|
48
70
|
*/
|
|
49
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;
|
|
50
78
|
/**
|
|
51
79
|
* Loads a marketplace manifest from a local path
|
|
52
80
|
*/
|
|
@@ -54,19 +82,27 @@ export declare class MarketplaceService {
|
|
|
54
82
|
/**
|
|
55
83
|
* Resolves the local path for a marketplace
|
|
56
84
|
*/
|
|
57
|
-
getMarketplacePath(
|
|
85
|
+
getMarketplacePath(source: MarketplaceSource): string;
|
|
86
|
+
/**
|
|
87
|
+
* Builds a KnownMarketplace from a scoped config, enriched with cache metadata
|
|
88
|
+
*/
|
|
89
|
+
private buildMarketplaceEntry;
|
|
90
|
+
/**
|
|
91
|
+
* Finds which scope declared a marketplace (user, project, local, or builtin)
|
|
92
|
+
*/
|
|
93
|
+
getMarketplaceDeclaringSource(name: string): Scope | "builtin" | null;
|
|
58
94
|
/**
|
|
59
95
|
* Adds a new marketplace (local directory, GitHub repo, or Git URL)
|
|
60
96
|
*/
|
|
61
|
-
addMarketplace(input: string): Promise<KnownMarketplace>;
|
|
97
|
+
addMarketplace(input: string, scope?: Scope): Promise<KnownMarketplace>;
|
|
62
98
|
/**
|
|
63
|
-
* Lists all registered marketplaces
|
|
99
|
+
* Lists all registered marketplaces by combining scoped settings + built-in
|
|
64
100
|
*/
|
|
65
101
|
listMarketplaces(): Promise<KnownMarketplace[]>;
|
|
66
102
|
/**
|
|
67
|
-
* Removes a marketplace by name
|
|
103
|
+
* Removes a marketplace by name from the specified scope
|
|
68
104
|
*/
|
|
69
|
-
removeMarketplace(name: string): Promise<void>;
|
|
105
|
+
removeMarketplace(name: string, scope?: Scope): Promise<void>;
|
|
70
106
|
/**
|
|
71
107
|
* Updates a specific marketplace or all marketplaces
|
|
72
108
|
*/
|
|
@@ -81,6 +117,11 @@ export declare class MarketplaceService {
|
|
|
81
117
|
* Toggles auto-update for a marketplace
|
|
82
118
|
*/
|
|
83
119
|
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;
|
|
84
125
|
/**
|
|
85
126
|
* Installs a plugin from a marketplace
|
|
86
127
|
*/
|
|
@@ -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,
|
|
1
|
+
{"version":3,"file":"MarketplaceService.d.ts","sourceRoot":"","sources":["../../src/services/MarketplaceService.ts"],"names":[],"mappings":"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"}
|