allagents 0.31.2 → 0.32.0-next.2
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/LICENSE +21 -21
- package/README.md +441 -441
- package/dist/index.js +233 -75
- package/dist/templates/default/.allagents/workspace.yaml +15 -15
- package/package.json +1 -1
- package/dist/templates/default/AGENTS.md +0 -14
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) {
|
|
@@ -22992,6 +22988,14 @@ function parseMarketplaceSource(source) {
|
|
|
22992
22988
|
}
|
|
22993
22989
|
return null;
|
|
22994
22990
|
}
|
|
22991
|
+
if (source.match(/^(https?|git|ssh):\/\/.+\/.+/)) {
|
|
22992
|
+
const name2 = source.split("/").filter(Boolean).pop()?.replace(/\.git$/, "") || "repo";
|
|
22993
|
+
return {
|
|
22994
|
+
type: "git",
|
|
22995
|
+
location: source,
|
|
22996
|
+
name: name2
|
|
22997
|
+
};
|
|
22998
|
+
}
|
|
22995
22999
|
const parts = source.split("/");
|
|
22996
23000
|
if (parts.length === 2 && parts[0] && parts[1] && !source.includes("\\") && !source.includes("://")) {
|
|
22997
23001
|
return {
|
|
@@ -23042,21 +23046,29 @@ async function addMarketplace(source, customName, branch) {
|
|
|
23042
23046
|
error: `Marketplace '${name}' already exists. Use 'update' to refresh it.`
|
|
23043
23047
|
};
|
|
23044
23048
|
}
|
|
23045
|
-
const sourceLocation =
|
|
23049
|
+
const sourceLocation = (() => {
|
|
23050
|
+
if (parsed.type === "github") {
|
|
23051
|
+
const { owner, repo } = parseLocation(parsed.location);
|
|
23052
|
+
return effectiveBranch ? `${owner}/${repo}/${effectiveBranch}` : `${owner}/${repo}`;
|
|
23053
|
+
}
|
|
23054
|
+
return parsed.location;
|
|
23055
|
+
})();
|
|
23046
23056
|
const existingBySource = findBySourceLocation(registry, sourceLocation);
|
|
23047
23057
|
if (existingBySource) {
|
|
23048
|
-
return { success: true, marketplace: existingBySource };
|
|
23058
|
+
return { success: true, marketplace: existingBySource, alreadyRegistered: true };
|
|
23049
23059
|
}
|
|
23050
23060
|
let marketplacePath;
|
|
23051
|
-
if (parsed.type === "github") {
|
|
23061
|
+
if (parsed.type === "github" || parsed.type === "git") {
|
|
23052
23062
|
marketplacePath = join9(getMarketplacesDir(), name);
|
|
23053
23063
|
if (existsSync6(marketplacePath)) {} else {
|
|
23054
23064
|
const parentDir = getMarketplacesDir();
|
|
23055
23065
|
if (!existsSync6(parentDir)) {
|
|
23056
23066
|
await mkdir5(parentDir, { recursive: true });
|
|
23057
23067
|
}
|
|
23058
|
-
const
|
|
23059
|
-
|
|
23068
|
+
const repoUrl = parsed.type === "github" ? (() => {
|
|
23069
|
+
const { owner, repo } = parseLocation(parsed.location);
|
|
23070
|
+
return gitHubUrl(owner, repo);
|
|
23071
|
+
})() : parsed.location;
|
|
23060
23072
|
try {
|
|
23061
23073
|
await cloneTo(repoUrl, marketplacePath, effectiveBranch);
|
|
23062
23074
|
} catch (error) {
|
|
@@ -23064,7 +23076,7 @@ async function addMarketplace(source, customName, branch) {
|
|
|
23064
23076
|
if (error.isAuthError) {
|
|
23065
23077
|
return {
|
|
23066
23078
|
success: false,
|
|
23067
|
-
error: `Authentication failed for ${
|
|
23079
|
+
error: `Authentication failed for ${parsed.location}.
|
|
23068
23080
|
Check your SSH keys or git credentials.`
|
|
23069
23081
|
};
|
|
23070
23082
|
}
|
|
@@ -23073,7 +23085,7 @@ async function addMarketplace(source, customName, branch) {
|
|
|
23073
23085
|
if (msg.toLowerCase().includes("not found") || msg.includes("404")) {
|
|
23074
23086
|
return {
|
|
23075
23087
|
success: false,
|
|
23076
|
-
error: `Repository not found: ${
|
|
23088
|
+
error: `Repository not found: ${parsed.location}`
|
|
23077
23089
|
};
|
|
23078
23090
|
}
|
|
23079
23091
|
return {
|
|
@@ -23100,7 +23112,8 @@ async function addMarketplace(source, customName, branch) {
|
|
|
23100
23112
|
if (existing) {
|
|
23101
23113
|
return {
|
|
23102
23114
|
success: true,
|
|
23103
|
-
marketplace: existing
|
|
23115
|
+
marketplace: existing,
|
|
23116
|
+
alreadyRegistered: true
|
|
23104
23117
|
};
|
|
23105
23118
|
}
|
|
23106
23119
|
name = manifestName;
|
|
@@ -23203,7 +23216,7 @@ async function updateMarketplace(name) {
|
|
|
23203
23216
|
continue;
|
|
23204
23217
|
}
|
|
23205
23218
|
try {
|
|
23206
|
-
const
|
|
23219
|
+
const storedBranch = marketplace.source.type === "github" ? parseLocation(marketplace.source.location).branch : undefined;
|
|
23207
23220
|
const git = esm_default(marketplace.path);
|
|
23208
23221
|
let targetBranch;
|
|
23209
23222
|
if (storedBranch) {
|
|
@@ -23388,17 +23401,20 @@ async function resolvePluginSpec(spec, options = {}) {
|
|
|
23388
23401
|
};
|
|
23389
23402
|
}
|
|
23390
23403
|
async function refreshMarketplace(marketplace) {
|
|
23391
|
-
if (marketplace.source.type
|
|
23404
|
+
if (marketplace.source.type === "local") {
|
|
23392
23405
|
return { success: true, marketplace };
|
|
23393
23406
|
}
|
|
23394
|
-
const { owner, repo, branch } = parseLocation(marketplace.source.location);
|
|
23395
23407
|
const registry = await loadRegistry();
|
|
23396
23408
|
delete registry.marketplaces[marketplace.name];
|
|
23397
23409
|
await saveRegistry(registry);
|
|
23398
23410
|
if (existsSync6(marketplace.path)) {
|
|
23399
23411
|
await rm3(marketplace.path, { recursive: true, force: true });
|
|
23400
23412
|
}
|
|
23401
|
-
|
|
23413
|
+
if (marketplace.source.type === "github") {
|
|
23414
|
+
const { owner, repo, branch } = parseLocation(marketplace.source.location);
|
|
23415
|
+
return addMarketplace(`${owner}/${repo}`, marketplace.name, branch);
|
|
23416
|
+
}
|
|
23417
|
+
return addMarketplace(marketplace.source.location, marketplace.name);
|
|
23402
23418
|
}
|
|
23403
23419
|
async function resolvePluginSpecWithAutoRegister(spec, options = {}) {
|
|
23404
23420
|
const parsed = parsePluginSpec(spec);
|
|
@@ -23431,7 +23447,7 @@ async function resolvePluginSpecWithAutoRegister(spec, options = {}) {
|
|
|
23431
23447
|
error: `Marketplace '${marketplaceName}' not found`
|
|
23432
23448
|
};
|
|
23433
23449
|
}
|
|
23434
|
-
if (!didAutoRegister && !options.offline && marketplace.source.type
|
|
23450
|
+
if (!didAutoRegister && !options.offline && marketplace.source.type !== "local" && !updatedMarketplaceCache.has(marketplace.name)) {
|
|
23435
23451
|
const results = await updateMarketplace(marketplace.name);
|
|
23436
23452
|
const result = results[0];
|
|
23437
23453
|
if (result?.success) {
|
|
@@ -23448,7 +23464,7 @@ async function resolvePluginSpecWithAutoRegister(spec, options = {}) {
|
|
|
23448
23464
|
...options.offline != null && { offline: options.offline }
|
|
23449
23465
|
};
|
|
23450
23466
|
let resolved = await resolvePluginSpec(spec, resolveOpts);
|
|
23451
|
-
if (!resolved && !options.offline && marketplace.source.type
|
|
23467
|
+
if (!resolved && !options.offline && marketplace.source.type !== "local") {
|
|
23452
23468
|
console.log(`Plugin not found in cached marketplace, refreshing '${marketplace.name}'...`);
|
|
23453
23469
|
const refreshResult = await refreshMarketplace(marketplace);
|
|
23454
23470
|
if (refreshResult.success && refreshResult.marketplace) {
|
|
@@ -23489,12 +23505,14 @@ async function autoRegisterMarketplace(source) {
|
|
|
23489
23505
|
registeredSourceCache.set(source, existing.name);
|
|
23490
23506
|
return { success: true, name: existing.name };
|
|
23491
23507
|
}
|
|
23492
|
-
console.log(`Auto-registering GitHub marketplace: ${source}`);
|
|
23493
23508
|
const result = await addMarketplace(source);
|
|
23494
23509
|
if (!result.success) {
|
|
23495
23510
|
return { success: false, error: result.error || "Unknown error" };
|
|
23496
23511
|
}
|
|
23497
23512
|
const name = result.marketplace?.name ?? parts[1];
|
|
23513
|
+
if (!result.alreadyRegistered) {
|
|
23514
|
+
console.log(`Auto-registered GitHub marketplace: ${source}`);
|
|
23515
|
+
}
|
|
23498
23516
|
registeredSourceCache.set(source, name);
|
|
23499
23517
|
return { success: true, name };
|
|
23500
23518
|
}
|
|
@@ -23535,6 +23553,23 @@ async function ensureMarketplacesRegistered(plugins) {
|
|
|
23535
23553
|
}
|
|
23536
23554
|
return results;
|
|
23537
23555
|
}
|
|
23556
|
+
async function getMarketplaceVersion(marketplacePath) {
|
|
23557
|
+
if (!existsSync6(marketplacePath)) {
|
|
23558
|
+
return null;
|
|
23559
|
+
}
|
|
23560
|
+
try {
|
|
23561
|
+
const git = esm_default(marketplacePath);
|
|
23562
|
+
const log = await git.log({ maxCount: 1 });
|
|
23563
|
+
if (!log.latest)
|
|
23564
|
+
return null;
|
|
23565
|
+
return {
|
|
23566
|
+
hash: log.latest.hash.slice(0, 7),
|
|
23567
|
+
date: new Date(log.latest.date)
|
|
23568
|
+
};
|
|
23569
|
+
} catch {
|
|
23570
|
+
return null;
|
|
23571
|
+
}
|
|
23572
|
+
}
|
|
23538
23573
|
var registeredSourceCache, updatedMarketplaceCache;
|
|
23539
23574
|
var init_marketplace = __esm(() => {
|
|
23540
23575
|
init_esm();
|
|
@@ -26350,6 +26385,122 @@ var init_status2 = __esm(() => {
|
|
|
26350
26385
|
});
|
|
26351
26386
|
|
|
26352
26387
|
// src/cli/format-sync.ts
|
|
26388
|
+
function buildPathLookup() {
|
|
26389
|
+
const entries = [];
|
|
26390
|
+
const seen = new Set;
|
|
26391
|
+
for (const mappings of [CLIENT_MAPPINGS, USER_CLIENT_MAPPINGS]) {
|
|
26392
|
+
for (const [client, mapping] of Object.entries(mappings)) {
|
|
26393
|
+
const paths = [
|
|
26394
|
+
[mapping.skillsPath, "skill"],
|
|
26395
|
+
[mapping.commandsPath, "command"],
|
|
26396
|
+
[mapping.agentsPath, "agent"],
|
|
26397
|
+
[mapping.hooksPath, "hook"]
|
|
26398
|
+
];
|
|
26399
|
+
for (const [path, artifactType] of paths) {
|
|
26400
|
+
if (!path)
|
|
26401
|
+
continue;
|
|
26402
|
+
const key = `${path}|${artifactType}`;
|
|
26403
|
+
if (seen.has(key))
|
|
26404
|
+
continue;
|
|
26405
|
+
seen.add(key);
|
|
26406
|
+
entries.push({ path, client, artifactType });
|
|
26407
|
+
}
|
|
26408
|
+
}
|
|
26409
|
+
}
|
|
26410
|
+
entries.sort((a, b) => b.path.length - a.path.length);
|
|
26411
|
+
return entries;
|
|
26412
|
+
}
|
|
26413
|
+
function getPathLookup() {
|
|
26414
|
+
if (!cachedLookup)
|
|
26415
|
+
cachedLookup = buildPathLookup();
|
|
26416
|
+
return cachedLookup;
|
|
26417
|
+
}
|
|
26418
|
+
function classifyDestination(dest) {
|
|
26419
|
+
const normalized = dest.replace(/\\/g, "/");
|
|
26420
|
+
for (const entry of getPathLookup()) {
|
|
26421
|
+
if (normalized.includes(`/${entry.path}`) || normalized.startsWith(entry.path)) {
|
|
26422
|
+
return { client: entry.client, artifactType: entry.artifactType };
|
|
26423
|
+
}
|
|
26424
|
+
}
|
|
26425
|
+
return null;
|
|
26426
|
+
}
|
|
26427
|
+
function classifyCopyResults(copyResults) {
|
|
26428
|
+
const clientCounts = new Map;
|
|
26429
|
+
for (const result of copyResults) {
|
|
26430
|
+
if (result.action !== "copied")
|
|
26431
|
+
continue;
|
|
26432
|
+
const classification = classifyDestination(result.destination);
|
|
26433
|
+
if (!classification)
|
|
26434
|
+
continue;
|
|
26435
|
+
const { client, artifactType } = classification;
|
|
26436
|
+
let counts = clientCounts.get(client);
|
|
26437
|
+
if (!counts) {
|
|
26438
|
+
counts = { skills: 0, commands: 0, agents: 0, hooks: 0 };
|
|
26439
|
+
clientCounts.set(client, counts);
|
|
26440
|
+
}
|
|
26441
|
+
switch (artifactType) {
|
|
26442
|
+
case "skill":
|
|
26443
|
+
counts.skills++;
|
|
26444
|
+
break;
|
|
26445
|
+
case "command":
|
|
26446
|
+
counts.commands++;
|
|
26447
|
+
break;
|
|
26448
|
+
case "agent":
|
|
26449
|
+
counts.agents++;
|
|
26450
|
+
break;
|
|
26451
|
+
case "hook":
|
|
26452
|
+
counts.hooks++;
|
|
26453
|
+
break;
|
|
26454
|
+
}
|
|
26455
|
+
}
|
|
26456
|
+
return clientCounts;
|
|
26457
|
+
}
|
|
26458
|
+
function formatArtifactLines(clientCounts, indent = " ") {
|
|
26459
|
+
const lines = [];
|
|
26460
|
+
for (const [client, counts] of clientCounts) {
|
|
26461
|
+
const parts = [];
|
|
26462
|
+
if (counts.commands > 0)
|
|
26463
|
+
parts.push(`${counts.commands} ${counts.commands === 1 ? "command" : "commands"}`);
|
|
26464
|
+
if (counts.skills > 0)
|
|
26465
|
+
parts.push(`${counts.skills} ${counts.skills === 1 ? "skill" : "skills"}`);
|
|
26466
|
+
if (counts.agents > 0)
|
|
26467
|
+
parts.push(`${counts.agents} ${counts.agents === 1 ? "agent" : "agents"}`);
|
|
26468
|
+
if (counts.hooks > 0)
|
|
26469
|
+
parts.push(`${counts.hooks} ${counts.hooks === 1 ? "hook" : "hooks"}`);
|
|
26470
|
+
if (parts.length > 0) {
|
|
26471
|
+
lines.push(`${indent}${client}: ${parts.join(", ")}`);
|
|
26472
|
+
}
|
|
26473
|
+
}
|
|
26474
|
+
return lines;
|
|
26475
|
+
}
|
|
26476
|
+
function formatPluginArtifacts(copyResults, indent = " ") {
|
|
26477
|
+
const copied = copyResults.filter((r) => r.action === "copied");
|
|
26478
|
+
if (copied.length === 0)
|
|
26479
|
+
return [];
|
|
26480
|
+
const classified = classifyCopyResults(copied);
|
|
26481
|
+
if (classified.size === 0) {
|
|
26482
|
+
return [`${indent}Copied: ${copied.length} ${copied.length === 1 ? "file" : "files"}`];
|
|
26483
|
+
}
|
|
26484
|
+
return formatArtifactLines(classified, indent);
|
|
26485
|
+
}
|
|
26486
|
+
function formatSyncSummary(result, { dryRun = false, label = "Sync" } = {}) {
|
|
26487
|
+
const lines = [];
|
|
26488
|
+
const allCopied = result.pluginResults.flatMap((pr) => pr.copyResults.filter((r) => r.action === "copied"));
|
|
26489
|
+
lines.push(`${label} complete${dryRun ? " (dry run)" : ""}:`);
|
|
26490
|
+
const classified = classifyCopyResults(allCopied);
|
|
26491
|
+
if (classified.size > 0) {
|
|
26492
|
+
lines.push(...formatArtifactLines(classified));
|
|
26493
|
+
} else if (allCopied.length > 0) {
|
|
26494
|
+
lines.push(` Total ${dryRun ? "would copy" : "copied"}: ${result.totalCopied}`);
|
|
26495
|
+
}
|
|
26496
|
+
if (result.totalGenerated > 0)
|
|
26497
|
+
lines.push(` Total generated: ${result.totalGenerated}`);
|
|
26498
|
+
if (result.totalFailed > 0)
|
|
26499
|
+
lines.push(` Total failed: ${result.totalFailed}`);
|
|
26500
|
+
if (result.totalSkipped > 0)
|
|
26501
|
+
lines.push(` Total skipped: ${result.totalSkipped}`);
|
|
26502
|
+
return lines;
|
|
26503
|
+
}
|
|
26353
26504
|
function formatMcpResult(mcpResult, scope) {
|
|
26354
26505
|
const { added, overwritten, removed, skipped } = mcpResult;
|
|
26355
26506
|
if (added === 0 && overwritten === 0 && removed === 0 && skipped === 0) {
|
|
@@ -26439,6 +26590,10 @@ function buildSyncData(result) {
|
|
|
26439
26590
|
}
|
|
26440
26591
|
};
|
|
26441
26592
|
}
|
|
26593
|
+
var cachedLookup = null;
|
|
26594
|
+
var init_format_sync = __esm(() => {
|
|
26595
|
+
init_client_mapping();
|
|
26596
|
+
});
|
|
26442
26597
|
|
|
26443
26598
|
// node_modules/picocolors/picocolors.js
|
|
26444
26599
|
var require_picocolors = __commonJS((exports, module) => {
|
|
@@ -28819,7 +28974,7 @@ var package_default;
|
|
|
28819
28974
|
var init_package = __esm(() => {
|
|
28820
28975
|
package_default = {
|
|
28821
28976
|
name: "allagents",
|
|
28822
|
-
version: "0.
|
|
28977
|
+
version: "0.32.0-next.2",
|
|
28823
28978
|
description: "CLI tool for managing multi-repo AI agent workspaces with plugin synchronization",
|
|
28824
28979
|
type: "module",
|
|
28825
28980
|
bin: {
|
|
@@ -29107,7 +29262,7 @@ async function runSync(context) {
|
|
|
29107
29262
|
} else {
|
|
29108
29263
|
const lines = result.pluginResults.map((pr) => `${pr.success ? "✓" : "✗"} ${pr.plugin}`);
|
|
29109
29264
|
lines.push("");
|
|
29110
|
-
lines.push(
|
|
29265
|
+
lines.push(...formatSyncSummary(result));
|
|
29111
29266
|
if (result.nativeResult) {
|
|
29112
29267
|
lines.push(...formatNativeResult(result.nativeResult));
|
|
29113
29268
|
}
|
|
@@ -29124,7 +29279,7 @@ async function runSync(context) {
|
|
|
29124
29279
|
} else {
|
|
29125
29280
|
const lines = userResult.pluginResults.map((pr) => `${pr.success ? "✓" : "✗"} ${pr.plugin}`);
|
|
29126
29281
|
lines.push("");
|
|
29127
|
-
lines.push(
|
|
29282
|
+
lines.push(...formatSyncSummary(userResult));
|
|
29128
29283
|
if (userResult.mcpResults) {
|
|
29129
29284
|
for (const [scope, mcpResult] of Object.entries(userResult.mcpResults)) {
|
|
29130
29285
|
if (!mcpResult)
|
|
@@ -29147,6 +29302,7 @@ async function runSync(context) {
|
|
|
29147
29302
|
var init_sync2 = __esm(() => {
|
|
29148
29303
|
init_dist2();
|
|
29149
29304
|
init_sync();
|
|
29305
|
+
init_format_sync();
|
|
29150
29306
|
});
|
|
29151
29307
|
|
|
29152
29308
|
// src/cli/tui/actions/init.ts
|
|
@@ -29615,7 +29771,7 @@ async function runBrowseMarketplaces(context, cache2) {
|
|
|
29615
29771
|
const options = [
|
|
29616
29772
|
{ label: "+ Add marketplace", value: "__add__" },
|
|
29617
29773
|
...marketplaces.map((m) => ({
|
|
29618
|
-
label: `${m.name} (${m.source.type}: ${m.source.location})`,
|
|
29774
|
+
label: `${m.name} (${m.source.type === "github" ? "GitHub" : m.source.type === "git" ? "Git" : "Local"}: ${m.source.location})`,
|
|
29619
29775
|
value: m.name
|
|
29620
29776
|
})),
|
|
29621
29777
|
{ label: "Back", value: "__back__" }
|
|
@@ -30433,6 +30589,7 @@ var repoListMeta = {
|
|
|
30433
30589
|
};
|
|
30434
30590
|
|
|
30435
30591
|
// src/cli/commands/workspace.ts
|
|
30592
|
+
init_format_sync();
|
|
30436
30593
|
function parseClientEntries(input) {
|
|
30437
30594
|
const validClients = ClientTypeSchema.options;
|
|
30438
30595
|
const validModes = InstallModeSchema.options;
|
|
@@ -30509,10 +30666,9 @@ Plugin sync results:`);
|
|
|
30509
30666
|
}
|
|
30510
30667
|
}
|
|
30511
30668
|
}
|
|
30512
|
-
console.log(
|
|
30513
|
-
|
|
30514
|
-
|
|
30515
|
-
console.log(` Failed: ${syncResult.totalFailed}`);
|
|
30669
|
+
console.log("");
|
|
30670
|
+
for (const line of formatSyncSummary(syncResult)) {
|
|
30671
|
+
console.log(line);
|
|
30516
30672
|
}
|
|
30517
30673
|
}
|
|
30518
30674
|
} catch (error) {
|
|
@@ -30612,11 +30768,11 @@ var syncCmd = import_cmd_ts2.command({
|
|
|
30612
30768
|
if (pluginResult.error) {
|
|
30613
30769
|
console.log(` Error: ${pluginResult.error}`);
|
|
30614
30770
|
}
|
|
30615
|
-
const
|
|
30771
|
+
for (const line of formatPluginArtifacts(pluginResult.copyResults)) {
|
|
30772
|
+
console.log(line);
|
|
30773
|
+
}
|
|
30616
30774
|
const generated = pluginResult.copyResults.filter((r) => r.action === "generated").length;
|
|
30617
30775
|
const failed = pluginResult.copyResults.filter((r) => r.action === "failed").length;
|
|
30618
|
-
if (copied > 0)
|
|
30619
|
-
console.log(` Copied: ${copied} files`);
|
|
30620
30776
|
if (generated > 0)
|
|
30621
30777
|
console.log(` Generated: ${generated} files`);
|
|
30622
30778
|
if (failed > 0) {
|
|
@@ -30662,15 +30818,10 @@ native:`);
|
|
|
30662
30818
|
}
|
|
30663
30819
|
}
|
|
30664
30820
|
}
|
|
30665
|
-
console.log(
|
|
30666
|
-
|
|
30667
|
-
|
|
30668
|
-
|
|
30669
|
-
console.log(` Total generated: ${result.totalGenerated}`);
|
|
30670
|
-
if (result.totalFailed > 0)
|
|
30671
|
-
console.log(` Total failed: ${result.totalFailed}`);
|
|
30672
|
-
if (result.totalSkipped > 0)
|
|
30673
|
-
console.log(` Total skipped: ${result.totalSkipped}`);
|
|
30821
|
+
console.log("");
|
|
30822
|
+
for (const line of formatSyncSummary(result, { dryRun })) {
|
|
30823
|
+
console.log(line);
|
|
30824
|
+
}
|
|
30674
30825
|
if (!result.success || result.totalFailed > 0) {
|
|
30675
30826
|
process.exit(1);
|
|
30676
30827
|
}
|
|
@@ -31645,6 +31796,7 @@ var skillsCmd = conciseSubcommands({
|
|
|
31645
31796
|
});
|
|
31646
31797
|
|
|
31647
31798
|
// src/cli/commands/plugin.ts
|
|
31799
|
+
init_format_sync();
|
|
31648
31800
|
init_workspace_config();
|
|
31649
31801
|
init_constants();
|
|
31650
31802
|
init_js_yaml();
|
|
@@ -31672,11 +31824,11 @@ Syncing workspace...
|
|
|
31672
31824
|
if (pluginResult.error) {
|
|
31673
31825
|
console.log(` Error: ${pluginResult.error}`);
|
|
31674
31826
|
}
|
|
31675
|
-
const
|
|
31827
|
+
for (const line of formatPluginArtifacts(pluginResult.copyResults)) {
|
|
31828
|
+
console.log(line);
|
|
31829
|
+
}
|
|
31676
31830
|
const generated = pluginResult.copyResults.filter((r) => r.action === "generated").length;
|
|
31677
31831
|
const failed = pluginResult.copyResults.filter((r) => r.action === "failed").length;
|
|
31678
|
-
if (copied > 0)
|
|
31679
|
-
console.log(` Copied: ${copied} files`);
|
|
31680
31832
|
if (generated > 0)
|
|
31681
31833
|
console.log(` Generated: ${generated} files`);
|
|
31682
31834
|
if (failed > 0) {
|
|
@@ -31696,17 +31848,9 @@ native:`);
|
|
|
31696
31848
|
}
|
|
31697
31849
|
}
|
|
31698
31850
|
}
|
|
31699
|
-
console.log(
|
|
31700
|
-
|
|
31701
|
-
|
|
31702
|
-
if (result.totalGenerated > 0) {
|
|
31703
|
-
console.log(` Total generated: ${result.totalGenerated}`);
|
|
31704
|
-
}
|
|
31705
|
-
if (result.totalFailed > 0) {
|
|
31706
|
-
console.log(` Total failed: ${result.totalFailed}`);
|
|
31707
|
-
}
|
|
31708
|
-
if (result.totalSkipped > 0) {
|
|
31709
|
-
console.log(` Total skipped: ${result.totalSkipped}`);
|
|
31851
|
+
console.log("");
|
|
31852
|
+
for (const line of formatSyncSummary(result)) {
|
|
31853
|
+
console.log(line);
|
|
31710
31854
|
}
|
|
31711
31855
|
}
|
|
31712
31856
|
return { ok: result.success && result.totalFailed === 0, syncData };
|
|
@@ -31732,11 +31876,11 @@ Syncing user workspace...
|
|
|
31732
31876
|
if (pluginResult.error) {
|
|
31733
31877
|
console.log(` Error: ${pluginResult.error}`);
|
|
31734
31878
|
}
|
|
31735
|
-
const
|
|
31879
|
+
for (const line of formatPluginArtifacts(pluginResult.copyResults)) {
|
|
31880
|
+
console.log(line);
|
|
31881
|
+
}
|
|
31736
31882
|
const generated = pluginResult.copyResults.filter((r) => r.action === "generated").length;
|
|
31737
31883
|
const failed = pluginResult.copyResults.filter((r) => r.action === "failed").length;
|
|
31738
|
-
if (copied > 0)
|
|
31739
|
-
console.log(` Copied: ${copied} files`);
|
|
31740
31884
|
if (generated > 0)
|
|
31741
31885
|
console.log(` Generated: ${generated} files`);
|
|
31742
31886
|
if (failed > 0) {
|
|
@@ -31769,17 +31913,9 @@ native:`);
|
|
|
31769
31913
|
}
|
|
31770
31914
|
}
|
|
31771
31915
|
}
|
|
31772
|
-
console.log(
|
|
31773
|
-
User sync
|
|
31774
|
-
|
|
31775
|
-
if (result.totalGenerated > 0) {
|
|
31776
|
-
console.log(` Total generated: ${result.totalGenerated}`);
|
|
31777
|
-
}
|
|
31778
|
-
if (result.totalFailed > 0) {
|
|
31779
|
-
console.log(` Total failed: ${result.totalFailed}`);
|
|
31780
|
-
}
|
|
31781
|
-
if (result.totalSkipped > 0) {
|
|
31782
|
-
console.log(` Total skipped: ${result.totalSkipped}`);
|
|
31916
|
+
console.log("");
|
|
31917
|
+
for (const line of formatSyncSummary(result, { label: "User sync" })) {
|
|
31918
|
+
console.log(line);
|
|
31783
31919
|
}
|
|
31784
31920
|
}
|
|
31785
31921
|
return { ok: result.success && result.totalFailed === 0, syncData };
|
|
@@ -31792,10 +31928,20 @@ var marketplaceListCmd = import_cmd_ts4.command({
|
|
|
31792
31928
|
try {
|
|
31793
31929
|
const marketplaces = await listMarketplaces();
|
|
31794
31930
|
if (isJsonMode()) {
|
|
31931
|
+
const enriched = await Promise.all(marketplaces.map(async (mp) => {
|
|
31932
|
+
const version = await getMarketplaceVersion(mp.path);
|
|
31933
|
+
return {
|
|
31934
|
+
...mp,
|
|
31935
|
+
...version && {
|
|
31936
|
+
commitHash: version.hash,
|
|
31937
|
+
commitTimestamp: version.date.toISOString()
|
|
31938
|
+
}
|
|
31939
|
+
};
|
|
31940
|
+
}));
|
|
31795
31941
|
jsonOutput({
|
|
31796
31942
|
success: true,
|
|
31797
31943
|
command: "plugin marketplace list",
|
|
31798
|
-
data: { marketplaces }
|
|
31944
|
+
data: { marketplaces: enriched }
|
|
31799
31945
|
});
|
|
31800
31946
|
return;
|
|
31801
31947
|
}
|
|
@@ -31813,12 +31959,24 @@ var marketplaceListCmd = import_cmd_ts4.command({
|
|
|
31813
31959
|
console.log(`Registered marketplaces:
|
|
31814
31960
|
`);
|
|
31815
31961
|
for (const mp of marketplaces) {
|
|
31816
|
-
|
|
31817
|
-
|
|
31818
|
-
|
|
31819
|
-
|
|
31820
|
-
|
|
31821
|
-
|
|
31962
|
+
let sourceLabel;
|
|
31963
|
+
switch (mp.source.type) {
|
|
31964
|
+
case "github":
|
|
31965
|
+
sourceLabel = `GitHub: ${mp.source.location}`;
|
|
31966
|
+
break;
|
|
31967
|
+
case "git":
|
|
31968
|
+
sourceLabel = `Git: ${mp.source.location}`;
|
|
31969
|
+
break;
|
|
31970
|
+
default:
|
|
31971
|
+
sourceLabel = `Local: ${mp.source.location}`;
|
|
31972
|
+
}
|
|
31973
|
+
console.log(` ❯ ${mp.name}`);
|
|
31974
|
+
console.log(` Source: ${sourceLabel}`);
|
|
31975
|
+
const version = await getMarketplaceVersion(mp.path);
|
|
31976
|
+
if (version) {
|
|
31977
|
+
const ts = version.date.toISOString().replace("T", " ").slice(0, 16);
|
|
31978
|
+
console.log(` Version: ${version.hash} (${ts})`);
|
|
31979
|
+
}
|
|
31822
31980
|
console.log();
|
|
31823
31981
|
}
|
|
31824
31982
|
console.log(`Total: ${marketplaces.length} marketplace(s)`);
|
|
@@ -32340,7 +32498,7 @@ Enabled skills: ${skills.join(", ")}`);
|
|
|
32340
32498
|
}
|
|
32341
32499
|
if (!isJsonMode()) {
|
|
32342
32500
|
if (result.autoRegistered) {
|
|
32343
|
-
console.log(
|
|
32501
|
+
console.log(` Resolved marketplace: ${result.autoRegistered}`);
|
|
32344
32502
|
}
|
|
32345
32503
|
console.log(`✓ Installed plugin (${isUser ? "user" : "project"} scope): ${displayPlugin}`);
|
|
32346
32504
|
}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
# Workspace root files (optional)
|
|
2
|
-
# workspace:
|
|
3
|
-
# source: ./path/to/config # local path, GitHub URL, or plugin@marketplace
|
|
4
|
-
# files:
|
|
5
|
-
# - CLAUDE.md
|
|
6
|
-
# - AGENTS.md
|
|
7
|
-
# - source: docs/CLAUDE.md # explicit source/dest mapping
|
|
8
|
-
# dest: CLAUDE.md
|
|
9
|
-
|
|
10
|
-
repositories: []
|
|
11
|
-
|
|
12
|
-
plugins: []
|
|
13
|
-
|
|
14
|
-
clients:
|
|
15
|
-
- universal
|
|
1
|
+
# Workspace root files (optional)
|
|
2
|
+
# workspace:
|
|
3
|
+
# source: ./path/to/config # local path, GitHub URL, or plugin@marketplace
|
|
4
|
+
# files:
|
|
5
|
+
# - CLAUDE.md
|
|
6
|
+
# - AGENTS.md
|
|
7
|
+
# - source: docs/CLAUDE.md # explicit source/dest mapping
|
|
8
|
+
# dest: CLAUDE.md
|
|
9
|
+
|
|
10
|
+
repositories: []
|
|
11
|
+
|
|
12
|
+
plugins: []
|
|
13
|
+
|
|
14
|
+
clients:
|
|
15
|
+
- universal
|
package/package.json
CHANGED