@ghl-ai/aw 0.1.82 → 0.1.83

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.
Files changed (2) hide show
  1. package/commands/push.mjs +12 -2
  2. package/package.json +1 -1
package/commands/push.mjs CHANGED
@@ -431,6 +431,10 @@ async function removeTrackedAwSymlink(cloneDir) {
431
431
  return false;
432
432
  }
433
433
 
434
+ // `.aw` is always kept inside the sparse-checkout cone (see AW_DOCS_CACHE_PATH
435
+ // in ensureAwDocsRepoClone) so this remove works even on blobless/sparse
436
+ // clones. Without that, git rejects the rm with "outside sparse-checkout
437
+ // definition" against repos that track a real .aw/ tree (e.g. ghl-aw-docs).
434
438
  await execFile('git', ['rm', '-f', '.aw'], {
435
439
  cwd: cloneDir,
436
440
  encoding: 'utf8',
@@ -579,6 +583,12 @@ async function getProjectSourceRepo(projectRoot) {
579
583
  const AW_DOCS_GIT_ENV = { ...process.env, GIT_TERMINAL_PROMPT: '0', GCM_INTERACTIVE: 'never' };
580
584
  const AW_DOCS_CLONE_TIMEOUT_MS = Number(process.env.AW_DOCS_GIT_TIMEOUT_MS) || 180000;
581
585
  const AW_DOCS_NET_TIMEOUT_MS = Number(process.env.AW_DOCS_GIT_TIMEOUT_MS) || 120000;
586
+ // `.aw` is always kept in the sparse-checkout cone. The docs repo may track a
587
+ // real `.aw/` tree (e.g. ghl-aw-docs tracks `.aw/.aw_rules/**`), and the
588
+ // cache-management code (removeTrackedAwSymlink, selfHeal*) runs write git ops
589
+ // on `.aw`. Excluding it from the cone makes those ops fail with "outside
590
+ // sparse-checkout definition" and breaks every publish against such a repo.
591
+ const AW_DOCS_CACHE_PATH = '.aw';
582
592
 
583
593
  async function awDocsSparseEnabled(cloneDir) {
584
594
  try {
@@ -615,7 +625,7 @@ async function ensureAwDocsRepoClone(home, publishConfig, sparseIncludePaths = [
615
625
  timeout: AW_DOCS_CLONE_TIMEOUT_MS,
616
626
  });
617
627
  if (wantSparse) {
618
- await execFile('git', ['sparse-checkout', 'set', '--cone', ...sparseIncludePaths], {
628
+ await execFile('git', ['sparse-checkout', 'set', '--cone', ...sparseIncludePaths, AW_DOCS_CACHE_PATH], {
619
629
  cwd: cloneDir,
620
630
  encoding: 'utf8',
621
631
  }).catch(() => { /* sparse unsupported → full checkout below */ });
@@ -651,7 +661,7 @@ async function ensureAwDocsRepoClone(home, publishConfig, sparseIncludePaths = [
651
661
  // clones that already use sparse-checkout (i.e. the blobless clones we
652
662
  // created) — legacy full clones are left untouched so there is no regression.
653
663
  if (wantSparse && await awDocsSparseEnabled(cloneDir)) {
654
- await execFile('git', ['sparse-checkout', 'add', ...sparseIncludePaths], {
664
+ await execFile('git', ['sparse-checkout', 'add', ...sparseIncludePaths, AW_DOCS_CACHE_PATH], {
655
665
  cwd: cloneDir,
656
666
  encoding: 'utf8',
657
667
  }).catch(() => { /* best effort — checkout below still works */ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ghl-ai/aw",
3
- "version": "0.1.82",
3
+ "version": "0.1.83",
4
4
  "description": "Agentic Workspace CLI — pull, push & manage agents, skills and commands from the registry",
5
5
  "type": "module",
6
6
  "bin": {