allagents 0.29.0 → 0.30.0

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 +46 -20
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -23394,11 +23394,13 @@ async function resolvePluginSpecWithAutoRegister(spec, options = {}) {
23394
23394
  };
23395
23395
  }
23396
23396
  const shouldReturnRegisteredAs = didAutoRegister || marketplace.name !== marketplaceName;
23397
+ const marketplaceSource = marketplace.source.type === "github" ? marketplace.source.location : undefined;
23397
23398
  return {
23398
23399
  success: true,
23399
23400
  path: resolved.path,
23400
23401
  pluginName: resolved.plugin,
23401
- ...shouldReturnRegisteredAs && { registeredAs: marketplace.name }
23402
+ ...shouldReturnRegisteredAs && { registeredAs: marketplace.name },
23403
+ ...marketplaceSource && { marketplaceSource }
23402
23404
  };
23403
23405
  }
23404
23406
  async function autoRegisterMarketplace(source) {
@@ -24729,16 +24731,18 @@ function mergeSyncResults(a, b) {
24729
24731
  };
24730
24732
  }
24731
24733
  function resolveNativePluginSource(vp) {
24732
- if (!vp.registeredAs)
24733
- return { spec: vp.plugin };
24734
+ if (!vp.registeredAs) {
24735
+ return { spec: vp.plugin, ...vp.marketplaceSource && { marketplaceSource: vp.marketplaceSource } };
24736
+ }
24734
24737
  const parsed = parsePluginSpec(vp.plugin);
24735
- if (!parsed)
24736
- return { spec: vp.plugin };
24738
+ if (!parsed) {
24739
+ return { spec: vp.plugin, ...vp.marketplaceSource && { marketplaceSource: vp.marketplaceSource } };
24740
+ }
24737
24741
  const canonicalSpec = `${parsed.plugin}@${vp.registeredAs}`;
24738
24742
  if (parsed.owner && parsed.repo) {
24739
24743
  return { spec: canonicalSpec, marketplaceSource: `${parsed.owner}/${parsed.repo}` };
24740
24744
  }
24741
- return { spec: canonicalSpec };
24745
+ return { spec: canonicalSpec, ...vp.marketplaceSource && { marketplaceSource: vp.marketplaceSource } };
24742
24746
  }
24743
24747
  function collectNativePluginSources(validPlugins) {
24744
24748
  const pluginsByClient = new Map;
@@ -24994,7 +24998,8 @@ async function validatePlugin(pluginSource, workspacePath, offline) {
24994
24998
  clients: [],
24995
24999
  nativeClients: [],
24996
25000
  ...resolved.pluginName && { pluginName: resolved.pluginName },
24997
- ...resolved.registeredAs && { registeredAs: resolved.registeredAs }
25001
+ ...resolved.registeredAs && { registeredAs: resolved.registeredAs },
25002
+ ...resolved.marketplaceSource && { marketplaceSource: resolved.marketplaceSource }
24998
25003
  };
24999
25004
  }
