@ghl-ai/aw 0.1.34-beta.3 → 0.1.34-beta.5
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/push.mjs +11 -5
- package/package.json +1 -1
package/commands/push.mjs
CHANGED
|
@@ -20,15 +20,21 @@ const PUSHABLE_TYPES = ['agents', 'skills', 'commands', 'evals'];
|
|
|
20
20
|
* Returns array of { absPath, registryTarget, type, namespace, slug, isDir }.
|
|
21
21
|
*/
|
|
22
22
|
function collectBatchFiles(folderAbsPath, workspaceDir) {
|
|
23
|
-
// Determine the namespace
|
|
23
|
+
// Determine the full namespace from path relative to workspaceDir.
|
|
24
|
+
// e.g. relPath = "revex/courses/backend" → we need to figure out which
|
|
25
|
+
// segments are namespace vs type dirs (agents/skills/commands/evals).
|
|
26
|
+
// walkRegistryTree will find type dirs inside folderAbsPath and prepend
|
|
27
|
+
// baseName as the namespace prefix. If folderAbsPath IS the namespace root
|
|
28
|
+
// (contains type dirs directly), baseName should be the full relPath.
|
|
29
|
+
// If folderAbsPath contains sub-dirs that eventually hold type dirs,
|
|
30
|
+
// walkRegistryTree recurses and appends sub-dir names to pathSegments.
|
|
24
31
|
const relPath = relative(workspaceDir, folderAbsPath);
|
|
25
|
-
const nameSegments = relPath.split('/');
|
|
26
|
-
const baseName = nameSegments[0];
|
|
27
32
|
|
|
28
|
-
const entries = walkRegistryTree(folderAbsPath,
|
|
33
|
+
const entries = walkRegistryTree(folderAbsPath, relPath);
|
|
29
34
|
return entries.map(entry => {
|
|
30
35
|
// Build the registry target path for git
|
|
31
|
-
|
|
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')
|
|
32
38
|
? `${REGISTRY_DIR}/${entry.namespacePath}/${entry.type}/${entry.slug}/${entry.skillRelPath || entry.filename}`
|
|
33
39
|
: `${REGISTRY_DIR}/${entry.namespacePath}/${entry.type}/${entry.filename}`;
|
|
34
40
|
return {
|