@ghl-ai/aw 0.1.71-beta.0 → 0.1.71

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/cli.mjs CHANGED
@@ -153,8 +153,8 @@ function printHelp() {
153
153
 
154
154
  sec('Upload'),
155
155
  cmd('aw push', 'Push all modified files (creates one PR)'),
156
- cmd('aw push --aw-docs-only', 'Publish generated .aw_docs companions and print share links'),
157
156
  cmd('aw push --aw-docs-only --feature <slug>', 'Publish one .aw_docs feature folder and print share links'),
157
+ cmd('aw push --aw-docs-only --all', 'Publish ALL .aw_docs feature folders (explicit opt-in; otherwise scope with --feature)'),
158
158
  cmd('aw push <path>', 'Push file, folder, or namespace to registry'),
159
159
  cmd('aw push-rules [path]', 'Push platform rules to platform-docs'),
160
160
  cmd('aw push --dry-run [path]', 'Preview what would be pushed'),
@@ -240,7 +240,11 @@ export async function run(argv) {
240
240
  process.exit(0);
241
241
  }
242
242
 
243
- if (args['--help'] && !command) {
243
+ // Help must short-circuit BEFORE dispatching any command. Otherwise a
244
+ // command combined with --help (e.g. `aw push --help`) skips this gate and
245
+ // executes the command — which is how `aw push --help` triggered a real
246
+ // publish instead of printing help.
247
+ if (args['--help']) {
244
248
  printHelp();
245
249
  process.exit(0);
246
250
  }
@@ -1369,7 +1369,8 @@ export async function doctorCommand(args = {}) {
1369
1369
  fmt.note(formatFixPlan(plan), 'Auto-Fix Plan');
1370
1370
 
1371
1371
  if (dryRun) {
1372
- fmt.outro('⟁ aw doctor auto-fix dry run complete');
1372
+ setDoctorExitCode(report);
1373
+ fmt.outro(`⟁ aw doctor auto-fix dry run complete (${report.status.toUpperCase()})`);
1373
1374
  return;
1374
1375
  }
1375
1376
 
package/commands/push.mjs CHANGED
@@ -188,6 +188,20 @@ function resolveAwDocsScope(input, featureFlag) {
188
188
  return flagScope || inputScope;
189
189
  }
190
190
 
191
+ // A docs-only publish with no resolved scope would sweep EVERY
192
+ // .aw_docs/features/** folder into the shared docs repo. Require an explicit
193
+ // --all opt-in so an unscoped invocation (or one that lands here accidentally)
194
+ // fails closed instead of mass-publishing unrelated feature folders.
195
+ function assertDocsOnlyScopeOrAll(scope, all) {
196
+ if (!scope && all !== true) {
197
+ throw new Error(
198
+ 'Refusing to publish ALL .aw_docs/features/** at once. Pass --feature <slug> ' +
199
+ '(or a .aw_docs/features/<slug> path) to publish one feature folder, or pass ' +
200
+ '--all to publish everything intentionally.'
201
+ );
202
+ }
203
+ }
204
+
191
205
  function collectProjectAwDocs(cwd, home, scope = null) {
192
206
  const projectRoot = getProjectRoot(cwd, home);
193
207
  const source = join(projectRoot, AW_DOCS_DIR);
@@ -1284,6 +1298,7 @@ export async function pushCommand(args) {
1284
1298
  if (docsOnly) {
1285
1299
  try {
1286
1300
  const scope = resolveAwDocsScope(input, args['--feature']);
1301
+ assertDocsOnlyScopeOrAll(scope, args['--all'] === true);
1287
1302
  const result = await publishProjectAwDocs(cwd, HOME, dryRun, scope);
1288
1303
  if (!result.hasDocs) {
1289
1304
  fmt.cancel(scope
@@ -1608,3 +1623,10 @@ function groupBy(arr, key) {
1608
1623
  }
1609
1624
  return result;
1610
1625
  }
1626
+
1627
+ export const __test__ = {
1628
+ featureScopeFromInput,
1629
+ awDocsFeatureScope,
1630
+ resolveAwDocsScope,
1631
+ assertDocsOnlyScopeOrAll,
1632
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ghl-ai/aw",
3
- "version": "0.1.71-beta.0",
3
+ "version": "0.1.71",
4
4
  "description": "Agentic Workspace CLI — pull, push & manage agents, skills and commands from the registry",
5
5
  "type": "module",
6
6
  "bin": {