25000
25005
  if (isGitHubUrl(pluginSource)) {
@@ -25848,8 +25853,9 @@ async function initWorkspace(targetPath = ".", options = {}) {
25848
25853
  await writeFile7(configPath, workspaceYamlContent, "utf-8");
25849
25854
  const parsed = load(workspaceYamlContent);
25850
25855
  const clients = parsed?.clients ?? [];
25856
+ const clientNames = getClientTypes(clients);
25851
25857
  const VSCODE_TEMPLATE_FILE2 = "template.code-workspace";
25852
- if (clients.includes("vscode") && options.from) {
25858
+ if (clientNames.includes("vscode") && options.from) {
25853
25859
  const targetTemplatePath = join16(configDir, VSCODE_TEMPLATE_FILE2);
25854
25860
  if (!existsSync13(targetTemplatePath)) {
25855
25861
  if (isGitHubUrl(options.from) && githubTempDir) {
@@ -25917,7 +25923,7 @@ async function initWorkspace(targetPath = ".", options = {}) {
25917
25923
  await ensureWorkspaceRules(join16(absoluteTarget, agentFile), repositories);
25918
25924
  }
25919
25925
  }
25920
- if (clients.includes("claude") && !copiedAgentFiles.includes("CLAUDE.md") && copiedAgentFiles.includes("AGENTS.md")) {
25926
+ if (clientNames.includes("claude") && !copiedAgentFiles.includes("CLAUDE.md") && copiedAgentFiles.includes("AGENTS.md")) {
25921
25927
  const agentsPath = join16(absoluteTarget, "AGENTS.md");
25922
25928
  const claudePath = join16(absoluteTarget, "CLAUDE.md");
25923
25929
  await copyFile2(agentsPath, claudePath);
@@ -25963,6 +25969,7 @@ var init_workspace = __esm(() => {
25963
25969
  init_sync();
25964
25970
  init_transform();
25965
25971
  init_constants();
25972
+ init_workspace_config();
25966
25973
  init_plugin_path();
25967
25974
  init_github_fetch();
25968
25975
  init_git();
@@ -26722,7 +26729,7 @@ var package_default;
26722
26729
  var init_package = __esm(() => {
26723
26730
  package_default = {
26724
26731
  name: "allagents",
26725
- version: "0.29.0",
26732
+ version: "0.30.0",
26726
26733
  description: "CLI tool for managing multi-repo AI agent workspaces with plugin synchronization",
26727
26734
  type: "module",
26728
26735
  bin: {
@@ -30089,26 +30096,45 @@ var repoListMeta = {
30089
30096
  };
30090
30097
 
30091
30098
  // src/cli/commands/workspace.ts
30099
+ function parseClientEntries(input) {
30100
+ const validClients = ClientTypeSchema.options;
30101
+ const validModes = InstallModeSchema.options;
30102
+ const entries = [];
30103
+ for (const part of input.split(",").map((s) => s.trim()).filter(Boolean)) {
30104
+ const colonIdx = part.indexOf(":");
30105
+ if (colonIdx === -1) {
30106
+ if (!validClients.includes(part)) {
30107
+ throw new Error(`Invalid client(s): ${part}
30108
+ Valid clients: ${validClients.join(", ")}`);
30109
+ }
30110
+ entries.push(part);
30111
+ } else {
30112
+ const name = part.slice(0, colonIdx);
30113
+ const mode = part.slice(colonIdx + 1);
30114
+ if (!validClients.includes(name)) {
30115
+ throw new Error(`Invalid client(s): ${name}
30116
+ Valid clients: ${validClients.join(", ")}`);
30117
+ }
30118
+ if (!validModes.includes(mode)) {
30119
+ throw new Error(`Invalid install mode '${mode}' for client '${name}'. Valid modes: ${validModes.join(", ")}`);
30120
+ }
30121
+ entries.push({ name, install: mode });
30122
+ }
30123
+ }
30124
+ return entries;
30125
+ }
30092
30126
  var initCmd = import_cmd_ts2.command({
30093
30127
  name: "init",
30094
30128
  description: buildDescription(initMeta),
30095
30129
  args: {
30096
30130
  path: import_cmd_ts2.positional({ type: import_cmd_ts2.optional(import_cmd_ts2.string), displayName: "path" }),
30097
30131
  from: import_cmd_ts2.option({ type: import_cmd_ts2.optional(import_cmd_ts2.string), long: "from", description: "Copy workspace.yaml from existing template/workspace" }),
30098
- client: import_cmd_ts2.option({ type: import_cmd_ts2.optional(import_cmd_ts2.string), long: "client", short: "c", description: "Comma-separated list of clients (e.g., claude,copilot,cursor)" })
30132
+ client: import_cmd_ts2.option({ type: import_cmd_ts2.optional(import_cmd_ts2.string), long: "client", short: "c", description: "Comma-separated clients with optional :mode (e.g., claude:native,copilot,cursor)" })
30099
30133
  },
30100
30134
  handler: async ({ path, from, client }) => {
30101
30135
  try {
30102
30136
  const targetPath = path ?? ".";
30103
- const clients = client ? client.split(",").map((c) => c.trim()) : undefined;
30104
- if (clients) {
30105
- const validClients = ClientTypeSchema.options;
30106
- const invalid = clients.filter((c) => !validClients.includes(c));
30107
- if (invalid.length > 0) {
30108
- throw new Error(`Invalid client(s): ${invalid.join(", ")}
30109
- Valid clients: ${validClients.join(", ")}`);
30110
- }
30111
- }
30137
+ const clients = client ? parseClientEntries(client) : undefined;
30112
30138
  const result = await initWorkspace(targetPath, {
30113
30139
  ...from ? { from } : {},
30114
30140
  ...clients ? { clients } : {}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "allagents",
3
- "version": "0.29.0",
3
+ "version": "0.30.0",
4
4
  "description": "CLI tool for managing multi-repo AI agent workspaces with plugin synchronization",
5
5
  "type": "module",
6
6
  "bin": {