@ghl-ai/aw 0.1.25-beta.11 → 0.1.25-beta.13
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/pull.mjs +3 -4
- package/integrate.mjs +11 -9
- package/package.json +1 -1
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
|
-
//
|
|
21
|
-
|
|
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 => !
|
|
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,16 +31,14 @@ 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 =
|
|
34
|
+
const namespaces = getTeamNamespaces(awDir);
|
|
34
35
|
|
|
35
36
|
for (const ns of namespaces) {
|
|
36
|
-
const commandsDir = join(awDir, ns, 'commands');
|
|
37
|
+
const commandsDir = join(awDir, ns, 'shared', 'commands');
|
|
37
38
|
mkdirSync(commandsDir, { recursive: true });
|
|
38
39
|
|
|
39
|
-
// 1. CLI commands
|
|
40
40
|
for (const cmd of AW_COMMANDS) {
|
|
41
41
|
const fileName = `${cmd.name}.md`;
|
|
42
|
-
// Skip if a hand-written command with same name exists
|
|
43
42
|
if (existsSync(join(commandsDir, fileName))) continue;
|
|
44
43
|
|
|
45
44
|
const content = [
|
|
@@ -460,10 +459,13 @@ No active tasks. Tasks are created during workflow execution.
|
|
|
460
459
|
fmt.logSuccess('Created .aw_docs/ (local orchestration state)');
|
|
461
460
|
}
|
|
462
461
|
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
462
|
+
/**
|
|
463
|
+
* Return team namespace paths from config (excludes 'platform').
|
|
464
|
+
* E.g. ['revex/courses'] — generated CLI commands only go into team namespaces.
|
|
465
|
+
*/
|
|
466
|
+
function getTeamNamespaces(awDir) {
|
|
467
|
+
const cfg = config.load(awDir);
|
|
468
|
+
if (!cfg || !cfg.include) return [];
|
|
469
|
+
return cfg.include.filter(p => p !== 'platform');
|
|
468
470
|
}
|
|
469
471
|
|