@ghl-ai/aw 0.1.38-beta.22 → 0.1.38-beta.23

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/ecc.mjs CHANGED
@@ -9,7 +9,7 @@ import * as fmt from "./fmt.mjs";
9
9
 
10
10
  const AW_ECC_REPO_SSH = "git@github.com:shreyansh-ghl/aw-ecc.git";
11
11
  const AW_ECC_REPO_HTTPS = "https://github.com/shreyansh-ghl/aw-ecc.git";
12
- const AW_ECC_TAG = "v1.0.10";
12
+ const AW_ECC_TAG = "v1.4.30";
13
13
 
14
14
  const MARKETPLACE_NAME = "aw-marketplace";
15
15
  const PLUGIN_KEY = `aw@${MARKETPLACE_NAME}`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ghl-ai/aw",
3
- "version": "0.1.38-beta.22",
3
+ "version": "0.1.38-beta.23",
4
4
  "description": "Agentic Workspace CLI — pull, push & manage agents, skills and commands from the registry",
5
5
  "type": "module",
6
6
  "bin": "bin.js",
package/render-rules.mjs CHANGED
@@ -225,6 +225,41 @@ function listRuleScopes(rulesDir, { includeNestedScopes = false } = {}) {
225
225
  });
226
226
  }
227
227
 
228
+ /** Well-known locations for the using-aw-skills SKILL.md (checked in order). */
229
+ const AW_ROUTING_SKILL_CANDIDATES = [
230
+ (home) => join(home, '.aw-ecc', 'skills', 'using-aw-skills', 'SKILL.md'),
231
+ (home) => join(home, '.cursor', 'skills', 'using-aw-skills', 'SKILL.md'),
232
+ (home) => join(home, '.claude', 'skills', 'using-aw-skills', 'SKILL.md'),
233
+ ];
234
+
235
+ const AW_ROUTING_MDC_FILENAME = 'aw-routing.mdc';
236
+
237
+ /**
238
+ * Build the aw-routing.mdc content from the using-aw-skills SKILL.md.
239
+ * Strips the YAML frontmatter and wraps in an alwaysApply .mdc envelope.
240
+ * Returns null if the skill file is not found.
241
+ */
242
+ function buildAwRoutingMdc(home) {
243
+ let skillContent = null;
244
+ for (const candidateFn of AW_ROUTING_SKILL_CANDIDATES) {
245
+ skillContent = readOrNull(candidateFn(home));
246
+ if (skillContent) break;
247
+ }
248
+ if (!skillContent) return null;
249
+
250
+ // Strip YAML frontmatter
251
+ const body = skillContent.replace(/^---\n[\s\S]*?\n---\n*/, '').trim();
252
+
253
+ const frontmatter = [
254
+ '---',
255
+ 'description: "AW skill router — MUST select the smallest correct AW route before any substantive response"',
256
+ 'alwaysApply: true',
257
+ '---',
258
+ ].join('\n');
259
+
260
+ return GENERATED_HEADER + frontmatter + '\n\n' + body + '\n';
261
+ }
262
+
228
263
  /**
229
264
  * Render .cursor/rules/<scope>.mdc files from .aw_rules scope AGENTS.md files.
230
265
  */
@@ -235,10 +270,9 @@ function renderCursorRules(cwd, rulesDir, options = {}) {
235
270
  const scopes = listRuleScopes(rulesDir, {
236
271
  includeNestedScopes: stackOverlaysEnabled(options),
237
272
  });
238
- pruneStaleGeneratedRules(
239
- cursorRulesDir,
240
- new Set(scopes.map(({ scope }) => `${scopeToFilename(scope)}.mdc`)),
241
- );
273
+ const expectedFilenames = new Set(scopes.map(({ scope }) => `${scopeToFilename(scope)}.mdc`));
274
+ expectedFilenames.add(AW_ROUTING_MDC_FILENAME);
275
+ pruneStaleGeneratedRules(cursorRulesDir, expectedFilenames);
242
276
  let count = 0;
243
277
 
244
278
  for (const { scope, agentsPath, referencesDir } of scopes) {
@@ -277,6 +311,16 @@ function renderCursorRules(cwd, rulesDir, options = {}) {
277
311
  count++;
278
312
  }
279
313
 
314
+ // Generate the AW routing .mdc from using-aw-skills SKILL.md.
315
+ // Cursor's sessionStart hooks don't reliably surface additional_context
316
+ // (forum #155689), so we inject routing via an alwaysApply .mdc rule instead.
317
+ const HOME = options.homeDir || homedir();
318
+ const awRoutingContent = buildAwRoutingMdc(HOME);
319
+ if (awRoutingContent) {
320
+ writeFileSync(join(cursorRulesDir, AW_ROUTING_MDC_FILENAME), awRoutingContent);
321
+ count++;
322
+ }
323
+
280
324
  return count;
281
325
  }
282
326