@ghl-ai/aw 0.1.70-beta.3 → 0.1.70-beta.4
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 +31 -3
- package/integrations.mjs +46 -0
- package/package.json +1 -1
package/commands/init.mjs
CHANGED
|
@@ -35,7 +35,7 @@ import { loadConfig as ensureTelemetryConfig } from '../telemetry.mjs';
|
|
|
35
35
|
import { installAwEcc, AW_ECC_TAG } from '../ecc.mjs';
|
|
36
36
|
import { removeWorkspaceHookDefaults } from '../codex.mjs';
|
|
37
37
|
import { readHookManifest, pruneStaleHooks, writeHookManifest } from '../hook-cleanup.mjs';
|
|
38
|
-
import { installIntegration, autoInstallIntegrations } from '../integrations.mjs';
|
|
38
|
+
import { installIntegration, autoInstallIntegrations, getSuggestedIntegrationStatuses } from '../integrations.mjs';
|
|
39
39
|
import {
|
|
40
40
|
initPersistentClone,
|
|
41
41
|
isValidClone,
|
|
@@ -77,6 +77,30 @@ function writeHookManifestBestEffort(manifest, context) {
|
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
79
|
|
|
80
|
+
function formatIntegrationStatusSummary(statuses, installedNow = []) {
|
|
81
|
+
if (!statuses || statuses.length === 0) return null;
|
|
82
|
+
|
|
83
|
+
const installedNowSet = new Set(installedNow);
|
|
84
|
+
const lines = statuses.map((entry) => {
|
|
85
|
+
if (entry.status === 'installed') {
|
|
86
|
+
const note = installedNowSet.has(entry.label) ? '(installed now)' : '(installed)';
|
|
87
|
+
return ` ${chalk.green('✓')} ${entry.label} ${chalk.dim(note)}`;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
if (entry.status === 'skipped') {
|
|
91
|
+
const note = entry.reason ? `(skipped: ${entry.reason})` : '(skipped)';
|
|
92
|
+
return ` ${chalk.yellow('!')} ${entry.label} ${chalk.dim(note)}`;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
return ` ${chalk.dim('○')} ${entry.label} ${chalk.dim('(not installed)')}`;
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
return [
|
|
99
|
+
` ${chalk.green('✓')} Integrations:`,
|
|
100
|
+
...lines,
|
|
101
|
+
].join('\n');
|
|
102
|
+
}
|
|
103
|
+
|
|
80
104
|
export async function syncEccAfterAwUpdate(updateResult, cwd, { silent = false } = {}) {
|
|
81
105
|
if (updateResult?.status !== 'upgraded' || !updateResult.packageRoot) {
|
|
82
106
|
return { synced: false, reason: updateResult?.reason || updateResult?.status || 'not-upgraded' };
|
|
@@ -487,8 +511,10 @@ export async function initCommand(args) {
|
|
|
487
511
|
|
|
488
512
|
// Auto-install suggested integrations (Codex, Caveman, Graphify, etc) - unless --no-integrations
|
|
489
513
|
let installedIntegrations = [];
|
|
514
|
+
let integrationStatuses = [];
|
|
490
515
|
if (!silent && !skipIntegrations && !isNewSubTeam) {
|
|
491
516
|
installedIntegrations = await autoInstallIntegrations(effectiveNamespace, { silent });
|
|
517
|
+
integrationStatuses = getSuggestedIntegrationStatuses(effectiveNamespace, { home: HOME });
|
|
492
518
|
}
|
|
493
519
|
|
|
494
520
|
if (silent) {
|
|
@@ -511,7 +537,7 @@ export async function initCommand(args) {
|
|
|
511
537
|
? ` ${chalk.green('✓')} Removed ${removedLegacyStartupFiles.length} legacy repo startup file${removedLegacyStartupFiles.length > 1 ? 's' : ''}`
|
|
512
538
|
: null,
|
|
513
539
|
cwd !== HOME && isWorktree(join(cwd, '.aw')) ? ` ${chalk.green('✓')} Project linked` : null,
|
|
514
|
-
|
|
540
|
+
formatIntegrationStatusSummary(integrationStatuses, installedIntegrations),
|
|
515
541
|
].filter(Boolean).join('\n'));
|
|
516
542
|
}
|
|
517
543
|
return;
|
|
@@ -680,8 +706,10 @@ export async function initCommand(args) {
|
|
|
680
706
|
|
|
681
707
|
// Auto-install suggested integrations (Codex, Caveman, Graphify, etc) - unless --no-integrations
|
|
682
708
|
let installedIntegrations = [];
|
|
709
|
+
let integrationStatuses = [];
|
|
683
710
|
if (!silent && !skipIntegrations) {
|
|
684
711
|
installedIntegrations = await autoInstallIntegrations(activeNamespace(), { silent });
|
|
712
|
+
integrationStatuses = getSuggestedIntegrationStatuses(activeNamespace(), { home: HOME });
|
|
685
713
|
}
|
|
686
714
|
|
|
687
715
|
// Offer to update if a newer version is available
|
|
@@ -704,7 +732,7 @@ export async function initCommand(args) {
|
|
|
704
732
|
awUsageHooksReport ? ` ${chalk.green('✓')} ${awUsageHooksReport}` : null,
|
|
705
733
|
` ${chalk.green('✓')} IDE task: auto-sync on workspace open`,
|
|
706
734
|
cwd !== HOME && isWorktree(join(cwd, '.aw')) ? ` ${chalk.green('✓')} Linked in current project` : null,
|
|
707
|
-
|
|
735
|
+
formatIntegrationStatusSummary(integrationStatuses, installedIntegrations),
|
|
708
736
|
'',
|
|
709
737
|
` ${chalk.dim('Existing repos:')} ${chalk.bold('cd <project> && aw link')}`,
|
|
710
738
|
` ${chalk.dim('New clones:')} auto-linked via git hook`,
|
package/integrations.mjs
CHANGED
|
@@ -1028,6 +1028,52 @@ export function suggestForTeam(namespace) {
|
|
|
1028
1028
|
.map(([key]) => key);
|
|
1029
1029
|
}
|
|
1030
1030
|
|
|
1031
|
+
export function getSuggestedIntegrationStatuses(namespace, options = {}) {
|
|
1032
|
+
const manifest = readManifest(options.home);
|
|
1033
|
+
|
|
1034
|
+
return suggestForTeam(namespace).map((key) => {
|
|
1035
|
+
const integration = INTEGRATIONS[key];
|
|
1036
|
+
const entry = manifest.installed[key];
|
|
1037
|
+
|
|
1038
|
+
if (entry && entry.status !== 'skipped') {
|
|
1039
|
+
return {
|
|
1040
|
+
key,
|
|
1041
|
+
label: integration.label,
|
|
1042
|
+
type: integration.type,
|
|
1043
|
+
status: 'installed',
|
|
1044
|
+
installedAt: entry.installedAt || null,
|
|
1045
|
+
};
|
|
1046
|
+
}
|
|
1047
|
+
|
|
1048
|
+
if (entry?.status === 'skipped') {
|
|
1049
|
+
return {
|
|
1050
|
+
key,
|
|
1051
|
+
label: integration.label,
|
|
1052
|
+
type: integration.type,
|
|
1053
|
+
status: 'skipped',
|
|
1054
|
+
reason: entry.reason || 'previous setup skipped',
|
|
1055
|
+
};
|
|
1056
|
+
}
|
|
1057
|
+
|
|
1058
|
+
if (integration.requiresGitSubmodule && !hasGitSubmoduleSupport()) {
|
|
1059
|
+
return {
|
|
1060
|
+
key,
|
|
1061
|
+
label: integration.label,
|
|
1062
|
+
type: integration.type,
|
|
1063
|
+
status: 'skipped',
|
|
1064
|
+
reason: 'Git submodule support unavailable',
|
|
1065
|
+
};
|
|
1066
|
+
}
|
|
1067
|
+
|
|
1068
|
+
return {
|
|
1069
|
+
key,
|
|
1070
|
+
label: integration.label,
|
|
1071
|
+
type: integration.type,
|
|
1072
|
+
status: 'pending',
|
|
1073
|
+
};
|
|
1074
|
+
});
|
|
1075
|
+
}
|
|
1076
|
+
|
|
1031
1077
|
// ────────────────────────────────────────────────────────────────────────────────
|
|
1032
1078
|
// AUTO-INSTALL (called from init.mjs - installs suggested integrations)
|
|
1033
1079
|
// ────────────────────────────────────────────────────────────────────────────────
|