@ghl-ai/aw 0.1.22 → 0.1.24
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 -18
- package/commands/pull.mjs +11 -1
- package/constants.mjs +1 -1
- package/package.json +1 -1
package/commands/init.mjs
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
// Uses git's built-in template hooks for automatic linking on clone/checkout.
|
|
5
5
|
// Uses IDE tasks for auto-pull on workspace open.
|
|
6
6
|
|
|
7
|
-
import { mkdirSync, existsSync, writeFileSync, symlinkSync, chmodSync
|
|
7
|
+
import { mkdirSync, existsSync, writeFileSync, symlinkSync, chmodSync } from 'node:fs';
|
|
8
8
|
import { execSync } from 'node:child_process';
|
|
9
9
|
import { join, dirname } from 'node:path';
|
|
10
10
|
import { homedir } from 'node:os';
|
|
@@ -111,17 +111,6 @@ function saveManifest(data) {
|
|
|
111
111
|
writeFileSync(MANIFEST_PATH, JSON.stringify(data, null, 2) + '\n');
|
|
112
112
|
}
|
|
113
113
|
|
|
114
|
-
// Place AW-PROTOCOL.md at .aw_registry root so any namespace can reference it
|
|
115
|
-
// as .aw_registry/AW-PROTOCOL.md regardless of team name.
|
|
116
|
-
// Source of truth in repo: registry/AW-PROTOCOL.md (mirrors this root placement).
|
|
117
|
-
// After ghl is pulled, ghl/AW-PROTOCOL.md is the local copy we hoist from.
|
|
118
|
-
function hoistProtocol(registryDir) {
|
|
119
|
-
const src = join(registryDir, 'ghl', 'AW-PROTOCOL.md');
|
|
120
|
-
const dest = join(registryDir, 'AW-PROTOCOL.md');
|
|
121
|
-
if (existsSync(src)) {
|
|
122
|
-
copyFileSync(src, dest);
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
114
|
|
|
126
115
|
export async function initCommand(args) {
|
|
127
116
|
const namespace = args['--namespace'] || null;
|
|
@@ -151,9 +140,6 @@ export async function initCommand(args) {
|
|
|
151
140
|
// Pull latest
|
|
152
141
|
pullCommand({ ...args, _positional: [], _workspaceDir: GLOBAL_AW_DIR, '--silent': silent });
|
|
153
142
|
|
|
154
|
-
// Hoist AW-PROTOCOL.md to registry root
|
|
155
|
-
hoistProtocol(GLOBAL_AW_DIR);
|
|
156
|
-
|
|
157
143
|
// Re-link IDE dirs (idempotent)
|
|
158
144
|
linkWorkspace(HOME);
|
|
159
145
|
generateCommands(HOME);
|
|
@@ -205,9 +191,6 @@ export async function initCommand(args) {
|
|
|
205
191
|
// Step 2: Pull registry content
|
|
206
192
|
pullCommand({ ...args, _positional: ['ghl'], _workspaceDir: GLOBAL_AW_DIR });
|
|
207
193
|
|
|
208
|
-
// Hoist AW-PROTOCOL.md to registry root so all namespaces can access it
|
|
209
|
-
hoistProtocol(GLOBAL_AW_DIR);
|
|
210
|
-
|
|
211
194
|
if (namespace) {
|
|
212
195
|
pullCommand({ ...args, _positional: ['[template]'], _renameNamespace: namespace, _workspaceDir: GLOBAL_AW_DIR });
|
|
213
196
|
}
|
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 = 'master';
|
|
5
5
|
|
|
6
6
|
/** Default registry repository */
|
|
7
7
|
export const REGISTRY_REPO = 'GoHighLevel/ghl-agentic-workspace';
|