allagents 0.29.1 → 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.
- package/dist/index.js +34 -13
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -25853,8 +25853,9 @@ async function initWorkspace(targetPath = ".", options = {}) {
|
|
|
25853
25853
|
await writeFile7(configPath, workspaceYamlContent, "utf-8");
|
|
25854
25854
|
const parsed = load(workspaceYamlContent);
|
|
25855
25855
|
const clients = parsed?.clients ?? [];
|
|
25856
|
+
const clientNames = getClientTypes(clients);
|
|
25856
25857
|
const VSCODE_TEMPLATE_FILE2 = "template.code-workspace";
|
|
25857
|
-
if (
|
|
25858
|
+
if (clientNames.includes("vscode") && options.from) {
|
|
25858
25859
|
const targetTemplatePath = join16(configDir, VSCODE_TEMPLATE_FILE2);
|
|
25859
25860
|
if (!existsSync13(targetTemplatePath)) {
|
|
25860
25861
|
if (isGitHubUrl(options.from) && githubTempDir) {
|
|
@@ -25922,7 +25923,7 @@ async function initWorkspace(targetPath = ".", options = {}) {
|
|
|
25922
25923
|
await ensureWorkspaceRules(join16(absoluteTarget, agentFile), repositories);
|
|
25923
25924
|
}
|
|
25924
25925
|
}
|
|
25925
|
-
if (
|
|
25926
|
+
if (clientNames.includes("claude") && !copiedAgentFiles.includes("CLAUDE.md") && copiedAgentFiles.includes("AGENTS.md")) {
|
|
25926
25927
|
const agentsPath = join16(absoluteTarget, "AGENTS.md");
|
|
25927
25928
|
const claudePath = join16(absoluteTarget, "CLAUDE.md");
|
|
25928
25929
|
await copyFile2(agentsPath, claudePath);
|
|
@@ -25968,6 +25969,7 @@ var init_workspace = __esm(() => {
|
|
|
25968
25969
|
init_sync();
|
|
25969
25970
|
init_transform();
|
|
25970
25971
|
init_constants();
|
|
25972
|
+
init_workspace_config();
|
|
25971
25973
|
init_plugin_path();
|
|
25972
25974
|
init_github_fetch();
|
|
25973
25975
|
init_git();
|
|
@@ -26727,7 +26729,7 @@ var package_default;
|
|
|
26727
26729
|
var init_package = __esm(() => {
|
|
26728
26730
|
package_default = {
|
|
26729
26731
|
name: "allagents",
|
|
26730
|
-
version: "0.
|
|
26732
|
+
version: "0.30.0",
|
|
26731
26733
|
description: "CLI tool for managing multi-repo AI agent workspaces with plugin synchronization",
|
|
26732
26734
|
type: "module",
|
|
26733
26735
|
bin: {
|
|
@@ -30094,26 +30096,45 @@ var repoListMeta = {
|
|
|
30094
30096
|
};
|
|
30095
30097
|
|
|
30096
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
|
+
}
|
|
30097
30126
|
var initCmd = import_cmd_ts2.command({
|
|
30098
30127
|
name: "init",
|
|
30099
30128
|
description: buildDescription(initMeta),
|
|
30100
30129
|
args: {
|
|
30101
30130
|
path: import_cmd_ts2.positional({ type: import_cmd_ts2.optional(import_cmd_ts2.string), displayName: "path" }),
|
|
30102
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" }),
|
|
30103
|
-
client: import_cmd_ts2.option({ type: import_cmd_ts2.optional(import_cmd_ts2.string), long: "client", short: "c", description: "Comma-separated
|
|
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)" })
|
|
30104
30133
|
},
|
|
30105
30134
|
handler: async ({ path, from, client }) => {
|
|
30106
30135
|
try {
|
|
30107
30136
|
const targetPath = path ?? ".";
|
|
30108
|
-
const clients = client ? client
|
|
30109
|
-
if (clients) {
|
|
30110
|
-
const validClients = ClientTypeSchema.options;
|
|
30111
|
-
const invalid = clients.filter((c) => !validClients.includes(c));
|
|
30112
|
-
if (invalid.length > 0) {
|
|
30113
|
-
throw new Error(`Invalid client(s): ${invalid.join(", ")}
|
|
30114
|
-
Valid clients: ${validClients.join(", ")}`);
|
|
30115
|
-
}
|
|
30116
|
-
}
|
|
30137
|
+
const clients = client ? parseClientEntries(client) : undefined;
|
|
30117
30138
|
const result = await initWorkspace(targetPath, {
|
|
30118
30139
|
...from ? { from } : {},
|
|
30119
30140
|
...clients ? { clients } : {}
|