@ghl-ai/aw 0.1.39 → 0.1.41-beta.0

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/commands/init.mjs CHANGED
@@ -371,7 +371,7 @@ export async function initCommand(args) {
371
371
  }
372
372
 
373
373
  // Determine sparse paths
374
- const sparsePaths = [`.aw_registry/platform`, `content`, RULES_SOURCE_DIR, `.aw_registry/AW-PROTOCOL.md`, `CODEOWNERS`];
374
+ const sparsePaths = [`.aw_registry/platform`, `content`, RULES_SOURCE_DIR, `.aw_registry/AW-PROTOCOL.md`, `CODEOWNERS`, `.github/CODEOWNERS`];
375
375
  if (folderName) {
376
376
  sparsePaths.push(`.aw_registry/${folderName}`);
377
377
  }
package/commands/push.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  // commands/push.mjs — Push local agents/skills to registry via PR using persistent git clone
2
2
 
3
3
  import { existsSync, statSync, readFileSync, appendFileSync } from 'node:fs';
4
- import { join, dirname } from 'node:path';
4
+ import { join, dirname, relative } from 'node:path';
5
5
  import { fileURLToPath } from 'node:url';
6
6
  import { exec as execCb, execFile as execFileCb } from 'node:child_process';
7
7
  import { promisify } from 'node:util';
@@ -361,7 +361,11 @@ async function doPush(files, awHome, dryRun, worktreeFlow = false, preStaged = f
361
361
 
362
362
  // CODEOWNERS for new namespaces (runs inside spinner so no silent gap)
363
363
  const topNamespaces = [...new Set(files.map(f => f.namespace.split('/')[0]))];
364
- const codeownersPath = join(awHome, 'CODEOWNERS');
364
+ // GitHub looks for CODEOWNERS in .github/ first (takes precedence over root).
365
+ // platform-docs has .github/CODEOWNERS as the authoritative file.
366
+ const codeownersPath = existsSync(join(awHome, '.github', 'CODEOWNERS'))
367
+ ? join(awHome, '.github', 'CODEOWNERS')
368
+ : join(awHome, 'CODEOWNERS');
365
369
  const newNamespaces = [];
366
370
  const ghUser = await getGitHubUser();
367
371
  for (const ns of topNamespaces) {
@@ -374,7 +378,8 @@ async function doPush(files, awHome, dryRun, worktreeFlow = false, preStaged = f
374
378
 
375
379
  const pathsToStage = files.map(f => f.registryTarget);
376
380
  if (newNamespaces.length > 0 && existsSync(codeownersPath)) {
377
- pathsToStage.push('CODEOWNERS');
381
+ // Stage the correct relative path (could be .github/CODEOWNERS or root CODEOWNERS)
382
+ pathsToStage.push(relative(awHome, codeownersPath));
378
383
  }
379
384
  // Also stage any extra paths (content/, CODEOWNERS manual edits) passed from the caller
380
385
  for (const p of extraPaths) {
@@ -473,17 +478,17 @@ export async function pushCommand(args) {
473
478
  if (!input) {
474
479
  const rulesChanged = hasRulesChanges(cwd);
475
480
 
476
- // Extra paths outside .aw_registry/ that aw also manages: content/ and CODEOWNERS.
481
+ // Extra paths outside .aw_registry/ that aw also manages: content/, CODEOWNERS, .github/CODEOWNERS.
477
482
  // Detect staged variants for staged-mode and unstaged variants for auto-mode.
478
483
  const getExtraStagedPaths = async () => {
479
484
  try {
480
- const { stdout } = await exec(`git -C "${awHome}" diff --cached --name-only -- content/ CODEOWNERS`);
485
+ const { stdout } = await exec(`git -C "${awHome}" diff --cached --name-only -- content/ CODEOWNERS .github/CODEOWNERS`);
481
486
  return stdout.trim().split('\n').filter(Boolean);
482
487
  } catch { return []; }
483
488
  };
484
489
  const getExtraChangedPaths = async () => {
485
490
  try {
486
- const { stdout } = await exec(`git -C "${awHome}" status --porcelain -- content/ CODEOWNERS`);
491
+ const { stdout } = await exec(`git -C "${awHome}" status --porcelain -- content/ CODEOWNERS .github/CODEOWNERS`);
487
492
  // git status --porcelain prefix is XY (2 chars) + optional space + path.
488
493
  // Staged-only files: `M path` (2-char prefix); unstaged files: ` M path` (3-char prefix).
489
494
  // slice(2).trimStart() handles both cases correctly.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ghl-ai/aw",
3
- "version": "0.1.39",
3
+ "version": "0.1.41-beta.0",
4
4
  "description": "Agentic Workspace CLI — pull, push & manage agents, skills and commands from the registry",
5
5
  "type": "module",
6
6
  "bin": {