@ghl-ai/aw 0.1.34-beta.4 → 0.1.34-beta.6

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 +23 -1
  2. package/package.json +1 -1
package/commands/push.mjs CHANGED
@@ -33,7 +33,8 @@ function collectBatchFiles(folderAbsPath, workspaceDir) {
33
33
  const entries = walkRegistryTree(folderAbsPath, relPath);
34
34
  return entries.map(entry => {
35
35
  // Build the registry target path for git
36
- const registryTarget = entry.type === 'skills'
36
+ // Skills and evals both have nested slug subdirs (e.g. skills/slug/file, evals/agents/developer/file)
37
+ const registryTarget = (entry.type === 'skills' || entry.type === 'evals')
37
38
  ? `${REGISTRY_DIR}/${entry.namespacePath}/${entry.type}/${entry.slug}/${entry.skillRelPath || entry.filename}`
38
39
  : `${REGISTRY_DIR}/${entry.namespacePath}/${entry.type}/${entry.filename}`;
39
40
  return {
@@ -255,6 +256,13 @@ function pushFiles(files, { repo, dryRun, workspaceDir }) {
255
256
  // Stage all registry changes
256
257
  execSync(`git add "${REGISTRY_DIR}"`, { cwd: tempDir, stdio: 'pipe' });
257
258
 
259
+ // Check if there are actual changes to commit (files may already exist in remote)
260
+ const diffStatus = execSync('git diff --cached --name-only', { cwd: tempDir, encoding: 'utf8' }).trim();
261
+ if (!diffStatus) {
262
+ s2.stop('No changes');
263
+ fmt.cancel('Nothing to push — all files already exist in registry with identical content.');
264
+ }
265
+
258
266
  const prTitle = generatePrTitle(files);
259
267
  const commitMsg = files.length === 1
260
268
  ? `registry: add ${files[0].type}/${files[0].slug} to ${files[0].namespace}`
@@ -369,6 +377,20 @@ export function pushCommand(args) {
369
377
 
370
378
  // Folder/namespace input → batch push
371
379
  if (statSync(absPath).isDirectory()) {
380
+ // Check if user is pointing at a type dir (agents/, skills/, etc.) directly
381
+ const dirName = basename(absPath);
382
+ const PUSHABLE_TYPE_DIRS = new Set(['agents', 'skills', 'commands', 'evals']);
383
+ if (PUSHABLE_TYPE_DIRS.has(dirName)) {
384
+ const parentPath = dirname(absPath);
385
+ const parentRel = relative(workspaceDir, parentPath);
386
+ fmt.cancel([
387
+ `Cannot push a type directory directly (${chalk.cyan(dirName)}/).`,
388
+ '',
389
+ ` Push the parent namespace instead:`,
390
+ ` ${chalk.bold(`aw push .aw_registry/${parentRel}`)}`,
391
+ ].join('\n'));
392
+ }
393
+
372
394
  const files = collectBatchFiles(absPath, workspaceDir);
373
395
  if (files.length === 0) {
374
396
  fmt.cancel(`Nothing to push in ${chalk.cyan(input)} — no agents, skills, commands, or evals found.`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ghl-ai/aw",
3
- "version": "0.1.34-beta.4",
3
+ "version": "0.1.34-beta.6",
4
4
  "description": "Agentic Workspace CLI — pull, push & manage agents, skills and commands from the registry",
5
5
  "type": "module",
6
6
  "bin": {