@ghl-ai/aw 0.1.34-beta.5 → 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 +21 -0
  2. package/package.json +1 -1
package/commands/push.mjs CHANGED
@@ -256,6 +256,13 @@ function pushFiles(files, { repo, dryRun, workspaceDir }) {
256
256
  // Stage all registry changes
257
257
  execSync(`git add "${REGISTRY_DIR}"`, { cwd: tempDir, stdio: 'pipe' });
258
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
+
259
266
  const prTitle = generatePrTitle(files);
260
267
  const commitMsg = files.length === 1
261
268
  ? `registry: add ${files[0].type}/${files[0].slug} to ${files[0].namespace}`
@@ -370,6 +377,20 @@ export function pushCommand(args) {
370
377
 
371
378
  // Folder/namespace input → batch push
372
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
+
373
394
  const files = collectBatchFiles(absPath, workspaceDir);
374
395
  if (files.length === 0) {
375
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.5",
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": {