@ghl-ai/aw 0.1.21 → 0.1.23
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 +1 -0
- package/commands/pull.mjs +11 -1
- package/constants.mjs +1 -1
- package/git.mjs +1 -0
- package/link.mjs +16 -0
- package/package.json +1 -1
package/commands/init.mjs
CHANGED
package/commands/pull.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// commands/pull.mjs — Pull content from registry
|
|
2
2
|
|
|
3
|
-
import { mkdirSync, existsSync, readdirSync } from 'node:fs';
|
|
3
|
+
import { mkdirSync, existsSync, readdirSync, copyFileSync } from 'node:fs';
|
|
4
4
|
import { join } from 'node:path';
|
|
5
5
|
import { homedir } from 'node:os';
|
|
6
6
|
import { execSync } from 'node:child_process';
|
|
@@ -161,6 +161,16 @@ export function pullCommand(args) {
|
|
|
161
161
|
updateManifest(workspaceDir, actions, cfg.namespace);
|
|
162
162
|
s2.stop('Changes applied');
|
|
163
163
|
|
|
164
|
+
// Copy root-level registry files (e.g. AW-PROTOCOL.md) that are fetched via
|
|
165
|
+
// sparse checkout but never processed by walkRegistryTree (dirs-only pipeline).
|
|
166
|
+
const ROOT_REGISTRY_FILES = ['AW-PROTOCOL.md'];
|
|
167
|
+
for (const fname of ROOT_REGISTRY_FILES) {
|
|
168
|
+
const src = join(regBase, fname);
|
|
169
|
+
if (existsSync(src)) {
|
|
170
|
+
copyFileSync(src, join(workspaceDir, fname));
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
|
|
164
174
|
// MCP registration (second-class — skip if not available)
|
|
165
175
|
if (cfg.namespace) {
|
|
166
176
|
registerMcp(cfg.namespace);
|
package/constants.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// constants.mjs — Single source of truth for registry settings.
|
|
2
2
|
|
|
3
3
|
/** Base branch for PRs and sync checkout */
|
|
4
|
-
export const REGISTRY_BASE_BRANCH = '
|
|
4
|
+
export const REGISTRY_BASE_BRANCH = 'chore/imp-command';
|
|
5
5
|
|
|
6
6
|
/** Default registry repository */
|
|
7
7
|
export const REGISTRY_REPO = 'GoHighLevel/ghl-agentic-workspace';
|
package/git.mjs
CHANGED
package/link.mjs
CHANGED
|
@@ -201,6 +201,22 @@ export function linkWorkspace(cwd) {
|
|
|
201
201
|
}
|
|
202
202
|
}
|
|
203
203
|
|
|
204
|
+
// AW-PROTOCOL.md: symlink into each IDE dir root so commands can always find it
|
|
205
|
+
const protocolSrc = join(awDir, 'AW-PROTOCOL.md');
|
|
206
|
+
if (existsSync(protocolSrc)) {
|
|
207
|
+
for (const ide of IDE_DIRS) {
|
|
208
|
+
const linkPath = join(cwd, ide, 'AW-PROTOCOL.md');
|
|
209
|
+
const relTarget = relative(join(cwd, ide), protocolSrc);
|
|
210
|
+
try {
|
|
211
|
+
if (existsSync(linkPath) || lstatSync(linkPath).isSymbolicLink()) unlinkSync(linkPath);
|
|
212
|
+
} catch { /* not there yet */ }
|
|
213
|
+
try {
|
|
214
|
+
execSync(`ln -sfn "${relTarget}" "${linkPath}"`, { stdio: 'pipe' });
|
|
215
|
+
created++;
|
|
216
|
+
} catch { /* best effort */ }
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
|
|
204
220
|
if (created > 0) {
|
|
205
221
|
fmt.logSuccess(`Linked ${created} IDE symlink${created > 1 ? 's' : ''}`);
|
|
206
222
|
}
|