@ghl-ai/aw 0.1.36-beta.27 → 0.1.36-beta.29
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/cli.mjs +1 -1
- package/commands/link-project.mjs +7 -7
- package/commands/pull.mjs +5 -3
- package/commands/push.mjs +6 -6
- package/commands/status.mjs +1 -1
- package/fmt.mjs +1 -1
- package/integrate.mjs +2 -2
- package/link.mjs +2 -2
- package/package.json +1 -1
package/cli.mjs
CHANGED
|
@@ -65,7 +65,7 @@ function parseArgs(argv) {
|
|
|
65
65
|
|
|
66
66
|
function printHelp() {
|
|
67
67
|
fmt.banner('aw', {
|
|
68
|
-
subtitle: ` ${chalk.dim('v' + VERSION)} ${chalk.hex('#FF6B35')('Agentic Workspace CLI')} ${chalk.dim('— pull, push & manage agents, skills and more from the registry')}`,
|
|
68
|
+
subtitle: ` ${chalk.hex('#FF6B35')('⟁')} ${chalk.dim('v' + VERSION)} ${chalk.hex('#FF6B35')('Agentic Workspace CLI')} ${chalk.dim('— pull, push & manage agents, skills and more from the registry')}`,
|
|
69
69
|
});
|
|
70
70
|
|
|
71
71
|
const cmd = (c, d) => ` ${chalk.hex('#FF6B35')(c.padEnd(38))} ${chalk.dim(d)}`;
|
|
@@ -38,9 +38,9 @@ export function linkProjectCommand(args) {
|
|
|
38
38
|
// Worktree exists — refresh global IDE symlinks pointing to this project's registry
|
|
39
39
|
const projectRegistryDir = join(worktreeDir, REGISTRY_DIR);
|
|
40
40
|
const awDirForLinks = existsSync(projectRegistryDir) ? projectRegistryDir : null;
|
|
41
|
-
linkWorkspace(HOME, awDirForLinks);
|
|
42
|
-
generateCommands(HOME);
|
|
43
|
-
fmt.logSuccess(`Already linked — refreshed IDE symlinks`);
|
|
41
|
+
const symlinks = linkWorkspace(HOME, awDirForLinks, { silent: true });
|
|
42
|
+
const commands = generateCommands(HOME, { silent: true });
|
|
43
|
+
fmt.logSuccess(`Already linked — refreshed ${chalk.bold(symlinks)} IDE symlinks · ${chalk.bold(commands)} commands`);
|
|
44
44
|
return;
|
|
45
45
|
}
|
|
46
46
|
|
|
@@ -48,10 +48,10 @@ export function linkProjectCommand(args) {
|
|
|
48
48
|
addProjectWorktree(AW_HOME, cwd);
|
|
49
49
|
const projectRegistryDir = join(worktreeDir, REGISTRY_DIR);
|
|
50
50
|
const awDirForLinks = existsSync(projectRegistryDir) ? projectRegistryDir : null;
|
|
51
|
-
linkWorkspace(HOME, awDirForLinks);
|
|
52
|
-
generateCommands(HOME);
|
|
51
|
+
const symlinks = linkWorkspace(HOME, awDirForLinks, { silent: true });
|
|
52
|
+
const commands = generateCommands(HOME, { silent: true });
|
|
53
53
|
fmt.logSuccess([
|
|
54
|
-
`
|
|
54
|
+
`Project linked — ${chalk.bold(symlinks)} IDE symlinks · ${chalk.bold(commands)} commands`,
|
|
55
55
|
'',
|
|
56
56
|
` ${chalk.green('✓')} ${chalk.dim('.aw/')} git worktree (IDE git panel enabled)`,
|
|
57
57
|
` ${chalk.green('✓')} ${chalk.dim(`.aw/${REGISTRY_DIR}/`)} registry content`,
|
|
@@ -61,5 +61,5 @@ export function linkProjectCommand(args) {
|
|
|
61
61
|
fmt.cancel(`Failed to link project: ${e.message}`);
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
-
fmt.outro('Done');
|
|
64
|
+
fmt.outro('⟁ Done');
|
|
65
65
|
}
|
package/commands/pull.mjs
CHANGED
|
@@ -33,6 +33,8 @@ export async function pullCommand(args) {
|
|
|
33
33
|
spinner: silent ? () => ({ start: () => {}, stop: () => {} }) : fmt.spinner,
|
|
34
34
|
};
|
|
35
35
|
|
|
36
|
+
if (!silent) fmt.intro('aw pull');
|
|
37
|
+
|
|
36
38
|
const repoUrl = REGISTRY_URL;
|
|
37
39
|
const hasClone = isValidClone(AW_HOME, repoUrl);
|
|
38
40
|
|
|
@@ -128,14 +130,14 @@ export async function pullCommand(args) {
|
|
|
128
130
|
// so edits to project/.aw/.aw_registry/ are instantly visible in global IDE dirs.
|
|
129
131
|
const projectRegistryDir = cwd !== HOME ? join(cwd, '.aw', REGISTRY_DIR) : null;
|
|
130
132
|
const awDirForLinks = (projectRegistryDir && existsSync(projectRegistryDir)) ? projectRegistryDir : null;
|
|
131
|
-
linkWorkspace(HOME, awDirForLinks);
|
|
132
|
-
generateCommands(HOME);
|
|
133
|
+
linkWorkspace(HOME, awDirForLinks, { silent });
|
|
134
|
+
generateCommands(HOME, { silent });
|
|
133
135
|
copyInstructions(HOME, null, cfg.namespace);
|
|
134
136
|
}
|
|
135
137
|
|
|
136
138
|
if (!silent) {
|
|
137
139
|
registerMcp(cfg.namespace);
|
|
138
|
-
log.outro('Pull complete');
|
|
140
|
+
log.outro('⟁ Pull complete');
|
|
139
141
|
}
|
|
140
142
|
}
|
|
141
143
|
|
package/commands/push.mjs
CHANGED
|
@@ -179,8 +179,8 @@ function generatePrBody(files, newNamespaces, awHome = null) {
|
|
|
179
179
|
function generateCommitMsg(files) {
|
|
180
180
|
const added = files.filter(f => !f.deleted);
|
|
181
181
|
const deleted = files.filter(f => f.deleted);
|
|
182
|
-
const addedParts = Object.entries(groupBy(added, 'type')).map(([t, items]) => `${items.length} ${t}`);
|
|
183
|
-
const deletedParts = Object.entries(groupBy(deleted, 'type')).map(([t, items]) => `${items.length} ${t} removed`);
|
|
182
|
+
const addedParts = Object.entries(groupBy(added, 'type')).map(([t, items]) => `${items.length} ${singular(t, items.length)}`);
|
|
183
|
+
const deletedParts = Object.entries(groupBy(deleted, 'type')).map(([t, items]) => `${items.length} ${singular(t, items.length)} removed`);
|
|
184
184
|
const countParts = [...addedParts, ...deletedParts];
|
|
185
185
|
|
|
186
186
|
if (files.length === 1) {
|
|
@@ -284,7 +284,7 @@ function createOrUpdatePR(awHome, branch, prTitle, prBody) {
|
|
|
284
284
|
try {
|
|
285
285
|
const url = execFileSync('gh', [
|
|
286
286
|
'pr', 'view', branch, '--json', 'url', '--jq', '.url',
|
|
287
|
-
], { cwd: awHome, encoding: 'utf8' }).trim();
|
|
287
|
+
], { cwd: awHome, encoding: 'utf8', stdio: ['pipe', 'pipe', 'pipe'] }).trim();
|
|
288
288
|
if (url) return { url, updated: true };
|
|
289
289
|
} catch { /* no existing PR */ }
|
|
290
290
|
|
|
@@ -316,8 +316,8 @@ function doPush(files, awHome, dryRun, worktreeFlow = false, preStaged = false)
|
|
|
316
316
|
const added = files.filter(f => !f.deleted);
|
|
317
317
|
const deleted = files.filter(f => f.deleted);
|
|
318
318
|
|
|
319
|
-
const addedParts = Object.entries(groupBy(added, 'type')).map(([t, items]) => `${items.length} ${t}`);
|
|
320
|
-
const deletedParts = Object.entries(groupBy(deleted, 'type')).map(([t, items]) => `${items.length} ${t} removed`);
|
|
319
|
+
const addedParts = Object.entries(groupBy(added, 'type')).map(([t, items]) => `${items.length} ${singular(t, items.length)}`);
|
|
320
|
+
const deletedParts = Object.entries(groupBy(deleted, 'type')).map(([t, items]) => `${items.length} ${singular(t, items.length)} removed`);
|
|
321
321
|
const countParts = [...addedParts, ...deletedParts];
|
|
322
322
|
|
|
323
323
|
if (files.length === 0) {
|
|
@@ -401,7 +401,7 @@ function doPush(files, awHome, dryRun, worktreeFlow = false, preStaged = false)
|
|
|
401
401
|
fmt.logInfo(chalk.dim(`On branch ${finalBranch} — run aw push again to open a new PR`));
|
|
402
402
|
}
|
|
403
403
|
fmt.logSuccess(`PR: ${chalk.cyan(prUrl)}`);
|
|
404
|
-
fmt.outro('Push complete');
|
|
404
|
+
fmt.outro('⟁ Push complete');
|
|
405
405
|
}
|
|
406
406
|
|
|
407
407
|
// ── Main command ─────────────────────────────────────────────────────
|
package/commands/status.mjs
CHANGED
|
@@ -102,5 +102,5 @@ export function statusCommand(args) {
|
|
|
102
102
|
fmt.logInfo(`Push changes: ${chalk.dim('aw push')} or ${chalk.dim('aw push <path>')}`);
|
|
103
103
|
}
|
|
104
104
|
|
|
105
|
-
fmt.outro(
|
|
105
|
+
fmt.outro(`⟁ ${chalk.dim('aw pull')} to fetch latest`);
|
|
106
106
|
}
|
package/fmt.mjs
CHANGED
|
@@ -33,7 +33,7 @@ export function banner(text, opts = {}) {
|
|
|
33
33
|
|
|
34
34
|
// ─── Clack wrappers ───
|
|
35
35
|
|
|
36
|
-
export const intro = (msg) => p.intro(chalk.
|
|
36
|
+
export const intro = (msg) => p.intro(chalk.bgHex('#FF6B35').black(` ⟁ ${msg} `));
|
|
37
37
|
export const outro = (msg) => p.outro(chalk.green(msg));
|
|
38
38
|
export const spinner = () => p.spinner();
|
|
39
39
|
export const select = p.select;
|
package/integrate.mjs
CHANGED
|
@@ -11,7 +11,7 @@ import { getLocalRegistryDir } from './git.mjs';
|
|
|
11
11
|
* Count hand-written commands already present in the registry.
|
|
12
12
|
* No CLI stub generation — all commands come from the registry itself.
|
|
13
13
|
*/
|
|
14
|
-
export function generateCommands(cwd) {
|
|
14
|
+
export function generateCommands(cwd, { silent = false } = {}) {
|
|
15
15
|
const awDir = getLocalRegistryDir(cwd, join(homedir(), '.aw_registry'));
|
|
16
16
|
|
|
17
17
|
// Clean old .generated-commands if it exists (migration)
|
|
@@ -29,7 +29,7 @@ export function generateCommands(cwd) {
|
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
if (count > 0) {
|
|
32
|
+
if (count > 0 && !silent) {
|
|
33
33
|
fmt.logSuccess(`Generated ${count} aw commands`);
|
|
34
34
|
}
|
|
35
35
|
|
package/link.mjs
CHANGED
|
@@ -129,7 +129,7 @@ function flatName(ns, name) {
|
|
|
129
129
|
* @param {string} cwd - Directory where IDE dirs (.claude/.cursor/.codex) live
|
|
130
130
|
* @param {string|null} awDirOverride - Explicit registry dir; overrides auto-detection
|
|
131
131
|
*/
|
|
132
|
-
export function linkWorkspace(cwd, awDirOverride = null) {
|
|
132
|
+
export function linkWorkspace(cwd, awDirOverride = null, { silent = false } = {}) {
|
|
133
133
|
// Normalize cwd to real path so relative() produces valid symlink targets on macOS
|
|
134
134
|
// where $HOME may be /var/... but process.cwd() resolves to /private/var/...
|
|
135
135
|
try { cwd = realpathSync(cwd); } catch { /* use as-is */ }
|
|
@@ -260,7 +260,7 @@ export function linkWorkspace(cwd, awDirOverride = null) {
|
|
|
260
260
|
}
|
|
261
261
|
}
|
|
262
262
|
|
|
263
|
-
if (created > 0) {
|
|
263
|
+
if (created > 0 && !silent) {
|
|
264
264
|
fmt.logSuccess(`Linked ${created} IDE symlink${created > 1 ? 's' : ''}`);
|
|
265
265
|
}
|
|
266
266
|
|