allagents 1.4.6 → 1.4.7

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.
Files changed (2) hide show
  1. package/dist/index.js +32 -10
  2. 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
- folders.push({ path: absolutePath });
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
- updatedRepos.push({ path: relPath });
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 };
@@ -34040,7 +34053,7 @@ var package_default;
34040
34053
  var init_package = __esm(() => {
34041
34054
  package_default = {
34042
34055
  name: "allagents",
34043
- version: "1.4.6",
34056
+ version: "1.4.7",
34044
34057
  description: "CLI tool for managing multi-repo AI agent workspaces with plugin synchronization",
34045
34058
  type: "module",
34046
34059
  bin: {
@@ -34420,11 +34433,17 @@ async function runInit() {
34420
34433
  }
34421
34434
  const s = Ie();
34422
34435
  s.start("Initializing workspace...");
34423
- const options2 = {
34424
- ...fromSource ? { from: fromSource } : {},
34425
- ...selectedClients && selectedClients.length > 0 ? { clients: selectedClients } : {}
34426
- };
34427
- const result = await initWorkspace(targetPath, options2);
34436
+ let result;
34437
+ try {
34438
+ const options2 = {
34439
+ ...fromSource ? { from: fromSource } : {},
34440
+ ...selectedClients && selectedClients.length > 0 ? { clients: selectedClients } : {}
34441
+ };
34442
+ result = await initWorkspace(targetPath, options2);
34443
+ } catch (error) {
34444
+ s.stop("Failed");
34445
+ throw error;
34446
+ }
34428
34447
  s.stop("Workspace initialized");
34429
34448
  const lines = [`Path: ${result.path}`];
34430
34449
  if (selectedClients && selectedClients.length > 0) {
@@ -37905,13 +37924,16 @@ var pluginListCmd = import_cmd_ts4.command({
37905
37924
  }
37906
37925
  const userConfigPath = join24(getAllagentsDir(), WORKSPACE_CONFIG_FILE);
37907
37926
  const projectConfigPath = join24(process.cwd(), CONFIG_DIR, WORKSPACE_CONFIG_FILE);
37927
+ const cwdIsHome = isUserConfigPath(process.cwd());
37908
37928
  await loadConfigClients(userConfigPath, "user");
37909
- await loadConfigClients(projectConfigPath, "project");
37929
+ if (!cwdIsHome) {
37930
+ await loadConfigClients(projectConfigPath, "project");
37931
+ }
37910
37932
  const userPlugins = await getInstalledUserPlugins();
37911
37933
  const projectPlugins = await getInstalledProjectPlugins(process.cwd());
37912
37934
  const allInstalled = [...userPlugins, ...projectPlugins];
37913
37935
  const userSyncState = await loadSyncState(getAllagentsDir());
37914
- const projectSyncState = await loadSyncState(process.cwd());
37936
+ const projectSyncState = cwdIsHome ? null : await loadSyncState(process.cwd());
37915
37937
  const merged = new Map;
37916
37938
  for (const p of allInstalled) {
37917
37939
  const key = canonicalKey(p.name, p.marketplace, p.scope);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "allagents",
3
- "version": "1.4.6",
3
+ "version": "1.4.7",
4
4
  "description": "CLI tool for managing multi-repo AI agent workspaces with plugin synchronization",
5
5
  "type": "module",
6
6
  "bin": {