wave-agent-sdk 0.17.2 → 0.17.4

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.
@@ -1 +1 @@
1
- {"version":3,"file":"skillManager.d.ts","sourceRoot":"","sources":["../../src/managers/skillManager.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAEtC,OAAO,KAAK,EACV,mBAAmB,EACnB,aAAa,EACb,KAAK,EAGL,aAAa,EACb,sBAAsB,EACvB,MAAM,mBAAmB,CAAC;AAU3B,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAGlD;;GAEG;AACH,qBAAa,YAAa,SAAQ,YAAY;IAc1C,OAAO,CAAC,SAAS;IAbnB,OAAO,CAAC,kBAAkB,CAAS;IACnC,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,OAAO,CAAS;IAExB,OAAO,CAAC,aAAa,CAAoC;IACzD,OAAO,CAAC,YAAY,CAA4B;IAChD,OAAO,CAAC,mBAAmB,CAAoC;IAC/D,OAAO,CAAC,kBAAkB,CAA4B;IACtD,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,WAAW,CAAmC;IACtD,OAAO,CAAC,YAAY,CAAU;gBAGpB,SAAS,EAAE,SAAS,EAC5B,OAAO,GAAE,mBAAwB;IAUnC;;OAEG;IACG,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAoBjC;;OAEG;YACW,aAAa;IAqC3B;;OAEG;YACW,YAAY;IAkC1B;;OAEG;IACG,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAO9B;;OAEG;IACH,aAAa,IAAI,OAAO;IAIxB;;OAEG;IACH,kBAAkB,IAAI,aAAa,EAAE;IAQrC;;OAEG;IACH,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS;IAQzD;;;OAGG;IACG,SAAS,CAAC,SAAS,EAAE,MAAM,GAA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H,OAAO,CAAC,qBAAqB;IAc7B;;OAEG;IACH,oBAAoB,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI;CA8BhE"}
@@ -343,7 +343,7 @@ export class SkillManager extends EventEmitter {
343
343
  prepareSkillContent(skill, argsString) {
344
344
  const skillPath = `Base directory for this skill: ${skill.skillPath}\n\n`;
345
345
  // Extract content after frontmatter
346
- const contentMatch = skill.content.match(/^---\n[\s\S]*?\n---\n([\s\S]*)$/);
346
+ const contentMatch = skill.content.match(/^---\r?\n[\s\S]*?\r?\n---\r?\n([\s\S]*)$/);
347
347
  let mainContent = contentMatch ? contentMatch[1].trim() : skill.content;
348
348
  // 1. Substitute parameters ($1, $ARGUMENTS, etc.)
349
349
  mainContent = substituteCommandParameters(mainContent, argsString);
@@ -49,7 +49,7 @@ export declare class MarketplaceService {
49
49
  */
50
50
  getCacheRegistry(): Promise<KnownMarketplacesRegistry | null>;
51
51
  /**
52
- * Legacy method: loads known marketplaces with builtin injection.
52
+ * Legacy method: loads known marketplaces from cache.
53
53
  * @deprecated Use listMarketplaces() instead, which combines scoped settings.
54
54
  */
55
55
  getKnownMarketplaces(): Promise<KnownMarketplacesRegistry>;
@@ -90,7 +90,7 @@ export declare class MarketplaceService {
90
90
  */
91
91
  addMarketplace(input: string, scope?: Scope): Promise<KnownMarketplace>;
92
92
  /**
93
- * Lists all registered marketplaces by combining scoped settings + built-in
93
+ * Lists all registered marketplaces by combining scoped settings + cache
94
94
  */
95
95
  listMarketplaces(): Promise<KnownMarketplace[]>;
96
96
  /**
@@ -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,EACnB,iBAAiB,EAClB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,oBAAoB,EAAE,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AqB;IAgBnC;;OAEG;IACH,6BAA6B,CAAC,IAAI,EAAE,MAAM,GAAG,KAAK,GAAG,SAAS,GAAG,IAAI;IAcrE;;OAEG;IACG,cAAc,CAClB,KAAK,EAAE,MAAM,EACb,KAAK,GAAE,KAAc,GACpB,OAAO,CAAC,gBAAgB,CAAC;IAkG5B;;OAEG;IACG,gBAAgB,IAAI,OAAO,CAAC,gBAAgB,EAAE,CAAC;IA6CrD;;OAEG;IACG,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,KAAK,GAAG,OAAO,CAAC,IAAI,CAAC;IAoBnE;;OAEG;IACG,iBAAiB,CACrB,IAAI,CAAC,EAAE,MAAM,EACb,OAAO,CAAC,EAAE;QAAE,aAAa,CAAC,EAAE,OAAO,CAAA;KAAE,GACpC,OAAO,CAAC,IAAI,CAAC;IA2GhB;;OAEG;IACG,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC;IAuBpC;;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"}
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,EACnB,iBAAiB,EAClB,MAAM,yBAAyB,CAAC;AAEjC,OAAO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5D;;OAEG;YACW,qBAAqB;IAgBnC;;OAEG;IACH,6BAA6B,CAAC,IAAI,EAAE,MAAM,GAAG,KAAK,GAAG,SAAS,GAAG,IAAI;IAarE;;OAEG;IACG,cAAc,CAClB,KAAK,EAAE,MAAM,EACb,KAAK,GAAE,KAAc,GACpB,OAAO,CAAC,gBAAgB,CAAC;IAkG5B;;OAEG;IACG,gBAAgB,IAAI,OAAO,CAAC,gBAAgB,EAAE,CAAC;IAqCrD;;OAEG;IACG,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,KAAK,GAAG,OAAO,CAAC,IAAI,CAAC;IAkBnE;;OAEG;IACG,iBAAiB,CACrB,IAAI,CAAC,EAAE,MAAM,EACb,OAAO,CAAC,EAAE;QAAE,aAAa,CAAC,EAAE,OAAO,CAAA;KAAE,GACpC,OAAO,CAAC,IAAI,CAAC;IA2GhB;;OAEG;IACG,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC;IAuBpC;;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"}
@@ -155,30 +155,19 @@ export class MarketplaceService {
155
155
  }
156
156
  }
157
157
  /**
158
- * Legacy method: loads known marketplaces with builtin injection.
158
+ * Legacy method: loads known marketplaces from cache.
159
159
  * @deprecated Use listMarketplaces() instead, which combines scoped settings.
160
160
  */
161
161
  async getKnownMarketplaces() {
162
162
  const cache = await this.getCacheRegistry();
163
- // If cache is null (file doesn't exist or has no parseable content), inject builtin
164
163
  if (cache === null) {
165
- return {
166
- marketplaces: [
167
- {
168
- ...MarketplaceService.BUILTIN_MARKETPLACE,
169
- isBuiltin: true,
170
- declaredScope: "builtin",
171
- },
172
- ],
173
- };
164
+ return { marketplaces: [] };
174
165
  }
175
- // File has valid JSON - respect user's explicit choice even if empty
176
- const hasBuiltin = cache.marketplaces.some((m) => m.name === MarketplaceService.BUILTIN_MARKETPLACE.name);
177
166
  return {
178
167
  marketplaces: cache.marketplaces.map((m) => ({
179
168
  ...m,
180
169
  isBuiltin: m.isBuiltin || m.name === MarketplaceService.BUILTIN_MARKETPLACE.name,
181
- declaredScope: m.declaredScope ?? (hasBuiltin ? "builtin" : "user"),
170
+ declaredScope: m.declaredScope ?? "user",
182
171
  })),
183
172
  };
184
173
  }
@@ -293,14 +282,14 @@ export class MarketplaceService {
293
282
  * Finds which scope declared a marketplace (user, project, local, or builtin)
294
283
  */
295
284
  getMarketplaceDeclaringSource(name) {
296
- if (name === MarketplaceService.BUILTIN_MARKETPLACE.name)
297
- return "builtin";
298
285
  const scopes = ["local", "project", "user"];
299
286
  for (const scope of scopes) {
300
287
  const scoped = this.configurationService.getScopedMarketplaces(this.workdir, scope);
301
288
  if (scoped[name])
302
289
  return scope;
303
290
  }
291
+ if (name === MarketplaceService.BUILTIN_MARKETPLACE.name)
292
+ return "builtin";
304
293
  return null;
305
294
  }
306
295
  /**
@@ -381,37 +370,28 @@ export class MarketplaceService {
381
370
  });
382
371
  }
383
372
  /**
384
- * Lists all registered marketplaces by combining scoped settings + built-in
373
+ * Lists all registered marketplaces by combining scoped settings + cache
385
374
  */
386
375
  async listMarketplaces() {
387
376
  const scopedMarketplaces = this.configurationService.getMergedMarketplaces(this.workdir);
388
377
  const cacheRegistry = await this.getCacheRegistry();
389
378
  const cacheMap = new Map((cacheRegistry?.marketplaces ?? []).map((m) => [m.name, m]));
390
379
  const result = [];
391
- // Add built-in marketplace
392
- result.push({
393
- ...MarketplaceService.BUILTIN_MARKETPLACE,
394
- isBuiltin: true,
395
- declaredScope: "builtin",
396
- });
397
380
  // Add all scoped marketplaces (local overrides project overrides user)
398
381
  for (const [name, config] of Object.entries(scopedMarketplaces)) {
399
- if (name === MarketplaceService.BUILTIN_MARKETPLACE.name)
400
- continue;
401
382
  const cache = cacheMap.get(name);
402
383
  const declaredScope = this.getMarketplaceDeclaringSource(name);
403
384
  result.push(await this.buildMarketplaceEntry(name, config, cache, declaredScope));
404
385
  }
405
386
  // Add cache entries not yet in scoped settings (backwards compatibility)
406
387
  for (const [name, cache] of cacheMap.entries()) {
407
- if (name === MarketplaceService.BUILTIN_MARKETPLACE.name)
408
- continue;
409
388
  if (scopedMarketplaces[name])
410
389
  continue;
390
+ const isBuiltin = name === MarketplaceService.BUILTIN_MARKETPLACE.name;
411
391
  result.push({
412
392
  ...cache,
413
- isBuiltin: false,
414
- declaredScope: cache.declaredScope ?? "user",
393
+ isBuiltin,
394
+ declaredScope: cache.declaredScope ?? (isBuiltin ? "builtin" : "user"),
415
395
  });
416
396
  }
417
397
  return result;
@@ -422,10 +402,9 @@ export class MarketplaceService {
422
402
  async removeMarketplace(name, scope) {
423
403
  return this.withLock(async () => {
424
404
  const targetScope = scope || this.getMarketplaceDeclaringSource(name) || "user";
425
- if (targetScope === "builtin") {
426
- throw new Error("Cannot remove built-in marketplace");
405
+ if (targetScope !== "builtin") {
406
+ await this.configurationService.removeMarketplaceFromScope(this.workdir, targetScope, name);
427
407
  }
428
- await this.configurationService.removeMarketplaceFromScope(this.workdir, targetScope, name);
429
408
  // Also remove from cache
430
409
  await this.removeFromCache(name);
431
410
  });
@@ -1 +1 @@
1
- {"version":3,"file":"fileWatcher.d.ts","sourceRoot":"","sources":["../../src/services/fileWatcher.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,KAAK,EAAE,MAAM,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AC,iBAAiB,CAAC;IAahE;;;OAGG;IACG,SAAS,CACb,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,IAAI,GACxC,OAAO,CAAC,IAAI,CAAC;IA+BhB;;;OAGG;IACG,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAiB9C;;;OAGG;IACH,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,iBAAiB,GAAG,IAAI;IA0BxD;;;OAGG;IACH,qBAAqB,IAAI,iBAAiB,EAAE;IAM5C;;OAEG;IACG,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;YAahB,iBAAiB;IAqD/B,OAAO,CAAC,wBAAwB;IAoChC,OAAO,CAAC,eAAe;CAmCxB"}
@@ -198,11 +198,10 @@ export class FileWatcherService extends EventEmitter {
198
198
  };
199
199
  // Notify all watchers that match the path or are parents of the path
200
200
  for (const [watchedPath, entry] of this.watchers.entries()) {
201
- if (filePath === watchedPath ||
202
- filePath.startsWith(watchedPath + "/") ||
203
- // Handle cases where the watched path might be a file and we get an event for it
204
- // (already covered by filePath === watchedPath)
205
- false) {
201
+ const normalizedFilePath = filePath.replace(/\\/g, "/");
202
+ const normalizedWatchedPath = watchedPath.replace(/\\/g, "/");
203
+ if (normalizedFilePath === normalizedWatchedPath ||
204
+ normalizedFilePath.startsWith(normalizedWatchedPath + "/")) {
206
205
  entry.lastEvent = event.timestamp;
207
206
  // Notify all callbacks for this watcher
208
207
  for (const callback of entry.callbacks) {
@@ -1 +1 @@
1
- {"version":3,"file":"commandPathResolver.d.ts","sourceRoot":"","sources":["../../src/utils/commandPathResolver.ts"],"names":[],"mappings":"AAEA;;;GAGG;AAEH;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CA4C3E;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAS5D"}
1
+ {"version":3,"file":"commandPathResolver.d.ts","sourceRoot":"","sources":["../../src/utils/commandPathResolver.ts"],"names":[],"mappings":"AAEA;;;GAGG;AAEH;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CA8C3E;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAS5D"}
@@ -21,7 +21,9 @@ export function generateCommandId(filePath, rootDir) {
21
21
  if (!relativePath || relativePath === ".") {
22
22
  throw new Error("Command filename cannot be empty");
23
23
  }
24
- const segments = relativePath.split("/").filter((segment) => segment !== "");
24
+ const segments = relativePath
25
+ .split(/[\\/]/)
26
+ .filter((segment) => segment !== "");
25
27
  // Remove .md extension from the last segment
26
28
  const lastSegment = segments[segments.length - 1];
27
29
  if (!lastSegment.endsWith(".md")) {
@@ -1 +1 @@
1
- {"version":3,"file":"skillParser.d.ts","sourceRoot":"","sources":["../../src/utils/skillParser.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,eAAe,EACf,iBAAiB,EAEjB,aAAa,EACd,MAAM,mBAAmB,CAAC;AAE3B;;GAEG;AACH,wBAAgB,cAAc,CAC5B,QAAQ,EAAE,MAAM,EAChB,OAAO,GAAE,iBAAsB,GAC9B,eAAe,CA8FjB;AAyDD;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,aAAa,GAAG,MAAM,EAAE,CAwCvE;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAOtD;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,CAa5E"}
1
+ {"version":3,"file":"skillParser.d.ts","sourceRoot":"","sources":["../../src/utils/skillParser.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,eAAe,EACf,iBAAiB,EAEjB,aAAa,EACd,MAAM,mBAAmB,CAAC;AAE3B;;GAEG;AACH,wBAAgB,cAAc,CAC5B,QAAQ,EAAE,MAAM,EAChB,OAAO,GAAE,iBAAsB,GAC9B,eAAe,CAgGjB;AAyDD;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,aAAa,GAAG,MAAM,EAAE,CAwCvE;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAOtD;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,CAa5E"}
@@ -22,7 +22,7 @@ export function parseSkillFile(filePath, options = {}) {
22
22
  const content = readFileSync(filePath, "utf-8");
23
23
  result.content = content;
24
24
  // Parse YAML frontmatter
25
- const frontmatterMatch = content.match(/^---\n([\s\S]*?)\n---/);
25
+ const frontmatterMatch = content.match(/^---\r?\n([\s\S]*?)\r?\n---/);
26
26
  if (!frontmatterMatch) {
27
27
  result.validationErrors.push("Missing YAML frontmatter");
28
28
  return result;
@@ -35,7 +35,8 @@ export function parseSkillFile(filePath, options = {}) {
35
35
  }
36
36
  // Determine skill type and path
37
37
  const skillPath = basePath || dirname(filePath);
38
- const skillType = skillPath.includes("/.wave/skills")
38
+ const skillType = skillPath.includes("/.wave/skills") ||
39
+ skillPath.includes("\\.wave\\skills")
39
40
  ? "project"
40
41
  : "personal";
41
42
  // Extract allowed tools
@@ -1 +1 @@
1
- {"version":3,"file":"subagentParser.d.ts","sourceRoot":"","sources":["../../src/utils/subagentParser.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAA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EAAE,MAAM,GACd,OAAO,CAAC,qBAAqB,EAAE,CAAC,CAsBlC;AAED;;GAEG;AACH,wBAAsB,kBAAkB,CACtC,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,qBAAqB,GAAG,IAAI,CAAC,CAGvC"}
@@ -6,7 +6,7 @@ import { getBuiltinSubagentsDir } from "./configPaths.js";
6
6
  * Parse YAML frontmatter from markdown file content
7
7
  */
8
8
  function parseFrontmatter(content) {
9
- const frontmatterRegex = /^---\s*\n([\s\S]*?)\n---\s*\n([\s\S]*)$/;
9
+ const frontmatterRegex = /^---[ \t]*\r?\n([\s\S]*?)\r?\n---[ \t]*\r?\n([\s\S]*)$/;
10
10
  const match = content.match(frontmatterRegex);
11
11
  if (!match) {
12
12
  return { frontmatter: {}, body: content.trim() };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wave-agent-sdk",
3
- "version": "0.17.2",
3
+ "version": "0.17.4",
4
4
  "description": "SDK for building AI-powered development tools and agents",
5
5
  "keywords": [
6
6
  "ai",
@@ -442,7 +442,9 @@ export class SkillManager extends EventEmitter {
442
442
  const skillPath = `Base directory for this skill: ${skill.skillPath}\n\n`;
443
443
 
444
444
  // Extract content after frontmatter
445
- const contentMatch = skill.content.match(/^---\n[\s\S]*?\n---\n([\s\S]*)$/);
445
+ const contentMatch = skill.content.match(
446
+ /^---\r?\n[\s\S]*?\r?\n---\r?\n([\s\S]*)$/,
447
+ );
446
448
  let mainContent = contentMatch ? contentMatch[1].trim() : skill.content;
447
449
 
448
450
  // 1. Substitute parameters ($1, $ARGUMENTS, etc.)
@@ -217,33 +217,20 @@ export class MarketplaceService {
217
217
  }
218
218
 
219
219
  /**
220
- * Legacy method: loads known marketplaces with builtin injection.
220
+ * Legacy method: loads known marketplaces from cache.
221
221
  * @deprecated Use listMarketplaces() instead, which combines scoped settings.
222
222
  */
223
223
  async getKnownMarketplaces(): Promise<KnownMarketplacesRegistry> {
224
224
  const cache = await this.getCacheRegistry();
225
- // If cache is null (file doesn't exist or has no parseable content), inject builtin
226
225
  if (cache === null) {
227
- return {
228
- marketplaces: [
229
- {
230
- ...MarketplaceService.BUILTIN_MARKETPLACE,
231
- isBuiltin: true,
232
- declaredScope: "builtin",
233
- },
234
- ],
235
- };
226
+ return { marketplaces: [] };
236
227
  }
237
- // File has valid JSON - respect user's explicit choice even if empty
238
- const hasBuiltin = cache.marketplaces.some(
239
- (m) => m.name === MarketplaceService.BUILTIN_MARKETPLACE.name,
240
- );
241
228
  return {
242
229
  marketplaces: cache.marketplaces.map((m) => ({
243
230
  ...m,
244
231
  isBuiltin:
245
232
  m.isBuiltin || m.name === MarketplaceService.BUILTIN_MARKETPLACE.name,
246
- declaredScope: m.declaredScope ?? (hasBuiltin ? "builtin" : "user"),
233
+ declaredScope: m.declaredScope ?? "user",
247
234
  })),
248
235
  };
249
236
  }
@@ -385,8 +372,6 @@ export class MarketplaceService {
385
372
  * Finds which scope declared a marketplace (user, project, local, or builtin)
386
373
  */
387
374
  getMarketplaceDeclaringSource(name: string): Scope | "builtin" | null {
388
- if (name === MarketplaceService.BUILTIN_MARKETPLACE.name) return "builtin";
389
-
390
375
  const scopes: Scope[] = ["local", "project", "user"];
391
376
  for (const scope of scopes) {
392
377
  const scoped = this.configurationService.getScopedMarketplaces(
@@ -395,6 +380,7 @@ export class MarketplaceService {
395
380
  );
396
381
  if (scoped[name]) return scope;
397
382
  }
383
+ if (name === MarketplaceService.BUILTIN_MARKETPLACE.name) return "builtin";
398
384
  return null;
399
385
  }
400
386
 
@@ -503,7 +489,7 @@ export class MarketplaceService {
503
489
  }
504
490
 
505
491
  /**
506
- * Lists all registered marketplaces by combining scoped settings + built-in
492
+ * Lists all registered marketplaces by combining scoped settings + cache
507
493
  */
508
494
  async listMarketplaces(): Promise<KnownMarketplace[]> {
509
495
  const scopedMarketplaces = this.configurationService.getMergedMarketplaces(
@@ -516,16 +502,8 @@ export class MarketplaceService {
516
502
 
517
503
  const result: KnownMarketplace[] = [];
518
504
 
519
- // Add built-in marketplace
520
- result.push({
521
- ...MarketplaceService.BUILTIN_MARKETPLACE,
522
- isBuiltin: true,
523
- declaredScope: "builtin",
524
- });
525
-
526
505
  // Add all scoped marketplaces (local overrides project overrides user)
527
506
  for (const [name, config] of Object.entries(scopedMarketplaces)) {
528
- if (name === MarketplaceService.BUILTIN_MARKETPLACE.name) continue;
529
507
  const cache = cacheMap.get(name);
530
508
  const declaredScope = this.getMarketplaceDeclaringSource(name) as
531
509
  | "user"
@@ -538,12 +516,12 @@ export class MarketplaceService {
538
516
 
539
517
  // Add cache entries not yet in scoped settings (backwards compatibility)
540
518
  for (const [name, cache] of cacheMap.entries()) {
541
- if (name === MarketplaceService.BUILTIN_MARKETPLACE.name) continue;
542
519
  if (scopedMarketplaces[name]) continue;
520
+ const isBuiltin = name === MarketplaceService.BUILTIN_MARKETPLACE.name;
543
521
  result.push({
544
522
  ...cache,
545
- isBuiltin: false,
546
- declaredScope: cache.declaredScope ?? "user",
523
+ isBuiltin,
524
+ declaredScope: cache.declaredScope ?? (isBuiltin ? "builtin" : "user"),
547
525
  });
548
526
  }
549
527
 
@@ -558,16 +536,14 @@ export class MarketplaceService {
558
536
  const targetScope =
559
537
  scope || this.getMarketplaceDeclaringSource(name) || "user";
560
538
 
561
- if (targetScope === "builtin") {
562
- throw new Error("Cannot remove built-in marketplace");
539
+ if (targetScope !== "builtin") {
540
+ await this.configurationService.removeMarketplaceFromScope(
541
+ this.workdir,
542
+ targetScope,
543
+ name,
544
+ );
563
545
  }
564
546
 
565
- await this.configurationService.removeMarketplaceFromScope(
566
- this.workdir,
567
- targetScope,
568
- name,
569
- );
570
-
571
547
  // Also remove from cache
572
548
  await this.removeFromCache(name);
573
549
  });
@@ -281,12 +281,11 @@ export class FileWatcherService extends EventEmitter {
281
281
 
282
282
  // Notify all watchers that match the path or are parents of the path
283
283
  for (const [watchedPath, entry] of this.watchers.entries()) {
284
+ const normalizedFilePath = filePath.replace(/\\/g, "/");
285
+ const normalizedWatchedPath = watchedPath.replace(/\\/g, "/");
284
286
  if (
285
- filePath === watchedPath ||
286
- filePath.startsWith(watchedPath + "/") ||
287
- // Handle cases where the watched path might be a file and we get an event for it
288
- // (already covered by filePath === watchedPath)
289
- false
287
+ normalizedFilePath === normalizedWatchedPath ||
288
+ normalizedFilePath.startsWith(normalizedWatchedPath + "/")
290
289
  ) {
291
290
  entry.lastEvent = event.timestamp;
292
291
 
@@ -26,7 +26,9 @@ export function generateCommandId(filePath: string, rootDir: string): string {
26
26
  throw new Error("Command filename cannot be empty");
27
27
  }
28
28
 
29
- const segments = relativePath.split("/").filter((segment) => segment !== "");
29
+ const segments = relativePath
30
+ .split(/[\\/]/)
31
+ .filter((segment) => segment !== "");
30
32
 
31
33
  // Remove .md extension from the last segment
32
34
  const lastSegment = segments[segments.length - 1];
@@ -35,7 +35,7 @@ export function parseSkillFile(
35
35
  result.content = content;
36
36
 
37
37
  // Parse YAML frontmatter
38
- const frontmatterMatch = content.match(/^---\n([\s\S]*?)\n---/);
38
+ const frontmatterMatch = content.match(/^---\r?\n([\s\S]*?)\r?\n---/);
39
39
  if (!frontmatterMatch) {
40
40
  result.validationErrors.push("Missing YAML frontmatter");
41
41
  return result;
@@ -53,9 +53,11 @@ export function parseSkillFile(
53
53
 
54
54
  // Determine skill type and path
55
55
  const skillPath = basePath || dirname(filePath);
56
- const skillType = skillPath.includes("/.wave/skills")
57
- ? "project"
58
- : "personal";
56
+ const skillType =
57
+ skillPath.includes("/.wave/skills") ||
58
+ skillPath.includes("\\.wave\\skills")
59
+ ? "project"
60
+ : "personal";
59
61
 
60
62
  // Extract allowed tools
61
63
  let allowedTools: string[] | undefined;
@@ -30,7 +30,8 @@ function parseFrontmatter(content: string): {
30
30
  frontmatter: SubagentFrontmatter;
31
31
  body: string;
32
32
  } {
33
- const frontmatterRegex = /^---\s*\n([\s\S]*?)\n---\s*\n([\s\S]*)$/;
33
+ const frontmatterRegex =
34
+ /^---[ \t]*\r?\n([\s\S]*?)\r?\n---[ \t]*\r?\n([\s\S]*)$/;
34
35
  const match = content.match(frontmatterRegex);
35
36
 
36
37
  if (!match) {