allagents 1.7.0 → 1.7.2-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 +327 -119
- package/package.json +3 -1
package/dist/index.js
CHANGED
|
@@ -6,39 +6,60 @@ var __defProp = Object.defineProperty;
|
|
|
6
6
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
7
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
8
8
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
+
function __accessProp(key) {
|
|
10
|
+
return this[key];
|
|
11
|
+
}
|
|
12
|
+
var __toESMCache_node;
|
|
13
|
+
var __toESMCache_esm;
|
|
9
14
|
var __toESM = (mod, isNodeMode, target) => {
|
|
15
|
+
var canCache = mod != null && typeof mod === "object";
|
|
16
|
+
if (canCache) {
|
|
17
|
+
var cache = isNodeMode ? __toESMCache_node ??= new WeakMap : __toESMCache_esm ??= new WeakMap;
|
|
18
|
+
var cached = cache.get(mod);
|
|
19
|
+
if (cached)
|
|
20
|
+
return cached;
|
|
21
|
+
}
|
|
10
22
|
target = mod != null ? __create(__getProtoOf(mod)) : {};
|
|
11
23
|
const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
|
|
12
24
|
for (let key of __getOwnPropNames(mod))
|
|
13
25
|
if (!__hasOwnProp.call(to, key))
|
|
14
26
|
__defProp(to, key, {
|
|
15
|
-
get: (
|
|
27
|
+
get: __accessProp.bind(mod, key),
|
|
16
28
|
enumerable: true
|
|
17
29
|
});
|
|
30
|
+
if (canCache)
|
|
31
|
+
cache.set(mod, to);
|
|
18
32
|
return to;
|
|
19
33
|
};
|
|
20
|
-
var __moduleCache = /* @__PURE__ */ new WeakMap;
|
|
21
34
|
var __toCommonJS = (from) => {
|
|
22
|
-
var entry = __moduleCache.get(from), desc;
|
|
35
|
+
var entry = (__moduleCache ??= new WeakMap).get(from), desc;
|
|
23
36
|
if (entry)
|
|
24
37
|
return entry;
|
|
25
38
|
entry = __defProp({}, "__esModule", { value: true });
|
|
26
|
-
if (from && typeof from === "object" || typeof from === "function")
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
39
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
40
|
+
for (var key of __getOwnPropNames(from))
|
|
41
|
+
if (!__hasOwnProp.call(entry, key))
|
|
42
|
+
__defProp(entry, key, {
|
|
43
|
+
get: __accessProp.bind(from, key),
|
|
44
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
45
|
+
});
|
|
46
|
+
}
|
|
31
47
|
__moduleCache.set(from, entry);
|
|
32
48
|
return entry;
|
|
33
49
|
};
|
|
50
|
+
var __moduleCache;
|
|
34
51
|
var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
52
|
+
var __returnValue = (v) => v;
|
|
53
|
+
function __exportSetter(name, newValue) {
|
|
54
|
+
this[name] = __returnValue.bind(null, newValue);
|
|
55
|
+
}
|
|
35
56
|
var __export = (target, all) => {
|
|
36
57
|
for (var name in all)
|
|
37
58
|
__defProp(target, name, {
|
|
38
59
|
get: all[name],
|
|
39
60
|
enumerable: true,
|
|
40
61
|
configurable: true,
|
|
41
|
-
set: (
|
|
62
|
+
set: __exportSetter.bind(all, name)
|
|
42
63
|
});
|
|
43
64
|
};
|
|
44
65
|
var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
|
@@ -11490,16 +11511,22 @@ function resolveInstallMode(pluginEntry, clientEntry) {
|
|
|
11490
11511
|
return pluginMode;
|
|
11491
11512
|
return clientEntry.install;
|
|
11492
11513
|
}
|
|
11493
|
-
var RepositorySchema, WorkspaceFileSchema, WorkspaceSchema, PluginSourceSchema, ClientTypeSchema, InstallModeSchema, ClientEntrySchema, PluginSkillsConfigSchema, PluginEntrySchema, VscodeConfigSchema, SyncModeSchema, McpProxyServerSchema, McpProxyConfigSchema, WorkspaceConfigSchema;
|
|
11514
|
+
var ManagedModeSchema, RepositorySchema, WorkspaceFileSchema, WorkspaceSchema, PluginSourceSchema, ClientTypeSchema, InstallModeSchema, ClientEntrySchema, PluginSkillsConfigSchema, PluginEntrySchema, VscodeConfigSchema, SyncModeSchema, McpProxyServerSchema, McpProxyConfigSchema, WorkspaceConfigSchema;
|
|
11494
11515
|
var init_workspace_config = __esm(() => {
|
|
11495
11516
|
init_zod();
|
|
11517
|
+
ManagedModeSchema = exports_external.union([
|
|
11518
|
+
exports_external.boolean(),
|
|
11519
|
+
exports_external.enum(["clone", "sync"])
|
|
11520
|
+
]);
|
|
11496
11521
|
RepositorySchema = exports_external.object({
|
|
11497
11522
|
path: exports_external.string(),
|
|
11498
11523
|
name: exports_external.string().optional(),
|
|
11499
11524
|
source: exports_external.string().optional(),
|
|
11500
11525
|
repo: exports_external.string().optional(),
|
|
11501
11526
|
description: exports_external.string().optional(),
|
|
11502
|
-
skills: exports_external.union([exports_external.boolean(), exports_external.array(exports_external.string())]).optional()
|
|
11527
|
+
skills: exports_external.union([exports_external.boolean(), exports_external.array(exports_external.string())]).optional(),
|
|
11528
|
+
managed: ManagedModeSchema.optional(),
|
|
11529
|
+
branch: exports_external.string().optional()
|
|
11503
11530
|
});
|
|
11504
11531
|
WorkspaceFileSchema = exports_external.union([
|
|
11505
11532
|
exports_external.string(),
|
|
@@ -28441,7 +28468,8 @@ async function discoverWorkspaceSkills(workspacePath, repositories, clientNames)
|
|
|
28441
28468
|
const discoverOpts = Array.isArray(repo.skills) ? { skillPaths: repo.skills } : { clients: clientNames };
|
|
28442
28469
|
const repoSkills = await discoverRepoSkills(repoAbsPath, discoverOpts);
|
|
28443
28470
|
for (const skill of repoSkills) {
|
|
28444
|
-
const
|
|
28471
|
+
const base = repo.path.replace(/[/\\]+$/, "");
|
|
28472
|
+
const location = `${base}/${skill.relativePath}`.replace(/\\/g, "/");
|
|
28445
28473
|
const candidate = {
|
|
28446
28474
|
repoPath: repo.path,
|
|
28447
28475
|
name: skill.name,
|
|
@@ -29955,7 +29983,7 @@ class ClaudeNativeClient {
|
|
|
29955
29983
|
for (const plugin of plugins) {
|
|
29956
29984
|
const spec = this.toPluginSpec(plugin);
|
|
29957
29985
|
if (spec) {
|
|
29958
|
-
result.pluginsInstalled.push(spec);
|
|
29986
|
+
result.pluginsInstalled.push({ plugin: spec });
|
|
29959
29987
|
} else {
|
|
29960
29988
|
result.skipped.push(plugin);
|
|
29961
29989
|
}
|
|
@@ -29982,7 +30010,7 @@ class ClaudeNativeClient {
|
|
|
29982
30010
|
}
|
|
29983
30011
|
const installResult = await this.installPlugin(spec, scope, options2);
|
|
29984
30012
|
if (installResult.success) {
|
|
29985
|
-
result.pluginsInstalled.push(spec);
|
|
30013
|
+
result.pluginsInstalled.push({ plugin: spec });
|
|
29986
30014
|
} else {
|
|
29987
30015
|
result.pluginsFailed.push({
|
|
29988
30016
|
plugin: spec,
|
|
@@ -30050,7 +30078,7 @@ class CopilotNativeClient {
|
|
|
30050
30078
|
for (const plugin of plugins) {
|
|
30051
30079
|
const spec = this.toPluginSpec(plugin);
|
|
30052
30080
|
if (spec) {
|
|
30053
|
-
result.pluginsInstalled.push(spec);
|
|
30081
|
+
result.pluginsInstalled.push({ plugin: spec });
|
|
30054
30082
|
} else {
|
|
30055
30083
|
result.skipped.push(plugin);
|
|
30056
30084
|
}
|
|
@@ -30077,7 +30105,7 @@ class CopilotNativeClient {
|
|
|
30077
30105
|
}
|
|
30078
30106
|
const installResult = await this.installPlugin(spec, scope, options2);
|
|
30079
30107
|
if (installResult.success) {
|
|
30080
|
-
result.pluginsInstalled.push(spec);
|
|
30108
|
+
result.pluginsInstalled.push({ plugin: spec });
|
|
30081
30109
|
} else {
|
|
30082
30110
|
const rawError = installResult.error ?? "Unknown error";
|
|
30083
30111
|
const error = rawError.includes("Plugin path escapes marketplace directory") ? `${rawError} (Copilot rejected a plugin path from this marketplace manifest. Use file install for copilot to avoid native install for this plugin.)` : rawError;
|
|
@@ -30192,10 +30220,145 @@ function padStart2(str3, len) {
|
|
|
30192
30220
|
return str3.length >= len ? str3 : " ".repeat(len - str3.length) + str3;
|
|
30193
30221
|
}
|
|
30194
30222
|
|
|
30223
|
+
// src/core/managed-repos.ts
|
|
30224
|
+
import { existsSync as existsSync17 } from "node:fs";
|
|
30225
|
+
import { mkdir as mkdir8 } from "node:fs/promises";
|
|
30226
|
+
import { dirname as dirname11, resolve as resolve10 } from "node:path";
|
|
30227
|
+
function expandHome(p) {
|
|
30228
|
+
if (p.startsWith("~/") || p === "~") {
|
|
30229
|
+
return p.replace("~", getHomeDir());
|
|
30230
|
+
}
|
|
30231
|
+
return p;
|
|
30232
|
+
}
|
|
30233
|
+
function shouldClone(managed) {
|
|
30234
|
+
if (managed === undefined || managed === false)
|
|
30235
|
+
return false;
|
|
30236
|
+
return true;
|
|
30237
|
+
}
|
|
30238
|
+
function shouldPull(managed) {
|
|
30239
|
+
if (managed === true || managed === "sync")
|
|
30240
|
+
return true;
|
|
30241
|
+
return false;
|
|
30242
|
+
}
|
|
30243
|
+
function isValidRepo(repo) {
|
|
30244
|
+
return /^[\w.\-/]+$/.test(repo);
|
|
30245
|
+
}
|
|
30246
|
+
function buildCloneUrl(source, repo) {
|
|
30247
|
+
if (!isValidRepo(repo)) {
|
|
30248
|
+
throw new Error(`Invalid repo identifier: ${repo}`);
|
|
30249
|
+
}
|
|
30250
|
+
switch (source) {
|
|
30251
|
+
case "github":
|
|
30252
|
+
return `https://github.com/${repo}.git`;
|
|
30253
|
+
case "gitlab":
|
|
30254
|
+
return `https://gitlab.com/${repo}.git`;
|
|
30255
|
+
case "bitbucket":
|
|
30256
|
+
return `https://bitbucket.org/${repo}.git`;
|
|
30257
|
+
case "azure-devops": {
|
|
30258
|
+
const parts = repo.split("/");
|
|
30259
|
+
if (parts.length === 3) {
|
|
30260
|
+
return `https://dev.azure.com/${parts[0]}/${parts[1]}/_git/${parts[2]}`;
|
|
30261
|
+
}
|
|
30262
|
+
return `https://dev.azure.com/${repo}`;
|
|
30263
|
+
}
|
|
30264
|
+
default:
|
|
30265
|
+
return `https://${source}/${repo}.git`;
|
|
30266
|
+
}
|
|
30267
|
+
}
|
|
30268
|
+
async function cloneRepo(url, dest, branch) {
|
|
30269
|
+
await mkdir8(dirname11(dest), { recursive: true });
|
|
30270
|
+
const git = esm_default({ timeout: { block: CLONE_TIMEOUT_MS2 } });
|
|
30271
|
+
const cloneOptions = branch ? ["--branch", branch] : [];
|
|
30272
|
+
await git.clone(url, dest, cloneOptions);
|
|
30273
|
+
}
|
|
30274
|
+
async function pullRepo(repoPath, branch) {
|
|
30275
|
+
const git = esm_default(repoPath, { timeout: { block: CLONE_TIMEOUT_MS2 } });
|
|
30276
|
+
const status = await git.status();
|
|
30277
|
+
if (!status.isClean()) {
|
|
30278
|
+
return "uncommitted changes";
|
|
30279
|
+
}
|
|
30280
|
+
if (branch) {
|
|
30281
|
+
const currentBranch = status.current;
|
|
30282
|
+
if (currentBranch !== branch) {
|
|
30283
|
+
return `on branch '${currentBranch}', expected '${branch}'`;
|
|
30284
|
+
}
|
|
30285
|
+
}
|
|
30286
|
+
await git.pull();
|
|
30287
|
+
return;
|
|
30288
|
+
}
|
|
30289
|
+
async function processManagedRepos(repositories, workspacePath, options2 = {}) {
|
|
30290
|
+
if (options2.skipManaged || options2.offline || options2.dryRun)
|
|
30291
|
+
return [];
|
|
30292
|
+
const managed = repositories.filter((r) => r.managed);
|
|
30293
|
+
if (managed.length === 0)
|
|
30294
|
+
return [];
|
|
30295
|
+
const results = [];
|
|
30296
|
+
for (const repo of managed) {
|
|
30297
|
+
if (!repo.source || !repo.repo) {
|
|
30298
|
+
results.push({
|
|
30299
|
+
path: repo.path,
|
|
30300
|
+
repo: repo.repo ?? repo.path,
|
|
30301
|
+
action: "skipped",
|
|
30302
|
+
error: "managed requires both source and repo fields"
|
|
30303
|
+
});
|
|
30304
|
+
continue;
|
|
30305
|
+
}
|
|
30306
|
+
const expandedPath = expandHome(repo.path);
|
|
30307
|
+
const absolutePath = resolve10(workspacePath, expandedPath);
|
|
30308
|
+
if (!existsSync17(absolutePath)) {
|
|
30309
|
+
if (!shouldClone(repo.managed)) {
|
|
30310
|
+
results.push({ path: repo.path, repo: repo.repo, action: "skipped" });
|
|
30311
|
+
continue;
|
|
30312
|
+
}
|
|
30313
|
+
try {
|
|
30314
|
+
const url = buildCloneUrl(repo.source, repo.repo);
|
|
30315
|
+
await cloneRepo(url, absolutePath, repo.branch);
|
|
30316
|
+
results.push({ path: repo.path, repo: repo.repo, action: "cloned" });
|
|
30317
|
+
} catch (error) {
|
|
30318
|
+
results.push({
|
|
30319
|
+
path: repo.path,
|
|
30320
|
+
repo: repo.repo,
|
|
30321
|
+
action: "skipped",
|
|
30322
|
+
error: `clone failed: ${error instanceof Error ? error.message : String(error)}`
|
|
30323
|
+
});
|
|
30324
|
+
}
|
|
30325
|
+
} else if (shouldPull(repo.managed)) {
|
|
30326
|
+
try {
|
|
30327
|
+
const skipReason = await pullRepo(absolutePath, repo.branch);
|
|
30328
|
+
if (skipReason) {
|
|
30329
|
+
results.push({
|
|
30330
|
+
path: repo.path,
|
|
30331
|
+
repo: repo.repo,
|
|
30332
|
+
action: "skipped",
|
|
30333
|
+
error: `pull skipped: ${skipReason}`
|
|
30334
|
+
});
|
|
30335
|
+
} else {
|
|
30336
|
+
results.push({ path: repo.path, repo: repo.repo, action: "pulled" });
|
|
30337
|
+
}
|
|
30338
|
+
} catch (error) {
|
|
30339
|
+
results.push({
|
|
30340
|
+
path: repo.path,
|
|
30341
|
+
repo: repo.repo,
|
|
30342
|
+
action: "skipped",
|
|
30343
|
+
error: `pull failed: ${error instanceof Error ? error.message : String(error)}`
|
|
30344
|
+
});
|
|
30345
|
+
}
|
|
30346
|
+
} else {
|
|
30347
|
+
results.push({ path: repo.path, repo: repo.repo, action: "skipped" });
|
|
30348
|
+
}
|
|
30349
|
+
}
|
|
30350
|
+
return results;
|
|
30351
|
+
}
|
|
30352
|
+
var CLONE_TIMEOUT_MS2 = 120000;
|
|
30353
|
+
var init_managed_repos = __esm(() => {
|
|
30354
|
+
init_esm();
|
|
30355
|
+
init_constants();
|
|
30356
|
+
});
|
|
30357
|
+
|
|
30195
30358
|
// src/core/sync.ts
|
|
30196
|
-
import { existsSync as
|
|
30359
|
+
import { existsSync as existsSync18, readFileSync as readFileSync4, writeFileSync as writeFileSync6, lstatSync as lstatSync2 } from "node:fs";
|
|
30197
30360
|
import { rm as rm4, unlink as unlink2, rmdir, copyFile } from "node:fs/promises";
|
|
30198
|
-
import { join as join19, resolve as
|
|
30361
|
+
import { join as join19, resolve as resolve11, dirname as dirname12, relative as relative5 } from "node:path";
|
|
30199
30362
|
function deduplicateClientsByPath(clients, clientMappings = CLIENT_MAPPINGS) {
|
|
30200
30363
|
const pathToClients = new Map;
|
|
30201
30364
|
for (const client of clients) {
|
|
@@ -30241,6 +30404,10 @@ function mergeSyncResults(a, b) {
|
|
|
30241
30404
|
...deletedArtifacts.length > 0 && { deletedArtifacts },
|
|
30242
30405
|
...mcpResults && { mcpResults },
|
|
30243
30406
|
...nativeResult && { nativeResult },
|
|
30407
|
+
...(() => {
|
|
30408
|
+
const managedRepoResults = [...a.managedRepoResults || [], ...b.managedRepoResults || []];
|
|
30409
|
+
return managedRepoResults.length > 0 ? { managedRepoResults } : {};
|
|
30410
|
+
})(),
|
|
30244
30411
|
...mergeTiming(a.timing, b.timing)
|
|
30245
30412
|
};
|
|
30246
30413
|
}
|
|
@@ -30291,6 +30458,7 @@ function collectNativePluginSources(validPlugins) {
|
|
|
30291
30458
|
function attachNativeClientContext(result, clientType) {
|
|
30292
30459
|
return {
|
|
30293
30460
|
...result,
|
|
30461
|
+
pluginsInstalled: result.pluginsInstalled.map((installed) => ({ ...installed, client: clientType })),
|
|
30294
30462
|
pluginsFailed: result.pluginsFailed.map((failure) => ({ ...failure, client: clientType }))
|
|
30295
30463
|
};
|
|
30296
30464
|
}
|
|
@@ -30336,16 +30504,16 @@ async function selectivePurgeWorkspace(workspacePath, state, clients) {
|
|
|
30336
30504
|
return result;
|
|
30337
30505
|
}
|
|
30338
30506
|
async function cleanupEmptyParents(workspacePath, filePath) {
|
|
30339
|
-
let parentPath =
|
|
30507
|
+
let parentPath = dirname12(filePath);
|
|
30340
30508
|
while (parentPath && parentPath !== "." && parentPath !== "/") {
|
|
30341
30509
|
const fullParentPath = join19(workspacePath, parentPath);
|
|
30342
|
-
if (!
|
|
30343
|
-
parentPath =
|
|
30510
|
+
if (!existsSync18(fullParentPath)) {
|
|
30511
|
+
parentPath = dirname12(parentPath);
|
|
30344
30512
|
continue;
|
|
30345
30513
|
}
|
|
30346
30514
|
try {
|
|
30347
30515
|
await rmdir(fullParentPath);
|
|
30348
|
-
parentPath =
|
|
30516
|
+
parentPath = dirname12(parentPath);
|
|
30349
30517
|
} catch {
|
|
30350
30518
|
break;
|
|
30351
30519
|
}
|
|
@@ -30425,7 +30593,7 @@ function validateFileSources(files, defaultSourcePath, githubCache) {
|
|
|
30425
30593
|
continue;
|
|
30426
30594
|
}
|
|
30427
30595
|
const fullPath = join19(defaultSourcePath, file);
|
|
30428
|
-
if (!
|
|
30596
|
+
if (!existsSync18(fullPath)) {
|
|
30429
30597
|
errors2.push(`File source not found: ${fullPath}`);
|
|
30430
30598
|
}
|
|
30431
30599
|
continue;
|
|
@@ -30444,7 +30612,7 @@ function validateFileSources(files, defaultSourcePath, githubCache) {
|
|
|
30444
30612
|
continue;
|
|
30445
30613
|
}
|
|
30446
30614
|
const fullPath = join19(cachePath, parsed.filePath);
|
|
30447
|
-
if (!
|
|
30615
|
+
if (!existsSync18(fullPath)) {
|
|
30448
30616
|
errors2.push(`Path not found in repository: ${cacheKey}/${parsed.filePath}`);
|
|
30449
30617
|
}
|
|
30450
30618
|
} else {
|
|
@@ -30452,13 +30620,13 @@ function validateFileSources(files, defaultSourcePath, githubCache) {
|
|
|
30452
30620
|
if (file.source.startsWith("/")) {
|
|
30453
30621
|
fullPath = file.source;
|
|
30454
30622
|
} else if (file.source.startsWith("../")) {
|
|
30455
|
-
fullPath =
|
|
30623
|
+
fullPath = resolve11(file.source);
|
|
30456
30624
|
} else if (defaultSourcePath) {
|
|
30457
30625
|
fullPath = join19(defaultSourcePath, file.source);
|
|
30458
30626
|
} else {
|
|
30459
|
-
fullPath =
|
|
30627
|
+
fullPath = resolve11(file.source);
|
|
30460
30628
|
}
|
|
30461
|
-
if (!
|
|
30629
|
+
if (!existsSync18(fullPath)) {
|
|
30462
30630
|
errors2.push(`File source not found: ${fullPath}`);
|
|
30463
30631
|
}
|
|
30464
30632
|
}
|
|
@@ -30468,7 +30636,7 @@ function validateFileSources(files, defaultSourcePath, githubCache) {
|
|
|
30468
30636
|
continue;
|
|
30469
30637
|
}
|
|
30470
30638
|
const fullPath = join19(defaultSourcePath, file.dest ?? "");
|
|
30471
|
-
if (!
|
|
30639
|
+
if (!existsSync18(fullPath)) {
|
|
30472
30640
|
errors2.push(`File source not found: ${fullPath}`);
|
|
30473
30641
|
}
|
|
30474
30642
|
}
|
|
@@ -30623,8 +30791,8 @@ async function validatePlugin(pluginSource, workspacePath, offline) {
|
|
|
30623
30791
|
nativeClients: []
|
|
30624
30792
|
};
|
|
30625
30793
|
}
|
|
30626
|
-
const resolvedPath =
|
|
30627
|
-
if (!
|
|
30794
|
+
const resolvedPath = resolve11(workspacePath, pluginSource);
|
|
30795
|
+
if (!existsSync18(resolvedPath)) {
|
|
30628
30796
|
return {
|
|
30629
30797
|
plugin: pluginSource,
|
|
30630
30798
|
resolved: resolvedPath,
|
|
@@ -30788,7 +30956,7 @@ function generateVscodeWorkspaceFile(workspacePath, config) {
|
|
|
30788
30956
|
const configDir = join19(workspacePath, CONFIG_DIR);
|
|
30789
30957
|
const templatePath = join19(configDir, VSCODE_TEMPLATE_FILE);
|
|
30790
30958
|
let template;
|
|
30791
|
-
if (
|
|
30959
|
+
if (existsSync18(templatePath)) {
|
|
30792
30960
|
try {
|
|
30793
30961
|
template = import_json53.default.parse(readFileSync4(templatePath, "utf-8"));
|
|
30794
30962
|
} catch (error) {
|
|
@@ -30935,7 +31103,7 @@ async function syncVscodeWorkspaceFile(workspacePath, config, configPath, previo
|
|
|
30935
31103
|
let updatedConfig = config;
|
|
30936
31104
|
if (previousState?.vscodeWorkspaceHash && previousState?.vscodeWorkspaceRepos) {
|
|
30937
31105
|
const outputPath = getWorkspaceOutputPath(workspacePath, config.vscode);
|
|
30938
|
-
if (
|
|
31106
|
+
if (existsSync18(outputPath)) {
|
|
30939
31107
|
const existingContent = readFileSync4(outputPath, "utf-8");
|
|
30940
31108
|
const currentHash = computeWorkspaceHash(existingContent);
|
|
30941
31109
|
if (currentHash !== previousState.vscodeWorkspaceHash) {
|
|
@@ -30965,7 +31133,7 @@ async function syncVscodeWorkspaceFile(workspacePath, config, configPath, previo
|
|
|
30965
31133
|
}
|
|
30966
31134
|
const writtenContent = generateVscodeWorkspaceFile(workspacePath, updatedConfig);
|
|
30967
31135
|
const hash = computeWorkspaceHash(writtenContent);
|
|
30968
|
-
const repos = updatedConfig.repositories.map((r) =>
|
|
31136
|
+
const repos = updatedConfig.repositories.map((r) => resolve11(workspacePath, r.path).replace(/\\/g, "/"));
|
|
30969
31137
|
return { config: updatedConfig, hash, repos };
|
|
30970
31138
|
}
|
|
30971
31139
|
async function persistSyncState(workspacePath, pluginResults, workspaceFileResults, syncClients, nativePluginsByClient, nativeResult, extra) {
|
|
@@ -30977,7 +31145,7 @@ async function persistSyncState(workspacePath, pluginResults, workspaceFileResul
|
|
|
30977
31145
|
const resolvedMappings = resolveClientMappings(syncClients, mappings);
|
|
30978
31146
|
const syncedFiles = collectSyncedPaths(allCopyResults, workspacePath, syncClients, resolvedMappings);
|
|
30979
31147
|
const nativePluginsState = {};
|
|
30980
|
-
const installedSet = new Set(nativeResult?.pluginsInstalled ?? []);
|
|
31148
|
+
const installedSet = new Set((nativeResult?.pluginsInstalled ?? []).map((p) => p.plugin));
|
|
30981
31149
|
for (const [client, sources] of nativePluginsByClient) {
|
|
30982
31150
|
const nativeClient = getNativeClient(client);
|
|
30983
31151
|
if (!nativeClient)
|
|
@@ -30998,11 +31166,11 @@ async function persistSyncState(workspacePath, pluginResults, workspaceFileResul
|
|
|
30998
31166
|
}
|
|
30999
31167
|
async function syncWorkspace(workspacePath = process.cwd(), options2 = {}) {
|
|
31000
31168
|
await migrateWorkspaceSkillsV1toV2(workspacePath);
|
|
31001
|
-
const { offline = false, dryRun = false, workspaceSourceBase, skipAgentFiles = false } = options2;
|
|
31169
|
+
const { offline = false, dryRun = false, workspaceSourceBase, skipAgentFiles = false, skipManaged = false } = options2;
|
|
31002
31170
|
const sw = new Stopwatch;
|
|
31003
31171
|
const configDir = join19(workspacePath, CONFIG_DIR);
|
|
31004
31172
|
const configPath = join19(configDir, WORKSPACE_CONFIG_FILE);
|
|
31005
|
-
if (!
|
|
31173
|
+
if (!existsSync18(configPath)) {
|
|
31006
31174
|
return failedSyncResult(`${CONFIG_DIR}/${WORKSPACE_CONFIG_FILE} not found in ${workspacePath}
|
|
31007
31175
|
Run 'allagents workspace init <path>' to create a new workspace`);
|
|
31008
31176
|
}
|
|
@@ -31016,6 +31184,8 @@ async function syncWorkspace(workspacePath = process.cwd(), options2 = {}) {
|
|
|
31016
31184
|
for (const name of overrides) {
|
|
31017
31185
|
console.warn(`Warning: Workspace marketplace '${name}' overrides user marketplace of the same name.`);
|
|
31018
31186
|
}
|
|
31187
|
+
const managedRepoResults = await sw.measure("managed-repos", () => processManagedRepos(config.repositories ?? [], workspacePath, { offline, skipManaged, dryRun }));
|
|
31188
|
+
const managedWarnings = managedRepoResults.filter((r) => r.error).map((r) => `${r.repo}: ${r.error}`);
|
|
31019
31189
|
const hasRepositories = (config.repositories?.length ?? 0) > 0;
|
|
31020
31190
|
const { plans: pluginPlans, warnings: planWarnings } = buildPluginSyncPlans(config.plugins, config.clients, "project");
|
|
31021
31191
|
const workspaceClients = config.clients;
|
|
@@ -31053,6 +31223,7 @@ async function syncWorkspace(workspacePath = process.cwd(), options2 = {}) {
|
|
|
31053
31223
|
const failedValidations = validatedPlugins.filter((v) => !v.success);
|
|
31054
31224
|
const validPlugins = validatedPlugins.filter((v) => v.success);
|
|
31055
31225
|
const warnings = [
|
|
31226
|
+
...managedWarnings,
|
|
31056
31227
|
...planWarnings,
|
|
31057
31228
|
...workspaceSourceWarnings,
|
|
31058
31229
|
...failedValidations.map((v) => `${v.plugin}: ${v.error} (skipped)`)
|
|
@@ -31093,7 +31264,7 @@ ${failedValidations.map((v) => ` - ${v.plugin}: ${v.error}`).join(`
|
|
|
31093
31264
|
if (hasRepositories && sourcePath) {
|
|
31094
31265
|
for (const agentFile of AGENT_FILES) {
|
|
31095
31266
|
const agentPath = join19(sourcePath, agentFile);
|
|
31096
|
-
if (
|
|
31267
|
+
if (existsSync18(agentPath) && !filesToCopy.includes(agentFile)) {
|
|
31097
31268
|
filesToCopy.push(agentFile);
|
|
31098
31269
|
}
|
|
31099
31270
|
}
|
|
@@ -31130,8 +31301,8 @@ ${fileValidationErrors.map((e) => ` - ${e}`).join(`
|
|
|
31130
31301
|
if (hasRepositories && !dryRun && syncClients.includes("claude") && sourcePath) {
|
|
31131
31302
|
const claudePath = join19(workspacePath, "CLAUDE.md");
|
|
31132
31303
|
const agentsPath = join19(workspacePath, "AGENTS.md");
|
|
31133
|
-
const claudeExistsInSource =
|
|
31134
|
-
if (!claudeExistsInSource &&
|
|
31304
|
+
const claudeExistsInSource = existsSync18(join19(sourcePath, "CLAUDE.md"));
|
|
31305
|
+
if (!claudeExistsInSource && existsSync18(agentsPath) && !existsSync18(claudePath)) {
|
|
31135
31306
|
await copyFile(agentsPath, claudePath);
|
|
31136
31307
|
}
|
|
31137
31308
|
}
|
|
@@ -31275,6 +31446,7 @@ ${fileValidationErrors.map((e) => ` - ${e}`).join(`
|
|
|
31275
31446
|
...messages.length > 0 && { messages },
|
|
31276
31447
|
...Object.keys(mcpResults).length > 0 && { mcpResults },
|
|
31277
31448
|
...nativeResult && { nativeResult },
|
|
31449
|
+
...managedRepoResults.length > 0 && { managedRepoResults },
|
|
31278
31450
|
timing: sw.toJSON()
|
|
31279
31451
|
};
|
|
31280
31452
|
}
|
|
@@ -31304,7 +31476,7 @@ function readGitBranch(repoPath) {
|
|
|
31304
31476
|
async function syncUserWorkspace(options2 = {}) {
|
|
31305
31477
|
await migrateUserWorkspaceSkillsV1toV2();
|
|
31306
31478
|
const sw = new Stopwatch;
|
|
31307
|
-
const homeDir =
|
|
31479
|
+
const homeDir = resolve11(getHomeDir());
|
|
31308
31480
|
const config = await getUserWorkspaceConfig();
|
|
31309
31481
|
if (!config) {
|
|
31310
31482
|
return {
|
|
@@ -31495,15 +31667,16 @@ var init_sync = __esm(() => {
|
|
|
31495
31667
|
init_claude_mcp();
|
|
31496
31668
|
init_copilot_mcp();
|
|
31497
31669
|
init_native();
|
|
31670
|
+
init_managed_repos();
|
|
31498
31671
|
import_json53 = __toESM(require_lib(), 1);
|
|
31499
31672
|
});
|
|
31500
31673
|
|
|
31501
31674
|
// src/core/github-fetch.ts
|
|
31502
|
-
import { existsSync as
|
|
31675
|
+
import { existsSync as existsSync19, readFileSync as readFileSync5 } from "node:fs";
|
|
31503
31676
|
import { join as join20 } from "node:path";
|
|
31504
31677
|
function readFileFromClone(tempDir, filePath) {
|
|
31505
31678
|
const fullPath = join20(tempDir, filePath);
|
|
31506
|
-
if (
|
|
31679
|
+
if (existsSync19(fullPath)) {
|
|
31507
31680
|
return readFileSync5(fullPath, "utf-8");
|
|
31508
31681
|
}
|
|
31509
31682
|
return null;
|
|
@@ -31602,15 +31775,15 @@ var init_github_fetch = __esm(() => {
|
|
|
31602
31775
|
});
|
|
31603
31776
|
|
|
31604
31777
|
// src/core/workspace.ts
|
|
31605
|
-
import { cp as cp2, mkdir as
|
|
31606
|
-
import { existsSync as
|
|
31607
|
-
import { join as join21, resolve as
|
|
31778
|
+
import { cp as cp2, mkdir as mkdir9, readFile as readFile12, writeFile as writeFile8, copyFile as copyFile2, unlink as unlink3 } from "node:fs/promises";
|
|
31779
|
+
import { existsSync as existsSync20 } from "node:fs";
|
|
31780
|
+
import { join as join21, resolve as resolve12, dirname as dirname13, relative as relative6, sep as sep2, isAbsolute as isAbsolute4 } from "node:path";
|
|
31608
31781
|
import { fileURLToPath } from "node:url";
|
|
31609
31782
|
async function initWorkspace(targetPath = ".", options2 = {}) {
|
|
31610
|
-
const absoluteTarget =
|
|
31783
|
+
const absoluteTarget = resolve12(targetPath);
|
|
31611
31784
|
const configDir = join21(absoluteTarget, CONFIG_DIR);
|
|
31612
31785
|
const configPath = join21(configDir, WORKSPACE_CONFIG_FILE);
|
|
31613
|
-
if (
|
|
31786
|
+
if (existsSync20(configPath)) {
|
|
31614
31787
|
if (options2.force) {
|
|
31615
31788
|
await unlink3(configPath);
|
|
31616
31789
|
} else {
|
|
@@ -31619,7 +31792,7 @@ async function initWorkspace(targetPath = ".", options2 = {}) {
|
|
|
31619
31792
|
}
|
|
31620
31793
|
}
|
|
31621
31794
|
const currentFilePath = fileURLToPath(import.meta.url);
|
|
31622
|
-
const currentFileDir =
|
|
31795
|
+
const currentFileDir = dirname13(currentFilePath);
|
|
31623
31796
|
const isProduction = currentFilePath.includes(`${sep2}dist${sep2}`);
|
|
31624
31797
|
const defaultTemplatePath = isProduction ? join21(currentFileDir, "templates", "default") : join21(currentFileDir, "..", "templates", "default");
|
|
31625
31798
|
let githubTempDir;
|
|
@@ -31627,8 +31800,8 @@ async function initWorkspace(targetPath = ".", options2 = {}) {
|
|
|
31627
31800
|
let githubBasePath = "";
|
|
31628
31801
|
let githubBranch = "main";
|
|
31629
31802
|
try {
|
|
31630
|
-
await
|
|
31631
|
-
await
|
|
31803
|
+
await mkdir9(absoluteTarget, { recursive: true });
|
|
31804
|
+
await mkdir9(configDir, { recursive: true });
|
|
31632
31805
|
await ensureConfigGitignore(absoluteTarget);
|
|
31633
31806
|
let workspaceYamlContent;
|
|
31634
31807
|
let sourceDir;
|
|
@@ -31660,8 +31833,8 @@ async function initWorkspace(targetPath = ".", options2 = {}) {
|
|
|
31660
31833
|
}
|
|
31661
31834
|
console.log(`✓ Using workspace.yaml from: ${options2.from}`);
|
|
31662
31835
|
} else {
|
|
31663
|
-
const fromPath =
|
|
31664
|
-
if (!
|
|
31836
|
+
const fromPath = resolve12(options2.from);
|
|
31837
|
+
if (!existsSync20(fromPath)) {
|
|
31665
31838
|
throw new Error(`Template not found: ${fromPath}`);
|
|
31666
31839
|
}
|
|
31667
31840
|
const { stat: stat2 } = await import("node:fs/promises");
|
|
@@ -31670,10 +31843,10 @@ async function initWorkspace(targetPath = ".", options2 = {}) {
|
|
|
31670
31843
|
if (fromStat.isDirectory()) {
|
|
31671
31844
|
const nestedPath = join21(fromPath, CONFIG_DIR, WORKSPACE_CONFIG_FILE);
|
|
31672
31845
|
const rootPath = join21(fromPath, WORKSPACE_CONFIG_FILE);
|
|
31673
|
-
if (
|
|
31846
|
+
if (existsSync20(nestedPath)) {
|
|
31674
31847
|
sourceYamlPath = nestedPath;
|
|
31675
31848
|
sourceDir = fromPath;
|
|
31676
|
-
} else if (
|
|
31849
|
+
} else if (existsSync20(rootPath)) {
|
|
31677
31850
|
sourceYamlPath = rootPath;
|
|
31678
31851
|
sourceDir = fromPath;
|
|
31679
31852
|
} else {
|
|
@@ -31682,9 +31855,9 @@ async function initWorkspace(targetPath = ".", options2 = {}) {
|
|
|
31682
31855
|
}
|
|
31683
31856
|
} else {
|
|
31684
31857
|
sourceYamlPath = fromPath;
|
|
31685
|
-
const parentDir =
|
|
31858
|
+
const parentDir = dirname13(fromPath);
|
|
31686
31859
|
if (parentDir.endsWith(CONFIG_DIR)) {
|
|
31687
|
-
sourceDir =
|
|
31860
|
+
sourceDir = dirname13(parentDir);
|
|
31688
31861
|
} else {
|
|
31689
31862
|
sourceDir = parentDir;
|
|
31690
31863
|
}
|
|
@@ -31696,7 +31869,7 @@ async function initWorkspace(targetPath = ".", options2 = {}) {
|
|
|
31696
31869
|
if (workspace?.source) {
|
|
31697
31870
|
const source = workspace.source;
|
|
31698
31871
|
if (!isGitHubUrl(source) && !isAbsolute4(source)) {
|
|
31699
|
-
workspace.source =
|
|
31872
|
+
workspace.source = resolve12(sourceDir, source);
|
|
31700
31873
|
workspaceYamlContent = dump(parsed2, { lineWidth: -1 });
|
|
31701
31874
|
}
|
|
31702
31875
|
}
|
|
@@ -31705,7 +31878,7 @@ async function initWorkspace(targetPath = ".", options2 = {}) {
|
|
|
31705
31878
|
}
|
|
31706
31879
|
} else {
|
|
31707
31880
|
const defaultYamlPath = join21(defaultTemplatePath, CONFIG_DIR, WORKSPACE_CONFIG_FILE);
|
|
31708
|
-
if (!
|
|
31881
|
+
if (!existsSync20(defaultYamlPath)) {
|
|
31709
31882
|
throw new Error(`Default template not found at: ${defaultTemplatePath}`);
|
|
31710
31883
|
}
|
|
31711
31884
|
workspaceYamlContent = await readFile12(defaultYamlPath, "utf-8");
|
|
@@ -31722,7 +31895,7 @@ async function initWorkspace(targetPath = ".", options2 = {}) {
|
|
|
31722
31895
|
const VSCODE_TEMPLATE_FILE2 = "template.code-workspace";
|
|
31723
31896
|
if (clientNames.includes("vscode") && options2.from) {
|
|
31724
31897
|
const targetTemplatePath = join21(configDir, VSCODE_TEMPLATE_FILE2);
|
|
31725
|
-
if (!
|
|
31898
|
+
if (!existsSync20(targetTemplatePath)) {
|
|
31726
31899
|
if (isGitHubUrl(options2.from) && githubTempDir) {
|
|
31727
31900
|
if (parsedFromUrl) {
|
|
31728
31901
|
const templatePath = githubBasePath ? `${githubBasePath}/${CONFIG_DIR}/${VSCODE_TEMPLATE_FILE2}` : `${CONFIG_DIR}/${VSCODE_TEMPLATE_FILE2}`;
|
|
@@ -31733,7 +31906,7 @@ async function initWorkspace(targetPath = ".", options2 = {}) {
|
|
|
31733
31906
|
}
|
|
31734
31907
|
} else if (sourceDir) {
|
|
31735
31908
|
const sourceTemplatePath = join21(sourceDir, CONFIG_DIR, VSCODE_TEMPLATE_FILE2);
|
|
31736
|
-
if (
|
|
31909
|
+
if (existsSync20(sourceTemplatePath)) {
|
|
31737
31910
|
await copyFile2(sourceTemplatePath, targetTemplatePath);
|
|
31738
31911
|
}
|
|
31739
31912
|
}
|
|
@@ -31747,7 +31920,7 @@ async function initWorkspace(targetPath = ".", options2 = {}) {
|
|
|
31747
31920
|
if (parsedFromUrl) {
|
|
31748
31921
|
for (const agentFile of AGENT_FILES) {
|
|
31749
31922
|
const targetFilePath = join21(absoluteTarget, agentFile);
|
|
31750
|
-
if (
|
|
31923
|
+
if (existsSync20(targetFilePath)) {
|
|
31751
31924
|
copiedAgentFiles.push(agentFile);
|
|
31752
31925
|
continue;
|
|
31753
31926
|
}
|
|
@@ -31763,12 +31936,12 @@ async function initWorkspace(targetPath = ".", options2 = {}) {
|
|
|
31763
31936
|
const effectiveSourceDir = sourceDir ?? defaultTemplatePath;
|
|
31764
31937
|
for (const agentFile of AGENT_FILES) {
|
|
31765
31938
|
const targetFilePath = join21(absoluteTarget, agentFile);
|
|
31766
|
-
if (
|
|
31939
|
+
if (existsSync20(targetFilePath)) {
|
|
31767
31940
|
copiedAgentFiles.push(agentFile);
|
|
31768
31941
|
continue;
|
|
31769
31942
|
}
|
|
31770
31943
|
const sourcePath = join21(effectiveSourceDir, agentFile);
|
|
31771
|
-
if (
|
|
31944
|
+
if (existsSync20(sourcePath)) {
|
|
31772
31945
|
const content = await readFile12(sourcePath, "utf-8");
|
|
31773
31946
|
await writeFile8(targetFilePath, content, "utf-8");
|
|
31774
31947
|
copiedAgentFiles.push(agentFile);
|
|
@@ -31833,12 +32006,12 @@ async function seedCacheFromClone(tempDir, owner, repo, branch) {
|
|
|
31833
32006
|
join21(getMarketplacesDir(), repo)
|
|
31834
32007
|
];
|
|
31835
32008
|
for (const cachePath of cachePaths) {
|
|
31836
|
-
if (
|
|
32009
|
+
if (existsSync20(cachePath))
|
|
31837
32010
|
continue;
|
|
31838
32011
|
try {
|
|
31839
|
-
const parentDir =
|
|
31840
|
-
if (!
|
|
31841
|
-
await
|
|
32012
|
+
const parentDir = dirname13(cachePath);
|
|
32013
|
+
if (!existsSync20(parentDir)) {
|
|
32014
|
+
await mkdir9(parentDir, { recursive: true });
|
|
31842
32015
|
}
|
|
31843
32016
|
await cp2(tempDir, cachePath, { recursive: true });
|
|
31844
32017
|
} catch {}
|
|
@@ -31858,11 +32031,11 @@ var init_workspace = __esm(() => {
|
|
|
31858
32031
|
});
|
|
31859
32032
|
|
|
31860
32033
|
// src/core/status.ts
|
|
31861
|
-
import { existsSync as
|
|
32034
|
+
import { existsSync as existsSync21 } from "node:fs";
|
|
31862
32035
|
import { join as join22 } from "node:path";
|
|
31863
32036
|
async function getWorkspaceStatus(workspacePath = process.cwd()) {
|
|
31864
32037
|
const configPath = join22(workspacePath, CONFIG_DIR, WORKSPACE_CONFIG_FILE);
|
|
31865
|
-
if (!
|
|
32038
|
+
if (!existsSync21(configPath) || isUserConfigPath(workspacePath)) {
|
|
31866
32039
|
const userPlugins = await getUserPluginStatuses();
|
|
31867
32040
|
return {
|
|
31868
32041
|
success: true,
|
|
@@ -31904,7 +32077,7 @@ async function getWorkspaceStatus(workspacePath = process.cwd()) {
|
|
|
31904
32077
|
function getPluginStatus(parsed) {
|
|
31905
32078
|
if (parsed.type === "github") {
|
|
31906
32079
|
const cachePath = parsed.owner && parsed.repo ? getPluginCachePath(parsed.owner, parsed.repo) : "";
|
|
31907
|
-
const available2 = cachePath ?
|
|
32080
|
+
const available2 = cachePath ? existsSync21(cachePath) : false;
|
|
31908
32081
|
return {
|
|
31909
32082
|
source: parsed.original,
|
|
31910
32083
|
type: "github",
|
|
@@ -31914,7 +32087,7 @@ function getPluginStatus(parsed) {
|
|
|
31914
32087
|
...parsed.repo && { repo: parsed.repo }
|
|
31915
32088
|
};
|
|
31916
32089
|
}
|
|
31917
|
-
const available =
|
|
32090
|
+
const available = existsSync21(parsed.normalized);
|
|
31918
32091
|
return {
|
|
31919
32092
|
source: parsed.original,
|
|
31920
32093
|
type: "local",
|
|
@@ -32143,8 +32316,9 @@ function formatNativeResult(nativeResult) {
|
|
|
32143
32316
|
if (nativeResult.marketplacesAdded.length > 0) {
|
|
32144
32317
|
lines.push(`Marketplaces registered: ${nativeResult.marketplacesAdded.join(", ")}`);
|
|
32145
32318
|
}
|
|
32146
|
-
for (const plugin of nativeResult.pluginsInstalled) {
|
|
32147
|
-
|
|
32319
|
+
for (const { plugin, client } of nativeResult.pluginsInstalled) {
|
|
32320
|
+
const cliName = client ? `${client} CLI` : "native CLI";
|
|
32321
|
+
lines.push(` + ${plugin} (installed via ${cliName})`);
|
|
32148
32322
|
}
|
|
32149
32323
|
for (const { client, plugin, error } of nativeResult.pluginsFailed) {
|
|
32150
32324
|
const provider = client ? `[${client}] ` : "";
|
|
@@ -32241,14 +32415,38 @@ function buildSyncData(result) {
|
|
|
32241
32415
|
},
|
|
32242
32416
|
...result.nativeResult && {
|
|
32243
32417
|
nativePlugins: {
|
|
32244
|
-
installed: result.nativeResult.pluginsInstalled,
|
|
32418
|
+
installed: result.nativeResult.pluginsInstalled.map((p) => p.plugin),
|
|
32245
32419
|
failed: result.nativeResult.pluginsFailed,
|
|
32246
32420
|
skipped: result.nativeResult.skipped,
|
|
32247
32421
|
marketplacesAdded: result.nativeResult.marketplacesAdded
|
|
32248
32422
|
}
|
|
32423
|
+
},
|
|
32424
|
+
...result.managedRepoResults && result.managedRepoResults.length > 0 && {
|
|
32425
|
+
managedRepos: result.managedRepoResults.map((r) => ({
|
|
32426
|
+
repo: r.repo,
|
|
32427
|
+
path: r.path,
|
|
32428
|
+
action: r.action,
|
|
32429
|
+
...r.error && { error: r.error }
|
|
32430
|
+
}))
|
|
32249
32431
|
}
|
|
32250
32432
|
};
|
|
32251
32433
|
}
|
|
32434
|
+
function formatManagedRepoResults(results) {
|
|
32435
|
+
const actionResults = results.filter((r) => r.action !== "skipped" || r.error);
|
|
32436
|
+
if (actionResults.length === 0)
|
|
32437
|
+
return [];
|
|
32438
|
+
const lines = ["Repositories:"];
|
|
32439
|
+
for (const r of actionResults) {
|
|
32440
|
+
if (r.action === "cloned") {
|
|
32441
|
+
lines.push(` ✓ Cloned ${r.repo} → ${r.path}`);
|
|
32442
|
+
} else if (r.action === "pulled") {
|
|
32443
|
+
lines.push(` ✓ Pulled ${r.repo}`);
|
|
32444
|
+
} else if (r.error) {
|
|
32445
|
+
lines.push(` ✗ ${r.repo}: ${r.error}`);
|
|
32446
|
+
}
|
|
32447
|
+
}
|
|
32448
|
+
return lines;
|
|
32449
|
+
}
|
|
32252
32450
|
var cachedLookup = null;
|
|
32253
32451
|
var init_format_sync = __esm(() => {
|
|
32254
32452
|
init_client_mapping();
|
|
@@ -34051,9 +34249,9 @@ var init_prompt_clients = __esm(() => {
|
|
|
34051
34249
|
});
|
|
34052
34250
|
|
|
34053
34251
|
// src/core/skills.ts
|
|
34054
|
-
import { existsSync as
|
|
34252
|
+
import { existsSync as existsSync24 } from "node:fs";
|
|
34055
34253
|
import { readFile as readFile14, readdir as readdir5 } from "node:fs/promises";
|
|
34056
|
-
import { join as join25, basename as basename7, resolve as
|
|
34254
|
+
import { join as join25, basename as basename7, resolve as resolve14 } from "node:path";
|
|
34057
34255
|
async function resolvePluginPath(pluginSource, workspacePath) {
|
|
34058
34256
|
if (isPluginSpec(pluginSource)) {
|
|
34059
34257
|
const resolved2 = await resolvePluginSpecWithAutoRegister(pluginSource, {
|
|
@@ -34077,12 +34275,12 @@ async function resolvePluginPath(pluginSource, workspacePath) {
|
|
|
34077
34275
|
const path = parsed?.subpath ? join25(result.cachePath, parsed.subpath) : result.cachePath;
|
|
34078
34276
|
return { path };
|
|
34079
34277
|
}
|
|
34080
|
-
const resolved =
|
|
34081
|
-
return
|
|
34278
|
+
const resolved = resolve14(workspacePath, pluginSource);
|
|
34279
|
+
return existsSync24(resolved) ? { path: resolved } : null;
|
|
34082
34280
|
}
|
|
34083
34281
|
async function getAllSkillsFromPlugins(workspacePath = process.cwd()) {
|
|
34084
34282
|
const configPath = join25(workspacePath, CONFIG_DIR, WORKSPACE_CONFIG_FILE);
|
|
34085
|
-
if (!
|
|
34283
|
+
if (!existsSync24(configPath)) {
|
|
34086
34284
|
return [];
|
|
34087
34285
|
}
|
|
34088
34286
|
const content = await readFile14(configPath, "utf-8");
|
|
@@ -34102,7 +34300,7 @@ async function getAllSkillsFromPlugins(workspacePath = process.cwd()) {
|
|
|
34102
34300
|
const pluginSkillsConfig = typeof pluginEntry === "string" ? undefined : pluginEntry.skills;
|
|
34103
34301
|
const hasEnabledEntries = !pluginSkillsConfig && enabledSkills && [...enabledSkills].some((s) => s.startsWith(`${pluginName}`));
|
|
34104
34302
|
let skillEntries;
|
|
34105
|
-
if (
|
|
34303
|
+
if (existsSync24(skillsDir)) {
|
|
34106
34304
|
const entries = await readdir5(skillsDir, { withFileTypes: true });
|
|
34107
34305
|
skillEntries = entries.filter((e) => e.isDirectory()).map((e) => ({ name: e.name, skillPath: join25(skillsDir, e.name) }));
|
|
34108
34306
|
} else {
|
|
@@ -34112,7 +34310,7 @@ async function getAllSkillsFromPlugins(workspacePath = process.cwd()) {
|
|
|
34112
34310
|
if (!entry.isDirectory())
|
|
34113
34311
|
continue;
|
|
34114
34312
|
const skillMdPath = join25(pluginPath, entry.name, "SKILL.md");
|
|
34115
|
-
if (
|
|
34313
|
+
if (existsSync24(skillMdPath)) {
|
|
34116
34314
|
flatSkills.push({ name: entry.name, skillPath: join25(pluginPath, entry.name) });
|
|
34117
34315
|
}
|
|
34118
34316
|
}
|
|
@@ -34120,7 +34318,7 @@ async function getAllSkillsFromPlugins(workspacePath = process.cwd()) {
|
|
|
34120
34318
|
skillEntries = flatSkills;
|
|
34121
34319
|
} else {
|
|
34122
34320
|
const rootSkillMd = join25(pluginPath, "SKILL.md");
|
|
34123
|
-
if (
|
|
34321
|
+
if (existsSync24(rootSkillMd)) {
|
|
34124
34322
|
const skillContent = await readFile14(rootSkillMd, "utf-8");
|
|
34125
34323
|
const metadata = parseSkillMetadata(skillContent);
|
|
34126
34324
|
const skillName = metadata?.name ?? basename7(pluginPath);
|
|
@@ -34162,10 +34360,10 @@ async function findSkillByName(skillName, workspacePath = process.cwd()) {
|
|
|
34162
34360
|
return allSkills.filter((s) => s.name === skillName);
|
|
34163
34361
|
}
|
|
34164
34362
|
async function discoverSkillNames(pluginPath) {
|
|
34165
|
-
if (!
|
|
34363
|
+
if (!existsSync24(pluginPath))
|
|
34166
34364
|
return [];
|
|
34167
34365
|
const skillsDir = join25(pluginPath, "skills");
|
|
34168
|
-
if (
|
|
34366
|
+
if (existsSync24(skillsDir)) {
|
|
34169
34367
|
const entries2 = await readdir5(skillsDir, { withFileTypes: true });
|
|
34170
34368
|
return entries2.filter((e) => e.isDirectory()).map((e) => e.name);
|
|
34171
34369
|
}
|
|
@@ -34174,14 +34372,14 @@ async function discoverSkillNames(pluginPath) {
|
|
|
34174
34372
|
for (const entry of entries) {
|
|
34175
34373
|
if (!entry.isDirectory())
|
|
34176
34374
|
continue;
|
|
34177
|
-
if (
|
|
34375
|
+
if (existsSync24(join25(pluginPath, entry.name, "SKILL.md"))) {
|
|
34178
34376
|
flatSkills.push(entry.name);
|
|
34179
34377
|
}
|
|
34180
34378
|
}
|
|
34181
34379
|
if (flatSkills.length > 0)
|
|
34182
34380
|
return flatSkills;
|
|
34183
34381
|
const rootSkillMd = join25(pluginPath, "SKILL.md");
|
|
34184
|
-
if (
|
|
34382
|
+
if (existsSync24(rootSkillMd)) {
|
|
34185
34383
|
try {
|
|
34186
34384
|
const content = await readFile14(rootSkillMd, "utf-8");
|
|
34187
34385
|
const { parseSkillMetadata: parseSkillMetadata2 } = await Promise.resolve().then(() => (init_skill(), exports_skill));
|
|
@@ -34292,12 +34490,12 @@ var require_isexe = __commonJS((exports, module) => {
|
|
|
34292
34490
|
if (typeof Promise !== "function") {
|
|
34293
34491
|
throw new TypeError("callback not provided");
|
|
34294
34492
|
}
|
|
34295
|
-
return new Promise(function(
|
|
34493
|
+
return new Promise(function(resolve15, reject) {
|
|
34296
34494
|
isexe(path, options2 || {}, function(er, is) {
|
|
34297
34495
|
if (er) {
|
|
34298
34496
|
reject(er);
|
|
34299
34497
|
} else {
|
|
34300
|
-
|
|
34498
|
+
resolve15(is);
|
|
34301
34499
|
}
|
|
34302
34500
|
});
|
|
34303
34501
|
});
|
|
@@ -34359,27 +34557,27 @@ var require_which = __commonJS((exports, module) => {
|
|
|
34359
34557
|
opt = {};
|
|
34360
34558
|
const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt);
|
|
34361
34559
|
const found = [];
|
|
34362
|
-
const step = (i2) => new Promise((
|
|
34560
|
+
const step = (i2) => new Promise((resolve15, reject) => {
|
|
34363
34561
|
if (i2 === pathEnv.length)
|
|
34364
|
-
return opt.all && found.length ?
|
|
34562
|
+
return opt.all && found.length ? resolve15(found) : reject(getNotFoundError(cmd));
|
|
34365
34563
|
const ppRaw = pathEnv[i2];
|
|
34366
34564
|
const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
|
|
34367
34565
|
const pCmd = path.join(pathPart, cmd);
|
|
34368
34566
|
const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
|
|
34369
|
-
|
|
34567
|
+
resolve15(subStep(p, i2, 0));
|
|
34370
34568
|
});
|
|
34371
|
-
const subStep = (p, i2, ii) => new Promise((
|
|
34569
|
+
const subStep = (p, i2, ii) => new Promise((resolve15, reject) => {
|
|
34372
34570
|
if (ii === pathExt.length)
|
|
34373
|
-
return
|
|
34571
|
+
return resolve15(step(i2 + 1));
|
|
34374
34572
|
const ext = pathExt[ii];
|
|
34375
34573
|
isexe(p + ext, { pathExt: pathExtExe }, (er, is) => {
|
|
34376
34574
|
if (!er && is) {
|
|
34377
34575
|
if (opt.all)
|
|
34378
34576
|
found.push(p + ext);
|
|
34379
34577
|
else
|
|
34380
|
-
return
|
|
34578
|
+
return resolve15(p + ext);
|
|
34381
34579
|
}
|
|
34382
|
-
return
|
|
34580
|
+
return resolve15(subStep(p, i2, ii + 1));
|
|
34383
34581
|
});
|
|
34384
34582
|
});
|
|
34385
34583
|
return cb ? step(0).then((res) => cb(null, res), cb) : step(0);
|
|
@@ -34701,7 +34899,7 @@ var package_default;
|
|
|
34701
34899
|
var init_package = __esm(() => {
|
|
34702
34900
|
package_default = {
|
|
34703
34901
|
name: "allagents",
|
|
34704
|
-
version: "1.7.
|
|
34902
|
+
version: "1.7.2-next.1",
|
|
34705
34903
|
description: "CLI tool for managing multi-repo AI agent workspaces with plugin synchronization",
|
|
34706
34904
|
type: "module",
|
|
34707
34905
|
bin: {
|
|
@@ -34728,7 +34926,9 @@ var init_package = __esm(() => {
|
|
|
34728
34926
|
prepare: "bun run build && (test -d .git && bunx prek install -t pre-push || true)",
|
|
34729
34927
|
release: "bun run scripts/release.ts",
|
|
34730
34928
|
"release:next": "bun run scripts/release.ts next",
|
|
34929
|
+
"release:finalize": "bun run scripts/release.ts finalize",
|
|
34731
34930
|
prepublishOnly: `test "$ALLOW_PUBLISH" = '1' || (echo 'ERROR: Use bun run publish:next, then bun run promote:latest' && exit 1)`,
|
|
34931
|
+
publish: "bun run build && ALLOW_PUBLISH=1 npm publish",
|
|
34732
34932
|
"publish:next": "bun run build && ALLOW_PUBLISH=1 npm publish --tag next",
|
|
34733
34933
|
"promote:latest": "bun scripts/tag-channel.ts latest"
|
|
34734
34934
|
},
|
|
@@ -34911,7 +35111,7 @@ class TuiCache {
|
|
|
34911
35111
|
}
|
|
34912
35112
|
|
|
34913
35113
|
// src/cli/tui/context.ts
|
|
34914
|
-
import { existsSync as
|
|
35114
|
+
import { existsSync as existsSync27 } from "node:fs";
|
|
34915
35115
|
import { join as join29 } from "node:path";
|
|
34916
35116
|
async function getTuiContext(cwd = process.cwd(), cache2) {
|
|
34917
35117
|
const cachedContext = cache2?.getContext();
|
|
@@ -34919,7 +35119,7 @@ async function getTuiContext(cwd = process.cwd(), cache2) {
|
|
|
34919
35119
|
return cachedContext;
|
|
34920
35120
|
}
|
|
34921
35121
|
const configPath = join29(cwd, CONFIG_DIR, WORKSPACE_CONFIG_FILE);
|
|
34922
|
-
const hasWorkspace =
|
|
35122
|
+
const hasWorkspace = existsSync27(configPath) && !isUserConfigPath(cwd);
|
|
34923
35123
|
let projectPluginCount = 0;
|
|
34924
35124
|
if (hasWorkspace) {
|
|
34925
35125
|
try {
|
|
@@ -36335,8 +36535,8 @@ init_workspace();
|
|
|
36335
36535
|
init_sync();
|
|
36336
36536
|
init_status2();
|
|
36337
36537
|
var import_cmd_ts2 = __toESM(require_cjs(), 1);
|
|
36338
|
-
import { existsSync as
|
|
36339
|
-
import { join as join24, resolve as
|
|
36538
|
+
import { existsSync as existsSync23 } from "node:fs";
|
|
36539
|
+
import { join as join24, resolve as resolve13 } from "node:path";
|
|
36340
36540
|
|
|
36341
36541
|
// src/core/prune.ts
|
|
36342
36542
|
init_js_yaml();
|
|
@@ -36345,7 +36545,7 @@ init_marketplace();
|
|
|
36345
36545
|
init_user_workspace();
|
|
36346
36546
|
init_workspace_config();
|
|
36347
36547
|
import { readFile as readFile13, writeFile as writeFile9 } from "node:fs/promises";
|
|
36348
|
-
import { existsSync as
|
|
36548
|
+
import { existsSync as existsSync22 } from "node:fs";
|
|
36349
36549
|
import { join as join23 } from "node:path";
|
|
36350
36550
|
async function isOrphanedPlugin(pluginSpec) {
|
|
36351
36551
|
if (!isPluginSpec(pluginSpec))
|
|
@@ -36374,7 +36574,7 @@ async function prunePlugins(plugins) {
|
|
|
36374
36574
|
async function pruneOrphanedPlugins(workspacePath) {
|
|
36375
36575
|
let projectResult = { removed: [], kept: [], keptEntries: [] };
|
|
36376
36576
|
const projectConfigPath = join23(workspacePath, CONFIG_DIR, WORKSPACE_CONFIG_FILE);
|
|
36377
|
-
if (
|
|
36577
|
+
if (existsSync22(projectConfigPath) && !isUserConfigPath(workspacePath)) {
|
|
36378
36578
|
const content = await readFile13(projectConfigPath, "utf-8");
|
|
36379
36579
|
const config = load(content);
|
|
36380
36580
|
projectResult = await prunePlugins(config.plugins);
|
|
@@ -36657,9 +36857,10 @@ var syncCmd = import_cmd_ts2.command({
|
|
|
36657
36857
|
offline: import_cmd_ts2.flag({ long: "offline", description: "Use cached plugins without fetching latest from remote" }),
|
|
36658
36858
|
dryRun: import_cmd_ts2.flag({ long: "dry-run", short: "n", description: "Simulate sync without making changes" }),
|
|
36659
36859
|
force: import_cmd_ts2.flag({ long: "force", short: "f", description: "Overwrite existing MCP server entries that differ from plugin config" }),
|
|
36660
|
-
verbose: import_cmd_ts2.flag({ long: "verbose", short: "v", description: "Show informational sync messages" })
|
|
36860
|
+
verbose: import_cmd_ts2.flag({ long: "verbose", short: "v", description: "Show informational sync messages" }),
|
|
36861
|
+
noManaged: import_cmd_ts2.flag({ long: "no-managed", description: "Skip managed repository clone/pull operations" })
|
|
36661
36862
|
},
|
|
36662
|
-
handler: async ({ offline, dryRun, force, verbose }) => {
|
|
36863
|
+
handler: async ({ offline, dryRun, force, verbose, noManaged }) => {
|
|
36663
36864
|
try {
|
|
36664
36865
|
if (!isJsonMode() && dryRun) {
|
|
36665
36866
|
console.log(`Dry run mode - no changes will be made
|
|
@@ -36667,7 +36868,7 @@ var syncCmd = import_cmd_ts2.command({
|
|
|
36667
36868
|
}
|
|
36668
36869
|
const userConfigExists = !!await getUserWorkspaceConfig();
|
|
36669
36870
|
const projectConfigPath = join24(process.cwd(), ".allagents", "workspace.yaml");
|
|
36670
|
-
const projectConfigExists =
|
|
36871
|
+
const projectConfigExists = existsSync23(projectConfigPath);
|
|
36671
36872
|
if (!userConfigExists && !projectConfigExists) {
|
|
36672
36873
|
await ensureUserWorkspace();
|
|
36673
36874
|
if (isJsonMode()) {
|
|
@@ -36687,7 +36888,8 @@ var syncCmd = import_cmd_ts2.command({
|
|
|
36687
36888
|
if (projectConfigExists) {
|
|
36688
36889
|
const projectResult = await syncWorkspace(process.cwd(), {
|
|
36689
36890
|
offline,
|
|
36690
|
-
dryRun
|
|
36891
|
+
dryRun,
|
|
36892
|
+
skipManaged: noManaged
|
|
36691
36893
|
});
|
|
36692
36894
|
combined = combined ? mergeSyncResults(combined, projectResult) : projectResult;
|
|
36693
36895
|
}
|
|
@@ -36716,6 +36918,12 @@ var syncCmd = import_cmd_ts2.command({
|
|
|
36716
36918
|
}
|
|
36717
36919
|
console.log("");
|
|
36718
36920
|
}
|
|
36921
|
+
if (result.managedRepoResults && result.managedRepoResults.length > 0) {
|
|
36922
|
+
for (const line of formatManagedRepoResults(result.managedRepoResults)) {
|
|
36923
|
+
console.log(line);
|
|
36924
|
+
}
|
|
36925
|
+
console.log("");
|
|
36926
|
+
}
|
|
36719
36927
|
for (const line of formatSyncHeader(result)) {
|
|
36720
36928
|
console.log(line);
|
|
36721
36929
|
}
|
|
@@ -36955,7 +37163,7 @@ var repoAddCmd = import_cmd_ts2.command({
|
|
|
36955
37163
|
},
|
|
36956
37164
|
handler: async ({ path: repoPath, description }) => {
|
|
36957
37165
|
try {
|
|
36958
|
-
const resolvedPath =
|
|
37166
|
+
const resolvedPath = resolve13(process.cwd(), repoPath);
|
|
36959
37167
|
const remote = await detectRemote(resolvedPath);
|
|
36960
37168
|
const result = await addRepository(repoPath, {
|
|
36961
37169
|
source: remote?.source,
|
|
@@ -37335,7 +37543,7 @@ init_workspace_modify();
|
|
|
37335
37543
|
init_user_workspace();
|
|
37336
37544
|
init_skills();
|
|
37337
37545
|
var import_cmd_ts3 = __toESM(require_cjs(), 1);
|
|
37338
|
-
import { existsSync as
|
|
37546
|
+
import { existsSync as existsSync25 } from "node:fs";
|
|
37339
37547
|
import { readFile as readFile15 } from "node:fs/promises";
|
|
37340
37548
|
import { join as join26 } from "node:path";
|
|
37341
37549
|
|
|
@@ -37428,7 +37636,7 @@ init_skill();
|
|
|
37428
37636
|
init_marketplace();
|
|
37429
37637
|
init_marketplace_manifest_parser();
|
|
37430
37638
|
function hasProjectConfig(dir) {
|
|
37431
|
-
return
|
|
37639
|
+
return existsSync25(join26(dir, CONFIG_DIR, WORKSPACE_CONFIG_FILE));
|
|
37432
37640
|
}
|
|
37433
37641
|
function resolveScope(cwd) {
|
|
37434
37642
|
if (isUserConfigPath(cwd))
|
|
@@ -38017,7 +38225,7 @@ init_workspace_config();
|
|
|
38017
38225
|
init_constants();
|
|
38018
38226
|
init_js_yaml();
|
|
38019
38227
|
import { readFile as readFile16 } from "node:fs/promises";
|
|
38020
|
-
import { existsSync as
|
|
38228
|
+
import { existsSync as existsSync26 } from "node:fs";
|
|
38021
38229
|
import { join as join27 } from "node:path";
|
|
38022
38230
|
async function runSyncAndPrint(options2) {
|
|
38023
38231
|
if (!isJsonMode()) {
|
|
@@ -38263,7 +38471,7 @@ var marketplaceAddCmd = import_cmd_ts4.command({
|
|
|
38263
38471
|
process.exit(1);
|
|
38264
38472
|
}
|
|
38265
38473
|
if (effectiveScope === "project") {
|
|
38266
|
-
if (!
|
|
38474
|
+
if (!existsSync26(join27(process.cwd(), CONFIG_DIR, WORKSPACE_CONFIG_FILE))) {
|
|
38267
38475
|
const msg = 'No workspace found in current directory. Run "allagents workspace init" first.';
|
|
38268
38476
|
if (isJsonMode()) {
|
|
38269
38477
|
jsonOutput({ success: false, command: "plugin marketplace add", error: msg });
|
|
@@ -38570,7 +38778,7 @@ var pluginListCmd = import_cmd_ts4.command({
|
|
|
38570
38778
|
};
|
|
38571
38779
|
const pluginClients = new Map;
|
|
38572
38780
|
async function loadConfigClients(configPath, scope) {
|
|
38573
|
-
if (!
|
|
38781
|
+
if (!existsSync26(configPath))
|
|
38574
38782
|
return;
|
|
38575
38783
|
try {
|
|
38576
38784
|
const content = await readFile16(configPath, "utf-8");
|
|
@@ -38728,7 +38936,7 @@ var pluginInstallCmd = import_cmd_ts4.command({
|
|
|
38728
38936
|
const isUser = scope === "user" || !scope && isUserConfigPath(process.cwd());
|
|
38729
38937
|
if (isUser) {
|
|
38730
38938
|
const userConfigPath = getUserWorkspaceConfigPath();
|
|
38731
|
-
if (!
|
|
38939
|
+
if (!existsSync26(userConfigPath)) {
|
|
38732
38940
|
const { promptForClients: promptForClients2 } = await Promise.resolve().then(() => (init_prompt_clients(), exports_prompt_clients));
|
|
38733
38941
|
const clients = await promptForClients2();
|
|
38734
38942
|
if (clients === null) {
|
|
@@ -38741,7 +38949,7 @@ var pluginInstallCmd = import_cmd_ts4.command({
|
|
|
38741
38949
|
}
|
|
38742
38950
|
} else {
|
|
38743
38951
|
const configPath = join27(process.cwd(), CONFIG_DIR, WORKSPACE_CONFIG_FILE);
|
|
38744
|
-
if (!
|
|
38952
|
+
if (!existsSync26(configPath)) {
|
|
38745
38953
|
const { promptForClients: promptForClients2 } = await Promise.resolve().then(() => (init_prompt_clients(), exports_prompt_clients));
|
|
38746
38954
|
const clients = await promptForClients2();
|
|
38747
38955
|
if (clients === null) {
|
|
@@ -39018,13 +39226,13 @@ var pluginUpdateCmd = import_cmd_ts4.command({
|
|
|
39018
39226
|
}
|
|
39019
39227
|
}
|
|
39020
39228
|
if (updateProject && !isUserConfigPath(process.cwd())) {
|
|
39021
|
-
const { existsSync:
|
|
39229
|
+
const { existsSync: existsSync27 } = await import("node:fs");
|
|
39022
39230
|
const { readFile: readFile17 } = await import("node:fs/promises");
|
|
39023
39231
|
const { join: join28 } = await import("node:path");
|
|
39024
39232
|
const { load: load2 } = await Promise.resolve().then(() => (init_js_yaml(), exports_js_yaml));
|
|
39025
39233
|
const { CONFIG_DIR: CONFIG_DIR2, WORKSPACE_CONFIG_FILE: WORKSPACE_CONFIG_FILE2 } = await Promise.resolve().then(() => (init_constants(), exports_constants));
|
|
39026
39234
|
const configPath = join28(process.cwd(), CONFIG_DIR2, WORKSPACE_CONFIG_FILE2);
|
|
39027
|
-
if (
|
|
39235
|
+
if (existsSync27(configPath)) {
|
|
39028
39236
|
const content = await readFile17(configPath, "utf-8");
|
|
39029
39237
|
const config = load2(content);
|
|
39030
39238
|
for (const entry of config.plugins ?? []) {
|
|
@@ -40057,7 +40265,7 @@ var setupTimeout = (spawned, { timeout, killSignal = "SIGTERM" }, spawnedPromise
|
|
|
40057
40265
|
return spawnedPromise;
|
|
40058
40266
|
}
|
|
40059
40267
|
let timeoutId;
|
|
40060
|
-
const timeoutPromise = new Promise((
|
|
40268
|
+
const timeoutPromise = new Promise((resolve15, reject) => {
|
|
40061
40269
|
timeoutId = setTimeout(() => {
|
|
40062
40270
|
timeoutKill(spawned, killSignal, reject);
|
|
40063
40271
|
}, timeout);
|
|
@@ -40421,9 +40629,9 @@ var mergePromise = (spawned, promise) => {
|
|
|
40421
40629
|
Reflect.defineProperty(spawned, property, { ...descriptor, value });
|
|
40422
40630
|
}
|
|
40423
40631
|
};
|
|
40424
|
-
var getSpawnedPromise = (spawned) => new Promise((
|
|
40632
|
+
var getSpawnedPromise = (spawned) => new Promise((resolve15, reject) => {
|
|
40425
40633
|
spawned.on("exit", (exitCode, signal) => {
|
|
40426
|
-
|
|
40634
|
+
resolve15({ exitCode, signal });
|
|
40427
40635
|
});
|
|
40428
40636
|
spawned.on("error", (error) => {
|
|
40429
40637
|
reject(error);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "allagents",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.2-next.1",
|
|
4
4
|
"description": "CLI tool for managing multi-repo AI agent workspaces with plugin synchronization",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -27,7 +27,9 @@
|
|
|
27
27
|
"prepare": "bun run build && (test -d .git && bunx prek install -t pre-push || true)",
|
|
28
28
|
"release": "bun run scripts/release.ts",
|
|
29
29
|
"release:next": "bun run scripts/release.ts next",
|
|
30
|
+
"release:finalize": "bun run scripts/release.ts finalize",
|
|
30
31
|
"prepublishOnly": "test \"$ALLOW_PUBLISH\" = '1' || (echo 'ERROR: Use bun run publish:next, then bun run promote:latest' && exit 1)",
|
|
32
|
+
"publish": "bun run build && ALLOW_PUBLISH=1 npm publish",
|
|
31
33
|
"publish:next": "bun run build && ALLOW_PUBLISH=1 npm publish --tag next",
|
|
32
34
|
"promote:latest": "bun scripts/tag-channel.ts latest"
|
|
33
35
|
},
|