allagents 0.32.0-next.1 → 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/dist/index.js +77 -24
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -22988,6 +22988,14 @@ function parseMarketplaceSource(source) {
|
|
|
22988
22988
|
}
|
|
22989
22989
|
return null;
|
|
22990
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
|
+
}
|
|
22991
22999
|
const parts = source.split("/");
|
|
22992
23000
|
if (parts.length === 2 && parts[0] && parts[1] && !source.includes("\\") && !source.includes("://")) {
|
|
22993
23001
|
return {
|
|
@@ -23039,25 +23047,28 @@ async function addMarketplace(source, customName, branch) {
|
|
|
23039
23047
|
};
|
|
23040
23048
|
}
|
|
23041
23049
|
const sourceLocation = (() => {
|
|
23042
|
-
if (parsed.type
|
|
23043
|
-
|
|
23044
|
-
|
|
23045
|
-
|
|
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;
|
|
23046
23055
|
})();
|
|
23047
23056
|
const existingBySource = findBySourceLocation(registry, sourceLocation);
|
|
23048
23057
|
if (existingBySource) {
|
|
23049
23058
|
return { success: true, marketplace: existingBySource, alreadyRegistered: true };
|
|
23050
23059
|
}
|
|
23051
23060
|
let marketplacePath;
|
|
23052
|
-
if (parsed.type === "github") {
|
|
23061
|
+
if (parsed.type === "github" || parsed.type === "git") {
|
|
23053
23062
|
marketplacePath = join9(getMarketplacesDir(), name);
|
|
23054
23063
|
if (existsSync6(marketplacePath)) {} else {
|
|
23055
23064
|
const parentDir = getMarketplacesDir();
|
|
23056
23065
|
if (!existsSync6(parentDir)) {
|
|
23057
23066
|
await mkdir5(parentDir, { recursive: true });
|
|
23058
23067
|
}
|
|
23059
|
-
const
|
|
23060
|
-
|
|
23068
|
+
const repoUrl = parsed.type === "github" ? (() => {
|
|
23069
|
+
const { owner, repo } = parseLocation(parsed.location);
|
|
23070
|
+
return gitHubUrl(owner, repo);
|
|
23071
|
+
})() : parsed.location;
|
|
23061
23072
|
try {
|
|
23062
23073
|
await cloneTo(repoUrl, marketplacePath, effectiveBranch);
|
|
23063
23074
|
} catch (error) {
|
|
@@ -23065,7 +23076,7 @@ async function addMarketplace(source, customName, branch) {
|
|
|
23065
23076
|
if (error.isAuthError) {
|
|
23066
23077
|
return {
|
|
23067
23078
|
success: false,
|
|
23068
|
-
error: `Authentication failed for ${
|
|
23079
|
+
error: `Authentication failed for ${parsed.location}.
|
|
23069
23080
|
Check your SSH keys or git credentials.`
|
|
23070
23081
|
};
|
|
23071
23082
|
}
|
|
@@ -23074,7 +23085,7 @@ async function addMarketplace(source, customName, branch) {
|
|
|
23074
23085
|
if (msg.toLowerCase().includes("not found") || msg.includes("404")) {
|
|
23075
23086
|
return {
|
|
23076
23087
|
success: false,
|
|
23077
|
-
error: `Repository not found: ${
|
|
23088
|
+
error: `Repository not found: ${parsed.location}`
|
|
23078
23089
|
};
|
|
23079
23090
|
}
|
|
23080
23091
|
return {
|
|
@@ -23205,7 +23216,7 @@ async function updateMarketplace(name) {
|
|
|
23205
23216
|
continue;
|
|
23206
23217
|
}
|
|
23207
23218
|
try {
|
|
23208
|
-
const
|
|
23219
|
+
const storedBranch = marketplace.source.type === "github" ? parseLocation(marketplace.source.location).branch : undefined;
|
|
23209
23220
|
const git = esm_default(marketplace.path);
|
|
23210
23221
|
let targetBranch;
|
|
23211
23222
|
if (storedBranch) {
|
|
@@ -23390,17 +23401,20 @@ async function resolvePluginSpec(spec, options = {}) {
|
|
|
23390
23401
|
};
|
|
23391
23402
|
}
|
|
23392
23403
|
async function refreshMarketplace(marketplace) {
|
|
23393
|
-
if (marketplace.source.type
|
|
23404
|
+
if (marketplace.source.type === "local") {
|
|
23394
23405
|
return { success: true, marketplace };
|
|
23395
23406
|
}
|
|
23396
|
-
const { owner, repo, branch } = parseLocation(marketplace.source.location);
|
|
23397
23407
|
const registry = await loadRegistry();
|
|
23398
23408
|
delete registry.marketplaces[marketplace.name];
|
|
23399
23409
|
await saveRegistry(registry);
|
|
23400
23410
|
if (existsSync6(marketplace.path)) {
|
|
23401
23411
|
await rm3(marketplace.path, { recursive: true, force: true });
|
|
23402
23412
|
}
|
|
23403
|
-
|
|
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);
|
|
23404
23418
|
}
|
|
23405
23419
|
async function resolvePluginSpecWithAutoRegister(spec, options = {}) {
|
|
23406
23420
|
const parsed = parsePluginSpec(spec);
|
|
@@ -23433,7 +23447,7 @@ async function resolvePluginSpecWithAutoRegister(spec, options = {}) {
|
|
|
23433
23447
|
error: `Marketplace '${marketplaceName}' not found`
|
|
23434
23448
|
};
|
|
23435
23449
|
}
|
|
23436
|
-
if (!didAutoRegister && !options.offline && marketplace.source.type
|
|
23450
|
+
if (!didAutoRegister && !options.offline && marketplace.source.type !== "local" && !updatedMarketplaceCache.has(marketplace.name)) {
|
|
23437
23451
|
const results = await updateMarketplace(marketplace.name);
|
|
23438
23452
|
const result = results[0];
|
|
23439
23453
|
if (result?.success) {
|
|
@@ -23450,7 +23464,7 @@ async function resolvePluginSpecWithAutoRegister(spec, options = {}) {
|
|
|
23450
23464
|
...options.offline != null && { offline: options.offline }
|
|
23451
23465
|
};
|
|
23452
23466
|
let resolved = await resolvePluginSpec(spec, resolveOpts);
|
|
23453
|
-
if (!resolved && !options.offline && marketplace.source.type
|
|
23467
|
+
if (!resolved && !options.offline && marketplace.source.type !== "local") {
|
|
23454
23468
|
console.log(`Plugin not found in cached marketplace, refreshing '${marketplace.name}'...`);
|
|
23455
23469
|
const refreshResult = await refreshMarketplace(marketplace);
|
|
23456
23470
|
if (refreshResult.success && refreshResult.marketplace) {
|
|
@@ -23539,6 +23553,23 @@ async function ensureMarketplacesRegistered(plugins) {
|
|
|
23539
23553
|
}
|
|
23540
23554
|
return results;
|
|
23541
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
|
+
}
|
|
23542
23573
|
var registeredSourceCache, updatedMarketplaceCache;
|
|
23543
23574
|
var init_marketplace = __esm(() => {
|
|
23544
23575
|
init_esm();
|
|
@@ -28943,7 +28974,7 @@ var package_default;
|
|
|
28943
28974
|
var init_package = __esm(() => {
|
|
28944
28975
|
package_default = {
|
|
28945
28976
|
name: "allagents",
|
|
28946
|
-
version: "0.32.0-next.
|
|
28977
|
+
version: "0.32.0-next.2",
|
|
28947
28978
|
description: "CLI tool for managing multi-repo AI agent workspaces with plugin synchronization",
|
|
28948
28979
|
type: "module",
|
|
28949
28980
|
bin: {
|
|
@@ -29740,7 +29771,7 @@ async function runBrowseMarketplaces(context, cache2) {
|
|
|
29740
29771
|
const options = [
|
|
29741
29772
|
{ label: "+ Add marketplace", value: "__add__" },
|
|
29742
29773
|
...marketplaces.map((m) => ({
|
|
29743
|
-
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})`,
|
|
29744
29775
|
value: m.name
|
|
29745
29776
|
})),
|
|
29746
29777
|
{ label: "Back", value: "__back__" }
|
|
@@ -31897,10 +31928,20 @@ var marketplaceListCmd = import_cmd_ts4.command({
|
|
|
31897
31928
|
try {
|
|
31898
31929
|
const marketplaces = await listMarketplaces();
|
|
31899
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
|
+
}));
|
|
31900
31941
|
jsonOutput({
|
|
31901
31942
|
success: true,
|
|
31902
31943
|
command: "plugin marketplace list",
|
|
31903
|
-
data: { marketplaces }
|
|
31944
|
+
data: { marketplaces: enriched }
|
|
31904
31945
|
});
|
|
31905
31946
|
return;
|
|
31906
31947
|
}
|
|
@@ -31918,12 +31959,24 @@ var marketplaceListCmd = import_cmd_ts4.command({
|
|
|
31918
31959
|
console.log(`Registered marketplaces:
|
|
31919
31960
|
`);
|
|
31920
31961
|
for (const mp of marketplaces) {
|
|
31921
|
-
|
|
31922
|
-
|
|
31923
|
-
|
|
31924
|
-
|
|
31925
|
-
|
|
31926
|
-
|
|
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
|
+
}
|
|
31927
31980
|
console.log();
|
|
31928
31981
|
}
|
|
31929
31982
|
console.log(`Total: ${marketplaces.length} marketplace(s)`);
|