allagents 0.31.1 → 0.32.0-next.1
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 +165 -56
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -22963,10 +22963,6 @@ async function saveRegistry(registry) {
|
|
|
22963
22963
|
`);
|
|
22964
22964
|
}
|
|
22965
22965
|
function getSourceLocationKey(source) {
|
|
22966
|
-
if (source.type === "github") {
|
|
22967
|
-
const { owner, repo } = parseLocation(source.location);
|
|
22968
|
-
return `${owner}/${repo}`;
|
|
22969
|
-
}
|
|
22970
22966
|
return source.location;
|
|
22971
22967
|
}
|
|
22972
22968
|
function findBySourceLocation(registry, sourceLocation) {
|
|
@@ -23042,10 +23038,15 @@ async function addMarketplace(source, customName, branch) {
|
|
|
23042
23038
|
error: `Marketplace '${name}' already exists. Use 'update' to refresh it.`
|
|
23043
23039
|
};
|
|
23044
23040
|
}
|
|
23045
|
-
const sourceLocation =
|
|
23041
|
+
const sourceLocation = (() => {
|
|
23042
|
+
if (parsed.type !== "github")
|
|
23043
|
+
return parsed.location;
|
|
23044
|
+
const { owner, repo } = parseLocation(parsed.location);
|
|
23045
|
+
return effectiveBranch ? `${owner}/${repo}/${effectiveBranch}` : `${owner}/${repo}`;
|
|
23046
|
+
})();
|
|
23046
23047
|
const existingBySource = findBySourceLocation(registry, sourceLocation);
|
|
23047
23048
|
if (existingBySource) {
|
|
23048
|
-
return { success: true, marketplace: existingBySource };
|
|
23049
|
+
return { success: true, marketplace: existingBySource, alreadyRegistered: true };
|
|
23049
23050
|
}
|
|
23050
23051
|
let marketplacePath;
|
|
23051
23052
|
if (parsed.type === "github") {
|
|
@@ -23100,7 +23101,8 @@ async function addMarketplace(source, customName, branch) {
|
|
|
23100
23101
|
if (existing) {
|
|
23101
23102
|
return {
|
|
23102
23103
|
success: true,
|
|
23103
|
-
marketplace: existing
|
|
23104
|
+
marketplace: existing,
|
|
23105
|
+
alreadyRegistered: true
|
|
23104
23106
|
};
|
|
23105
23107
|
}
|
|
23106
23108
|
name = manifestName;
|
|
@@ -23489,12 +23491,14 @@ async function autoRegisterMarketplace(source) {
|
|
|
23489
23491
|
registeredSourceCache.set(source, existing.name);
|
|
23490
23492
|
return { success: true, name: existing.name };
|
|
23491
23493
|
}
|
|
23492
|
-
console.log(`Auto-registering GitHub marketplace: ${source}`);
|
|
23493
23494
|
const result = await addMarketplace(source);
|
|
23494
23495
|
if (!result.success) {
|
|
23495
23496
|
return { success: false, error: result.error || "Unknown error" };
|
|
23496
23497
|
}
|
|
23497
23498
|
const name = result.marketplace?.name ?? parts[1];
|
|
23499
|
+
if (!result.alreadyRegistered) {
|
|
23500
|
+
console.log(`Auto-registered GitHub marketplace: ${source}`);
|
|
23501
|
+
}
|
|
23498
23502
|
registeredSourceCache.set(source, name);
|
|
23499
23503
|
return { success: true, name };
|
|
23500
23504
|
}
|
|
@@ -24573,6 +24577,7 @@ function executeCommand(binary2, args, options = {}) {
|
|
|
24573
24577
|
const proc = spawn2(binary2, args, {
|
|
24574
24578
|
cwd: options.cwd,
|
|
24575
24579
|
stdio: ["ignore", "pipe", "pipe"],
|
|
24580
|
+
shell: process.platform === "win32",
|
|
24576
24581
|
env: { ...process.env }
|
|
24577
24582
|
});
|
|
24578
24583
|
let stdout = "";
|
|
@@ -24655,6 +24660,9 @@ async function syncCodexMcpServers(validatedPlugins, options) {
|
|
|
24655
24660
|
removedServers: [],
|
|
24656
24661
|
trackedServers: []
|
|
24657
24662
|
};
|
|
24663
|
+
if (pluginServers.size === 0 && previouslyTracked.size === 0) {
|
|
24664
|
+
return result;
|
|
24665
|
+
}
|
|
24658
24666
|
const listResult = await exec("codex", ["mcp", "list", "--json"]);
|
|
24659
24667
|
if (!listResult.success) {
|
|
24660
24668
|
result.warnings.push(`Codex CLI not available or 'codex mcp list' failed: ${listResult.error ?? "unknown error"}`);
|
|
@@ -26346,6 +26354,122 @@ var init_status2 = __esm(() => {
|
|
|
26346
26354
|
});
|
|
26347
26355
|
|
|
26348
26356
|
// src/cli/format-sync.ts
|
|
26357
|
+
function buildPathLookup() {
|
|
26358
|
+
const entries = [];
|
|
26359
|
+
const seen = new Set;
|
|
26360
|
+
for (const mappings of [CLIENT_MAPPINGS, USER_CLIENT_MAPPINGS]) {
|
|
26361
|
+
for (const [client, mapping] of Object.entries(mappings)) {
|
|
26362
|
+
const paths = [
|
|
26363
|
+
[mapping.skillsPath, "skill"],
|
|
26364
|
+
[mapping.commandsPath, "command"],
|
|
26365
|
+
[mapping.agentsPath, "agent"],
|
|
26366
|
+
[mapping.hooksPath, "hook"]
|
|
26367
|
+
];
|
|
26368
|
+
for (const [path, artifactType] of paths) {
|
|
26369
|
+
if (!path)
|
|
26370
|
+
continue;
|
|
26371
|
+
const key = `${path}|${artifactType}`;
|
|
26372
|
+
if (seen.has(key))
|
|
26373
|
+
continue;
|
|
26374
|
+
seen.add(key);
|
|
26375
|
+
entries.push({ path, client, artifactType });
|
|
26376
|
+
}
|
|
26377
|
+
}
|
|
26378
|
+
}
|
|
26379
|
+
entries.sort((a, b) => b.path.length - a.path.length);
|
|
26380
|
+
return entries;
|
|
26381
|
+
}
|
|
26382
|
+
function getPathLookup() {
|
|
26383
|
+
if (!cachedLookup)
|
|
26384
|
+
cachedLookup = buildPathLookup();
|
|
26385
|
+
return cachedLookup;
|
|
26386
|
+
}
|
|
26387
|
+
function classifyDestination(dest) {
|
|
26388
|
+
const normalized = dest.replace(/\\/g, "/");
|
|
26389
|
+
for (const entry of getPathLookup()) {
|
|
26390
|
+
if (normalized.includes(`/${entry.path}`) || normalized.startsWith(entry.path)) {
|
|
26391
|
+
return { client: entry.client, artifactType: entry.artifactType };
|
|
26392
|
+
}
|
|
26393
|
+
}
|
|
26394
|
+
return null;
|
|
26395
|
+
}
|
|
26396
|
+
function classifyCopyResults(copyResults) {
|
|
26397
|
+
const clientCounts = new Map;
|
|
26398
|
+
for (const result of copyResults) {
|
|
26399
|
+
if (result.action !== "copied")
|
|
26400
|
+
continue;
|
|
26401
|
+
const classification = classifyDestination(result.destination);
|
|
26402
|
+
if (!classification)
|
|
26403
|
+
continue;
|
|
26404
|
+
const { client, artifactType } = classification;
|
|
26405
|
+
let counts = clientCounts.get(client);
|
|
26406
|
+
if (!counts) {
|
|
26407
|
+
counts = { skills: 0, commands: 0, agents: 0, hooks: 0 };
|
|
26408
|
+
clientCounts.set(client, counts);
|
|
26409
|
+
}
|
|
26410
|
+
switch (artifactType) {
|
|
26411
|
+
case "skill":
|
|
26412
|
+
counts.skills++;
|
|
26413
|
+
break;
|
|
26414
|
+
case "command":
|
|
26415
|
+
counts.commands++;
|
|
26416
|
+
break;
|
|
26417
|
+
case "agent":
|
|
26418
|
+
counts.agents++;
|
|
26419
|
+
break;
|
|
26420
|
+
case "hook":
|
|
26421
|
+
counts.hooks++;
|
|
26422
|
+
break;
|
|
26423
|
+
}
|
|
26424
|
+
}
|
|
26425
|
+
return clientCounts;
|
|
26426
|
+
}
|
|
26427
|
+
function formatArtifactLines(clientCounts, indent = " ") {
|
|
26428
|
+
const lines = [];
|
|
26429
|
+
for (const [client, counts] of clientCounts) {
|
|
26430
|
+
const parts = [];
|
|
26431
|
+
if (counts.commands > 0)
|
|
26432
|
+
parts.push(`${counts.commands} ${counts.commands === 1 ? "command" : "commands"}`);
|
|
26433
|
+
if (counts.skills > 0)
|
|
26434
|
+
parts.push(`${counts.skills} ${counts.skills === 1 ? "skill" : "skills"}`);
|
|
26435
|
+
if (counts.agents > 0)
|
|
26436
|
+
parts.push(`${counts.agents} ${counts.agents === 1 ? "agent" : "agents"}`);
|
|
26437
|
+
if (counts.hooks > 0)
|
|
26438
|
+
parts.push(`${counts.hooks} ${counts.hooks === 1 ? "hook" : "hooks"}`);
|
|
26439
|
+
if (parts.length > 0) {
|
|
26440
|
+
lines.push(`${indent}${client}: ${parts.join(", ")}`);
|
|
26441
|
+
}
|
|
26442
|
+
}
|
|
26443
|
+
return lines;
|
|
26444
|
+
}
|
|
26445
|
+
function formatPluginArtifacts(copyResults, indent = " ") {
|
|
26446
|
+
const copied = copyResults.filter((r) => r.action === "copied");
|
|
26447
|
+
if (copied.length === 0)
|
|
26448
|
+
return [];
|
|
26449
|
+
const classified = classifyCopyResults(copied);
|
|
26450
|
+
if (classified.size === 0) {
|
|
26451
|
+
return [`${indent}Copied: ${copied.length} ${copied.length === 1 ? "file" : "files"}`];
|
|
26452
|
+
}
|
|
26453
|
+
return formatArtifactLines(classified, indent);
|
|
26454
|
+
}
|
|
26455
|
+
function formatSyncSummary(result, { dryRun = false, label = "Sync" } = {}) {
|
|
26456
|
+
const lines = [];
|
|
26457
|
+
const allCopied = result.pluginResults.flatMap((pr) => pr.copyResults.filter((r) => r.action === "copied"));
|
|
26458
|
+
lines.push(`${label} complete${dryRun ? " (dry run)" : ""}:`);
|
|
26459
|
+
const classified = classifyCopyResults(allCopied);
|
|
26460
|
+
if (classified.size > 0) {
|
|
26461
|
+
lines.push(...formatArtifactLines(classified));
|
|
26462
|
+
} else if (allCopied.length > 0) {
|
|
26463
|
+
lines.push(` Total ${dryRun ? "would copy" : "copied"}: ${result.totalCopied}`);
|
|
26464
|
+
}
|
|
26465
|
+
if (result.totalGenerated > 0)
|
|
26466
|
+
lines.push(` Total generated: ${result.totalGenerated}`);
|
|
26467
|
+
if (result.totalFailed > 0)
|
|
26468
|
+
lines.push(` Total failed: ${result.totalFailed}`);
|
|
26469
|
+
if (result.totalSkipped > 0)
|
|
26470
|
+
lines.push(` Total skipped: ${result.totalSkipped}`);
|
|
26471
|
+
return lines;
|
|
26472
|
+
}
|
|
26349
26473
|
function formatMcpResult(mcpResult, scope) {
|
|
26350
26474
|
const { added, overwritten, removed, skipped } = mcpResult;
|
|
26351
26475
|
if (added === 0 && overwritten === 0 && removed === 0 && skipped === 0) {
|
|
@@ -26435,6 +26559,10 @@ function buildSyncData(result) {
|
|
|
26435
26559
|
}
|
|
26436
26560
|
};
|
|
26437
26561
|
}
|
|
26562
|
+
var cachedLookup = null;
|
|
26563
|
+
var init_format_sync = __esm(() => {
|
|
26564
|
+
init_client_mapping();
|
|
26565
|
+
});
|
|
26438
26566
|
|
|
26439
26567
|
// node_modules/picocolors/picocolors.js
|
|
26440
26568
|
var require_picocolors = __commonJS((exports, module) => {
|
|
@@ -28815,7 +28943,7 @@ var package_default;
|
|
|
28815
28943
|
var init_package = __esm(() => {
|
|
28816
28944
|
package_default = {
|
|
28817
28945
|
name: "allagents",
|
|
28818
|
-
version: "0.
|
|
28946
|
+
version: "0.32.0-next.1",
|
|
28819
28947
|
description: "CLI tool for managing multi-repo AI agent workspaces with plugin synchronization",
|
|
28820
28948
|
type: "module",
|
|
28821
28949
|
bin: {
|
|
@@ -29103,7 +29231,7 @@ async function runSync(context) {
|
|
|
29103
29231
|
} else {
|
|
29104
29232
|
const lines = result.pluginResults.map((pr) => `${pr.success ? "✓" : "✗"} ${pr.plugin}`);
|
|
29105
29233
|
lines.push("");
|
|
29106
|
-
lines.push(
|
|
29234
|
+
lines.push(...formatSyncSummary(result));
|
|
29107
29235
|
if (result.nativeResult) {
|
|
29108
29236
|
lines.push(...formatNativeResult(result.nativeResult));
|
|
29109
29237
|
}
|
|
@@ -29120,7 +29248,7 @@ async function runSync(context) {
|
|
|
29120
29248
|
} else {
|
|
29121
29249
|
const lines = userResult.pluginResults.map((pr) => `${pr.success ? "✓" : "✗"} ${pr.plugin}`);
|
|
29122
29250
|
lines.push("");
|
|
29123
|
-
lines.push(
|
|
29251
|
+
lines.push(...formatSyncSummary(userResult));
|
|
29124
29252
|
if (userResult.mcpResults) {
|
|
29125
29253
|
for (const [scope, mcpResult] of Object.entries(userResult.mcpResults)) {
|
|
29126
29254
|
if (!mcpResult)
|
|
@@ -29143,6 +29271,7 @@ async function runSync(context) {
|
|
|
29143
29271
|
var init_sync2 = __esm(() => {
|
|
29144
29272
|
init_dist2();
|
|
29145
29273
|
init_sync();
|
|
29274
|
+
init_format_sync();
|
|
29146
29275
|
});
|
|
29147
29276
|
|
|
29148
29277
|
// src/cli/tui/actions/init.ts
|
|
@@ -30429,6 +30558,7 @@ var repoListMeta = {
|
|
|
30429
30558
|
};
|
|
30430
30559
|
|
|
30431
30560
|
// src/cli/commands/workspace.ts
|
|
30561
|
+
init_format_sync();
|
|
30432
30562
|
function parseClientEntries(input) {
|
|
30433
30563
|
const validClients = ClientTypeSchema.options;
|
|
30434
30564
|
const validModes = InstallModeSchema.options;
|
|
@@ -30505,10 +30635,9 @@ Plugin sync results:`);
|
|
|
30505
30635
|
}
|
|
30506
30636
|
}
|
|
30507
30637
|
}
|
|
30508
|
-
console.log(
|
|
30509
|
-
|
|
30510
|
-
|
|
30511
|
-
console.log(` Failed: ${syncResult.totalFailed}`);
|
|
30638
|
+
console.log("");
|
|
30639
|
+
for (const line of formatSyncSummary(syncResult)) {
|
|
30640
|
+
console.log(line);
|
|
30512
30641
|
}
|
|
30513
30642
|
}
|
|
30514
30643
|
} catch (error) {
|
|
@@ -30608,11 +30737,11 @@ var syncCmd = import_cmd_ts2.command({
|
|
|
30608
30737
|
if (pluginResult.error) {
|
|
30609
30738
|
console.log(` Error: ${pluginResult.error}`);
|
|
30610
30739
|
}
|
|
30611
|
-
const
|
|
30740
|
+
for (const line of formatPluginArtifacts(pluginResult.copyResults)) {
|
|
30741
|
+
console.log(line);
|
|
30742
|
+
}
|
|
30612
30743
|
const generated = pluginResult.copyResults.filter((r) => r.action === "generated").length;
|
|
30613
30744
|
const failed = pluginResult.copyResults.filter((r) => r.action === "failed").length;
|
|
30614
|
-
if (copied > 0)
|
|
30615
|
-
console.log(` Copied: ${copied} files`);
|
|
30616
30745
|
if (generated > 0)
|
|
30617
30746
|
console.log(` Generated: ${generated} files`);
|
|
30618
30747
|
if (failed > 0) {
|
|
@@ -30658,15 +30787,10 @@ native:`);
|
|
|
30658
30787
|
}
|
|
30659
30788
|
}
|
|
30660
30789
|
}
|
|
30661
|
-
console.log(
|
|
30662
|
-
|
|
30663
|
-
|
|
30664
|
-
|
|
30665
|
-
console.log(` Total generated: ${result.totalGenerated}`);
|
|
30666
|
-
if (result.totalFailed > 0)
|
|
30667
|
-
console.log(` Total failed: ${result.totalFailed}`);
|
|
30668
|
-
if (result.totalSkipped > 0)
|
|
30669
|
-
console.log(` Total skipped: ${result.totalSkipped}`);
|
|
30790
|
+
console.log("");
|
|
30791
|
+
for (const line of formatSyncSummary(result, { dryRun })) {
|
|
30792
|
+
console.log(line);
|
|
30793
|
+
}
|
|
30670
30794
|
if (!result.success || result.totalFailed > 0) {
|
|
30671
30795
|
process.exit(1);
|
|
30672
30796
|
}
|
|
@@ -31641,6 +31765,7 @@ var skillsCmd = conciseSubcommands({
|
|
|
31641
31765
|
});
|
|
31642
31766
|
|
|
31643
31767
|
// src/cli/commands/plugin.ts
|
|
31768
|
+
init_format_sync();
|
|
31644
31769
|
init_workspace_config();
|
|
31645
31770
|
init_constants();
|
|
31646
31771
|
init_js_yaml();
|
|
@@ -31668,11 +31793,11 @@ Syncing workspace...
|
|
|
31668
31793
|
if (pluginResult.error) {
|
|
31669
31794
|
console.log(` Error: ${pluginResult.error}`);
|
|
31670
31795
|
}
|
|
31671
|
-
const
|
|
31796
|
+
for (const line of formatPluginArtifacts(pluginResult.copyResults)) {
|
|
31797
|
+
console.log(line);
|
|
31798
|
+
}
|
|
31672
31799
|
const generated = pluginResult.copyResults.filter((r) => r.action === "generated").length;
|
|
31673
31800
|
const failed = pluginResult.copyResults.filter((r) => r.action === "failed").length;
|
|
31674
|
-
if (copied > 0)
|
|
31675
|
-
console.log(` Copied: ${copied} files`);
|
|
31676
31801
|
if (generated > 0)
|
|
31677
31802
|
console.log(` Generated: ${generated} files`);
|
|
31678
31803
|
if (failed > 0) {
|
|
@@ -31692,17 +31817,9 @@ native:`);
|
|
|
31692
31817
|
}
|
|
31693
31818
|
}
|
|
31694
31819
|
}
|
|
31695
|
-
console.log(
|
|
31696
|
-
|
|
31697
|
-
|
|
31698
|
-
if (result.totalGenerated > 0) {
|
|
31699
|
-
console.log(` Total generated: ${result.totalGenerated}`);
|
|
31700
|
-
}
|
|
31701
|
-
if (result.totalFailed > 0) {
|
|
31702
|
-
console.log(` Total failed: ${result.totalFailed}`);
|
|
31703
|
-
}
|
|
31704
|
-
if (result.totalSkipped > 0) {
|
|
31705
|
-
console.log(` Total skipped: ${result.totalSkipped}`);
|
|
31820
|
+
console.log("");
|
|
31821
|
+
for (const line of formatSyncSummary(result)) {
|
|
31822
|
+
console.log(line);
|
|
31706
31823
|
}
|
|
31707
31824
|
}
|
|
31708
31825
|
return { ok: result.success && result.totalFailed === 0, syncData };
|
|
@@ -31728,11 +31845,11 @@ Syncing user workspace...
|
|
|
31728
31845
|
if (pluginResult.error) {
|
|
31729
31846
|
console.log(` Error: ${pluginResult.error}`);
|
|
31730
31847
|
}
|
|
31731
|
-
const
|
|
31848
|
+
for (const line of formatPluginArtifacts(pluginResult.copyResults)) {
|
|
31849
|
+
console.log(line);
|
|
31850
|
+
}
|
|
31732
31851
|
const generated = pluginResult.copyResults.filter((r) => r.action === "generated").length;
|
|
31733
31852
|
const failed = pluginResult.copyResults.filter((r) => r.action === "failed").length;
|
|
31734
|
-
if (copied > 0)
|
|
31735
|
-
console.log(` Copied: ${copied} files`);
|
|
31736
31853
|
if (generated > 0)
|
|
31737
31854
|
console.log(` Generated: ${generated} files`);
|
|
31738
31855
|
if (failed > 0) {
|
|
@@ -31765,17 +31882,9 @@ native:`);
|
|
|
31765
31882
|
}
|
|
31766
31883
|
}
|
|
31767
31884
|
}
|
|
31768
|
-
console.log(
|
|
31769
|
-
User sync
|
|
31770
|
-
|
|
31771
|
-
if (result.totalGenerated > 0) {
|
|
31772
|
-
console.log(` Total generated: ${result.totalGenerated}`);
|
|
31773
|
-
}
|
|
31774
|
-
if (result.totalFailed > 0) {
|
|
31775
|
-
console.log(` Total failed: ${result.totalFailed}`);
|
|
31776
|
-
}
|
|
31777
|
-
if (result.totalSkipped > 0) {
|
|
31778
|
-
console.log(` Total skipped: ${result.totalSkipped}`);
|
|
31885
|
+
console.log("");
|
|
31886
|
+
for (const line of formatSyncSummary(result, { label: "User sync" })) {
|
|
31887
|
+
console.log(line);
|
|
31779
31888
|
}
|
|
31780
31889
|
}
|
|
31781
31890
|
return { ok: result.success && result.totalFailed === 0, syncData };
|
|
@@ -32336,7 +32445,7 @@ Enabled skills: ${skills.join(", ")}`);
|
|
|
32336
32445
|
}
|
|
32337
32446
|
if (!isJsonMode()) {
|
|
32338
32447
|
if (result.autoRegistered) {
|
|
32339
|
-
console.log(
|
|
32448
|
+
console.log(` Resolved marketplace: ${result.autoRegistered}`);
|
|
32340
32449
|
}
|
|
32341
32450
|
console.log(`✓ Installed plugin (${isUser ? "user" : "project"} scope): ${displayPlugin}`);
|
|
32342
32451
|
}
|