@ghl-ai/aw 0.1.39-beta.12 → 0.1.39-beta.13
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 +1 -1
- package/package.json +1 -1
- package/render-rules.mjs +17 -5
package/ecc.mjs
CHANGED
|
@@ -10,7 +10,7 @@ import { applyStoredStartupPreferences } from "./startup.mjs";
|
|
|
10
10
|
|
|
11
11
|
const AW_ECC_REPO_SSH = "git@github.com:shreyansh-ghl/aw-ecc.git";
|
|
12
12
|
const AW_ECC_REPO_HTTPS = "https://github.com/shreyansh-ghl/aw-ecc.git";
|
|
13
|
-
export const AW_ECC_TAG = "v1.4.
|
|
13
|
+
export const AW_ECC_TAG = "v1.4.37";
|
|
14
14
|
|
|
15
15
|
const MARKETPLACE_NAME = "aw-marketplace";
|
|
16
16
|
const PLUGIN_KEY = `aw@${MARKETPLACE_NAME}`;
|
package/package.json
CHANGED
package/render-rules.mjs
CHANGED
|
@@ -6,7 +6,12 @@ import { homedir } from 'node:os';
|
|
|
6
6
|
import * as fmt from './fmt.mjs';
|
|
7
7
|
import { RULES_RUNTIME_DIR } from './constants.mjs';
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
// The marker is placed AFTER the YAML frontmatter so Cursor/Markdown parsers
|
|
10
|
+
// see the frontmatter at byte 0. Putting an HTML comment before --- breaks
|
|
11
|
+
// Cursor's alwaysApply/globs detection.
|
|
12
|
+
const GENERATED_MARKER = '<!-- Generated by aw — do not edit manually -->';
|
|
13
|
+
// Legacy header (pre-pattern comment first) — kept for pruning old files.
|
|
14
|
+
const LEGACY_GENERATED_HEADER = '<!-- Generated by aw — do not edit manually -->\n\n';
|
|
10
15
|
const STACK_OVERLAY_FLAG = 'AW_ENABLE_STACK_OVERLAY_RULES';
|
|
11
16
|
|
|
12
17
|
/** Rule scope → Cursor .mdc glob patterns */
|
|
@@ -196,7 +201,8 @@ function pruneStaleGeneratedRules(outputDir, expectedFilenames) {
|
|
|
196
201
|
|
|
197
202
|
const fullPath = join(outputDir, entry.name);
|
|
198
203
|
const content = readOrNull(fullPath);
|
|
199
|
-
|
|
204
|
+
// Match both new pattern (marker after frontmatter) and legacy (marker at top).
|
|
205
|
+
if (!content || (!content.includes(GENERATED_MARKER) && !content.startsWith(LEGACY_GENERATED_HEADER))) continue;
|
|
200
206
|
|
|
201
207
|
try {
|
|
202
208
|
unlinkSync(fullPath);
|
|
@@ -303,7 +309,9 @@ function renderCursorRules(cwd, rulesDir, options = {}) {
|
|
|
303
309
|
}
|
|
304
310
|
}
|
|
305
311
|
|
|
306
|
-
|
|
312
|
+
// Frontmatter MUST be at byte 0 for Cursor's YAML parser.
|
|
313
|
+
// Generated marker goes on the line immediately after the closing ---.
|
|
314
|
+
const content = frontmatter.join('\n') + '\n' + GENERATED_MARKER + '\n\n' + agentsMd.trim() + '\n' + refSection;
|
|
307
315
|
writeFileSync(join(cursorRulesDir, `${scopeToFilename(scope)}.mdc`), content);
|
|
308
316
|
count++;
|
|
309
317
|
}
|
|
@@ -318,10 +326,13 @@ function renderCursorRules(cwd, rulesDir, options = {}) {
|
|
|
318
326
|
}
|
|
319
327
|
|
|
320
328
|
function generateCursorAwRoutingRule() {
|
|
321
|
-
|
|
329
|
+
// Frontmatter MUST be at byte 0 for Cursor's alwaysApply/globs detection.
|
|
330
|
+
return `---
|
|
322
331
|
description: "AW global routing: select route, READ stage skill, then respond"
|
|
323
332
|
alwaysApply: true
|
|
324
333
|
---
|
|
334
|
+
${GENERATED_MARKER}
|
|
335
|
+
|
|
325
336
|
# AW Global Routing
|
|
326
337
|
|
|
327
338
|
## Hard Gate (MUST — do not skip)
|
|
@@ -460,7 +471,8 @@ function renderClaudeRules(cwd, rulesDir, options = {}) {
|
|
|
460
471
|
}
|
|
461
472
|
}
|
|
462
473
|
|
|
463
|
-
|
|
474
|
+
// Claude Code reads .md frontmatter similarly — keep marker after frontmatter.
|
|
475
|
+
const content = frontmatter + GENERATED_MARKER + '\n\n' + agentsMd.trim() + '\n' + refSection;
|
|
464
476
|
writeFileSync(join(claudeRulesDir, `${scopeToFilename(scope)}.md`), content);
|
|
465
477
|
count++;
|
|
466
478
|
}
|