@ghl-ai/aw 0.1.25-beta.10 → 0.1.25-beta.11
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 +10 -0
- package/package.json +1 -1
- package/plan.mjs +7 -5
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/package.json
CHANGED
package/plan.mjs
CHANGED
|
@@ -24,11 +24,12 @@ export function computePlan(registryDirs, workspaceDir, includePatterns = [], {
|
|
|
24
24
|
continue;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
//
|
|
28
|
-
//
|
|
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,
|