@ghl-ai/aw 0.1.25-beta.10 → 0.1.25-beta.12

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
@@ -171,6 +171,16 @@ export async function initCommand(args) {
171
171
  ].join('\n'));
172
172
  }
173
173
 
174
+ if (team && !subTeam) {
175
+ fmt.cancel([
176
+ `Missing sub-team in ${chalk.red(namespace)}`,
177
+ '',
178
+ ` ${chalk.dim('Format:')} --namespace <team>/<sub-team>`,
179
+ '',
180
+ ` ${chalk.dim('Example:')} ${chalk.bold(`aw init --namespace ${team}/courses`)}`,
181
+ ].join('\n'));
182
+ }
183
+
174
184
  const SLUG_RE = /^[a-z][a-z0-9-]{1,38}[a-z0-9]$/;
175
185
  if (team && !SLUG_RE.test(team)) {
176
186
  fmt.cancel(`Invalid team '${team}' — must match: ${SLUG_RE}`);
package/commands/pull.mjs CHANGED
@@ -17,12 +17,11 @@ import { resolveInput } from '../paths.mjs';
17
17
  import { linkWorkspace } from '../link.mjs';
18
18
  import { generateCommands, copyInstructions } from '../integrate.mjs';
19
19
 
20
- // Platform-level types to skip (CLI meta-docs, not useful as agent content)
21
- const SKIP_PLATFORM_TYPES = new Set(['commands']);
22
-
20
+ // Filter out top-level platform CLI meta-commands (drop, pull, push, etc.)
21
+ // but keep domain-specific commands (platform/design/commands/, platform/infra/commands/).
23
22
  function filterActions(actions, pattern) {
24
23
  if (pattern !== 'platform') return actions;
25
- return actions.filter(a => !SKIP_PLATFORM_TYPES.has(a.type));
24
+ return actions.filter(a => !(a.type === 'commands' && a.namespacePath === 'platform'));
26
25
  }
27
26
 
28
27
  export async function pullCommand(args) {
package/integrate.mjs CHANGED
@@ -3,6 +3,7 @@
3
3
  import { existsSync, mkdirSync, writeFileSync, readFileSync, readdirSync, rmSync } from 'node:fs';
4
4
  import { join } from 'node:path';
5
5
  import * as fmt from './fmt.mjs';
6
+ import * as config from './config.mjs';
6
7
 
7
8
  // AW CLI commands to generate
8
9
  const AW_COMMANDS = [
@@ -30,7 +31,7 @@ export function generateCommands(cwd) {
30
31
  if (existsSync(oldGenDir)) rmSync(oldGenDir, { recursive: true, force: true });
31
32
 
32
33
  let count = 0;
33
- const namespaces = listNamespaceDirs(awDir);
34
+ const namespaces = getTeamNamespaces(awDir);
34
35
 
35
36
  for (const ns of namespaces) {
36
37
  const commandsDir = join(awDir, ns, 'commands');
@@ -460,10 +461,13 @@ No active tasks. Tasks are created during workflow execution.
460
461
  fmt.logSuccess('Created .aw_docs/ (local orchestration state)');
461
462
  }
462
463
 
463
- function listNamespaceDirs(awDir) {
464
- if (!existsSync(awDir)) return [];
465
- return readdirSync(awDir, { withFileTypes: true })
466
- .filter(d => d.isDirectory() && !d.name.startsWith('.'))
467
- .map(d => d.name);
464
+ /**
465
+ * Return team namespace paths from config (excludes 'platform').
466
+ * E.g. ['revex/courses'] generated CLI commands only go into team namespaces.
467
+ */
468
+ function getTeamNamespaces(awDir) {
469
+ const cfg = config.load(awDir);
470
+ if (!cfg || !cfg.include) return [];
471
+ return cfg.include.filter(p => p !== 'platform');
468
472
  }
469
473
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ghl-ai/aw",
3
- "version": "0.1.25-beta.10",
3
+ "version": "0.1.25-beta.12",
4
4
  "description": "Agentic Workspace CLI — pull, push & manage agents, skills and commands from the registry",
5
5
  "type": "module",
6
6
  "bin": {
package/plan.mjs CHANGED
@@ -24,11 +24,12 @@ export function computePlan(registryDirs, workspaceDir, includePatterns = [], {
24
24
  continue;
25
25
  }
26
26
 
27
- // For skill files: key includes relative path to avoid collisions
28
- // For other files: key is type/slug
27
+ // Key must include namespacePath to avoid collisions when the same
28
+ // slug exists under different domains (e.g. backend/agents/developer
29
+ // vs frontend/agents/developer).
29
30
  const key = entry.skillRelPath
30
- ? `${entry.type}/${entry.slug}/${entry.skillRelPath}`
31
- : `${entry.type}/${entry.slug}`;
31
+ ? `${entry.namespacePath}/${entry.type}/${entry.slug}/${entry.skillRelPath}`
32
+ : `${entry.namespacePath}/${entry.type}/${entry.slug}`;
32
33
  plan.set(key, { ...entry, source: entry.namespacePath || name });
33
34
  }
34
35
  }
@@ -108,9 +109,10 @@ export function computePlan(registryDirs, workspaceDir, includePatterns = [], {
108
109
  }
109
110
  }
110
111
  if (typeIdx === -1) continue;
112
+ const namespace = parts.slice(0, typeIdx).join('/');
111
113
  const type = parts[typeIdx];
112
114
  const slug = parts[typeIdx + 1]?.replace(/\.md$/, '');
113
- const key = `${type}/${slug}`;
115
+ const key = `${namespace}/${type}/${slug}`;
114
116
  if (!plan.has(key)) {
115
117
  actions.push({
116
118
  slug,