allagents 1.4.6 → 1.4.8
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/dist/index.js +94 -33
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -11485,6 +11485,7 @@ var init_workspace_config = __esm(() => {
|
|
|
11485
11485
|
init_zod();
|
|
11486
11486
|
RepositorySchema = exports_external.object({
|
|
11487
11487
|
path: exports_external.string(),
|
|
11488
|
+
name: exports_external.string().optional(),
|
|
11488
11489
|
source: exports_external.string().optional(),
|
|
11489
11490
|
repo: exports_external.string().optional(),
|
|
11490
11491
|
description: exports_external.string().optional()
|
|
@@ -26731,6 +26732,8 @@ async function getInstalledUserPlugins() {
|
|
|
26731
26732
|
return result;
|
|
26732
26733
|
}
|
|
26733
26734
|
async function getInstalledProjectPlugins(workspacePath) {
|
|
26735
|
+
if (isUserConfigPath(workspacePath))
|
|
26736
|
+
return [];
|
|
26734
26737
|
const configPath = join9(workspacePath, CONFIG_DIR, WORKSPACE_CONFIG_FILE);
|
|
26735
26738
|
if (!existsSync6(configPath))
|
|
26736
26739
|
return [];
|
|
@@ -28658,7 +28661,10 @@ function generateVscodeWorkspace(input) {
|
|
|
28658
28661
|
seenPaths.add(resolve8(workspacePath, "."));
|
|
28659
28662
|
for (const repo of repositories) {
|
|
28660
28663
|
const absolutePath = resolve8(workspacePath, repo.path).replace(/\\/g, "/");
|
|
28661
|
-
|
|
28664
|
+
const entry = { path: absolutePath };
|
|
28665
|
+
if (repo.name)
|
|
28666
|
+
entry.name = repo.name;
|
|
28667
|
+
folders.push(entry);
|
|
28662
28668
|
seenPaths.add(absolutePath);
|
|
28663
28669
|
}
|
|
28664
28670
|
if (resolvedTemplate && Array.isArray(resolvedTemplate.folders)) {
|
|
@@ -28705,11 +28711,14 @@ function computeWorkspaceHash(content) {
|
|
|
28705
28711
|
function reconcileVscodeWorkspaceFolders(workspacePath, codeWorkspaceFolders, lastSyncedRepos, currentRepos) {
|
|
28706
28712
|
const normalizedWorkspacePath = resolve8(workspacePath).replace(/\\/g, "/");
|
|
28707
28713
|
const codeWorkspaceAbsPaths = new Set;
|
|
28714
|
+
const codeWorkspaceNames = new Map;
|
|
28708
28715
|
for (const folder of codeWorkspaceFolders) {
|
|
28709
28716
|
if (folder.path === ".")
|
|
28710
28717
|
continue;
|
|
28711
28718
|
const absPath = (isAbsolute3(folder.path) ? folder.path : resolve8(workspacePath, folder.path)).replace(/\\/g, "/");
|
|
28712
28719
|
codeWorkspaceAbsPaths.add(absPath);
|
|
28720
|
+
if (folder.name)
|
|
28721
|
+
codeWorkspaceNames.set(absPath, folder.name);
|
|
28713
28722
|
}
|
|
28714
28723
|
const lastSyncedSet = new Set(lastSyncedRepos.map((p) => p.replace(/\\/g, "/")));
|
|
28715
28724
|
const currentReposByAbsPath = new Map;
|
|
@@ -28736,7 +28745,11 @@ function reconcileVscodeWorkspaceFolders(workspacePath, codeWorkspaceFolders, la
|
|
|
28736
28745
|
if (!inLastSync && !inCurrentRepos) {
|
|
28737
28746
|
const relPath = relative3(normalizedWorkspacePath, absPath).replace(/\\/g, "/");
|
|
28738
28747
|
added.push(relPath);
|
|
28739
|
-
|
|
28748
|
+
const newRepo = { path: relPath };
|
|
28749
|
+
const folderName = codeWorkspaceNames.get(absPath);
|
|
28750
|
+
if (folderName)
|
|
28751
|
+
newRepo.name = folderName;
|
|
28752
|
+
updatedRepos.push(newRepo);
|
|
28740
28753
|
}
|
|
28741
28754
|
}
|
|
28742
28755
|
return { updatedRepos, added, removed };
|
|
@@ -31544,6 +31557,56 @@ function formatNativeResult(nativeResult) {
|
|
|
31544
31557
|
}
|
|
31545
31558
|
return lines;
|
|
31546
31559
|
}
|
|
31560
|
+
function formatVerboseSyncLines(result) {
|
|
31561
|
+
const lines = [];
|
|
31562
|
+
for (const pluginResult of result.pluginResults) {
|
|
31563
|
+
lines.push(formatPluginHeader(pluginResult));
|
|
31564
|
+
if (pluginResult.error) {
|
|
31565
|
+
lines.push(` Error: ${pluginResult.error}`);
|
|
31566
|
+
}
|
|
31567
|
+
lines.push(...formatPluginArtifacts(pluginResult.copyResults));
|
|
31568
|
+
const generated = pluginResult.copyResults.filter((r) => r.action === "generated").length;
|
|
31569
|
+
const failed = pluginResult.copyResults.filter((r) => r.action === "failed").length;
|
|
31570
|
+
if (generated > 0)
|
|
31571
|
+
lines.push(` Generated: ${generated} files`);
|
|
31572
|
+
if (failed > 0) {
|
|
31573
|
+
lines.push(` Failed: ${failed} files`);
|
|
31574
|
+
for (const failedResult of pluginResult.copyResults.filter((r) => r.action === "failed")) {
|
|
31575
|
+
lines.push(` - ${failedResult.destination}: ${failedResult.error}`);
|
|
31576
|
+
}
|
|
31577
|
+
}
|
|
31578
|
+
}
|
|
31579
|
+
if (result.warnings && result.warnings.length > 0) {
|
|
31580
|
+
lines.push("");
|
|
31581
|
+
for (const warning of result.warnings) {
|
|
31582
|
+
lines.push(` ⚠ ${warning}`);
|
|
31583
|
+
}
|
|
31584
|
+
}
|
|
31585
|
+
if (result.mcpResults) {
|
|
31586
|
+
for (const [scope, mcpResult] of Object.entries(result.mcpResults)) {
|
|
31587
|
+
if (!mcpResult)
|
|
31588
|
+
continue;
|
|
31589
|
+
const mcpLines = formatMcpResult(mcpResult, scope);
|
|
31590
|
+
if (mcpLines.length > 0) {
|
|
31591
|
+
lines.push("");
|
|
31592
|
+
lines.push(...mcpLines);
|
|
31593
|
+
}
|
|
31594
|
+
}
|
|
31595
|
+
}
|
|
31596
|
+
if (result.nativeResult) {
|
|
31597
|
+
const nativeLines = formatNativeResult(result.nativeResult);
|
|
31598
|
+
if (nativeLines.length > 0) {
|
|
31599
|
+
lines.push("");
|
|
31600
|
+
lines.push(...nativeLines);
|
|
31601
|
+
}
|
|
31602
|
+
}
|
|
31603
|
+
const summaryLines = formatSyncSummary(result);
|
|
31604
|
+
if (summaryLines.length > 0) {
|
|
31605
|
+
lines.push("");
|
|
31606
|
+
lines.push(...summaryLines);
|
|
31607
|
+
}
|
|
31608
|
+
return lines;
|
|
31609
|
+
}
|
|
31547
31610
|
function buildSyncData(result) {
|
|
31548
31611
|
return {
|
|
31549
31612
|
copied: result.totalCopied,
|
|
@@ -34040,7 +34103,7 @@ var package_default;
|
|
|
34040
34103
|
var init_package = __esm(() => {
|
|
34041
34104
|
package_default = {
|
|
34042
34105
|
name: "allagents",
|
|
34043
|
-
version: "1.4.
|
|
34106
|
+
version: "1.4.8",
|
|
34044
34107
|
description: "CLI tool for managing multi-repo AI agent workspaces with plugin synchronization",
|
|
34045
34108
|
type: "module",
|
|
34046
34109
|
bin: {
|
|
@@ -34334,12 +34397,7 @@ async function runSync(context) {
|
|
|
34334
34397
|
}
|
|
34335
34398
|
kt2(result.error, "Sync Error");
|
|
34336
34399
|
} else {
|
|
34337
|
-
projectLines = result
|
|
34338
|
-
projectLines.push("");
|
|
34339
|
-
projectLines.push(...formatSyncSummary(result));
|
|
34340
|
-
if (result.nativeResult) {
|
|
34341
|
-
projectLines.push(...formatNativeResult(result.nativeResult));
|
|
34342
|
-
}
|
|
34400
|
+
projectLines = formatVerboseSyncLines(result);
|
|
34343
34401
|
if (context.userPluginCount > 0) {
|
|
34344
34402
|
s.message("Syncing user plugins...");
|
|
34345
34403
|
} else {
|
|
@@ -34363,19 +34421,7 @@ async function runSync(context) {
|
|
|
34363
34421
|
if (userResult.error) {
|
|
34364
34422
|
kt2(userResult.error, "User Sync Error");
|
|
34365
34423
|
} else {
|
|
34366
|
-
const lines = userResult
|
|
34367
|
-
lines.push("");
|
|
34368
|
-
lines.push(...formatSyncSummary(userResult));
|
|
34369
|
-
if (userResult.mcpResults) {
|
|
34370
|
-
for (const [scope, mcpResult] of Object.entries(userResult.mcpResults)) {
|
|
34371
|
-
if (!mcpResult)
|
|
34372
|
-
continue;
|
|
34373
|
-
lines.push(...formatMcpResult(mcpResult, scope));
|
|
34374
|
-
}
|
|
34375
|
-
}
|
|
34376
|
-
if (userResult.nativeResult) {
|
|
34377
|
-
lines.push(...formatNativeResult(userResult.nativeResult));
|
|
34378
|
-
}
|
|
34424
|
+
const lines = formatVerboseSyncLines(userResult);
|
|
34379
34425
|
kt2(lines.join(`
|
|
34380
34426
|
`), "User Sync");
|
|
34381
34427
|
}
|
|
@@ -34420,18 +34466,25 @@ async function runInit() {
|
|
|
34420
34466
|
}
|
|
34421
34467
|
const s = Ie();
|
|
34422
34468
|
s.start("Initializing workspace...");
|
|
34423
|
-
|
|
34424
|
-
|
|
34425
|
-
|
|
34426
|
-
|
|
34427
|
-
|
|
34469
|
+
let result;
|
|
34470
|
+
try {
|
|
34471
|
+
const options2 = {
|
|
34472
|
+
...fromSource ? { from: fromSource } : {},
|
|
34473
|
+
...selectedClients && selectedClients.length > 0 ? { clients: selectedClients } : {}
|
|
34474
|
+
};
|
|
34475
|
+
result = await initWorkspace(targetPath, options2);
|
|
34476
|
+
} catch (error) {
|
|
34477
|
+
s.stop("Failed");
|
|
34478
|
+
throw error;
|
|
34479
|
+
}
|
|
34428
34480
|
s.stop("Workspace initialized");
|
|
34429
34481
|
const lines = [`Path: ${result.path}`];
|
|
34430
34482
|
if (selectedClients && selectedClients.length > 0) {
|
|
34431
34483
|
lines.push(`Clients: ${selectedClients.join(", ")}`);
|
|
34432
34484
|
}
|
|
34433
34485
|
if (result.syncResult) {
|
|
34434
|
-
lines.push(
|
|
34486
|
+
lines.push("");
|
|
34487
|
+
lines.push(...formatVerboseSyncLines(result.syncResult));
|
|
34435
34488
|
}
|
|
34436
34489
|
kt2(lines.join(`
|
|
34437
34490
|
`), "Workspace Created");
|
|
@@ -34444,6 +34497,7 @@ var text;
|
|
|
34444
34497
|
var init_init2 = __esm(() => {
|
|
34445
34498
|
init_dist2();
|
|
34446
34499
|
init_workspace();
|
|
34500
|
+
init_format_sync();
|
|
34447
34501
|
init_prompt_clients();
|
|
34448
34502
|
({ text } = exports_dist);
|
|
34449
34503
|
});
|
|
@@ -34497,6 +34551,7 @@ async function installSelectedPlugin(pluginRef, context, cache2) {
|
|
|
34497
34551
|
const scope = scopeChoice;
|
|
34498
34552
|
const s = Ie();
|
|
34499
34553
|
s.start("Installing plugin...");
|
|
34554
|
+
let syncResult;
|
|
34500
34555
|
if (scope === "project") {
|
|
34501
34556
|
const workspacePath = context.workspacePath ?? process.cwd();
|
|
34502
34557
|
const result = await addPlugin(pluginRef, workspacePath);
|
|
@@ -34506,7 +34561,7 @@ async function installSelectedPlugin(pluginRef, context, cache2) {
|
|
|
34506
34561
|
return false;
|
|
34507
34562
|
}
|
|
34508
34563
|
s.message("Syncing...");
|
|
34509
|
-
await syncWorkspace(workspacePath);
|
|
34564
|
+
syncResult = await syncWorkspace(workspacePath);
|
|
34510
34565
|
s.stop("Installed and synced");
|
|
34511
34566
|
} else {
|
|
34512
34567
|
const result = await addUserPlugin(pluginRef);
|
|
@@ -34516,11 +34571,13 @@ async function installSelectedPlugin(pluginRef, context, cache2) {
|
|
|
34516
34571
|
return false;
|
|
34517
34572
|
}
|
|
34518
34573
|
s.message("Syncing...");
|
|
34519
|
-
await syncUserWorkspace();
|
|
34574
|
+
syncResult = await syncUserWorkspace();
|
|
34520
34575
|
s.stop("Installed and synced");
|
|
34521
34576
|
}
|
|
34522
34577
|
cache2?.invalidate();
|
|
34523
|
-
|
|
34578
|
+
const lines = formatVerboseSyncLines(syncResult);
|
|
34579
|
+
kt2(lines.join(`
|
|
34580
|
+
`), `Installed: ${pluginRef}`);
|
|
34524
34581
|
return true;
|
|
34525
34582
|
}
|
|
34526
34583
|
async function runUpdatePlugin(pluginSource, scope, context, cache2) {
|
|
@@ -35074,6 +35131,7 @@ var init_plugins = __esm(() => {
|
|
|
35074
35131
|
init_sync();
|
|
35075
35132
|
init_marketplace();
|
|
35076
35133
|
init_plugin();
|
|
35134
|
+
init_format_sync();
|
|
35077
35135
|
init_marketplace_manifest_parser();
|
|
35078
35136
|
init_status2();
|
|
35079
35137
|
init_skills();
|
|
@@ -37905,13 +37963,16 @@ var pluginListCmd = import_cmd_ts4.command({
|
|
|
37905
37963
|
}
|
|
37906
37964
|
const userConfigPath = join24(getAllagentsDir(), WORKSPACE_CONFIG_FILE);
|
|
37907
37965
|
const projectConfigPath = join24(process.cwd(), CONFIG_DIR, WORKSPACE_CONFIG_FILE);
|
|
37966
|
+
const cwdIsHome = isUserConfigPath(process.cwd());
|
|
37908
37967
|
await loadConfigClients(userConfigPath, "user");
|
|
37909
|
-
|
|
37968
|
+
if (!cwdIsHome) {
|
|
37969
|
+
await loadConfigClients(projectConfigPath, "project");
|
|
37970
|
+
}
|
|
37910
37971
|
const userPlugins = await getInstalledUserPlugins();
|
|
37911
37972
|
const projectPlugins = await getInstalledProjectPlugins(process.cwd());
|
|
37912
37973
|
const allInstalled = [...userPlugins, ...projectPlugins];
|
|
37913
37974
|
const userSyncState = await loadSyncState(getAllagentsDir());
|
|
37914
|
-
const projectSyncState = await loadSyncState(process.cwd());
|
|
37975
|
+
const projectSyncState = cwdIsHome ? null : await loadSyncState(process.cwd());
|
|
37915
37976
|
const merged = new Map;
|
|
37916
37977
|
for (const p of allInstalled) {
|
|
37917
37978
|
const key = canonicalKey(p.name, p.marketplace, p.scope);
|