@swmansion/argent 0.35.1-next.4 → 0.35.1-next.5
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/cli-cmds.mjs +29 -15
- package/dist/client.js +10 -0
- package/dist/installer.mjs +362 -162
- package/dist/mcp-server.mjs +36 -8
- package/dist/tool-server.cjs +75966 -75876
- package/package.json +2 -2
package/dist/cli-cmds.mjs
CHANGED
|
@@ -11225,6 +11225,7 @@ function buildToolsServerEnv(paths, port, baseEnv = process.env, options = {}) {
|
|
|
11225
11225
|
env.ARGENT_IDLE_TIMEOUT_MINUTES = String(options.idleTimeoutMinutes);
|
|
11226
11226
|
}
|
|
11227
11227
|
env[AUTH_TOKEN_ENV] = options.token ?? "";
|
|
11228
|
+
env.ARGENT_SERVER_MANAGED = options.managed ?? "autospawn";
|
|
11228
11229
|
if (paths.installKind) env.ARGENT_INSTALL_KIND = paths.installKind;
|
|
11229
11230
|
if (paths.installProjectRoot) env.ARGENT_PROJECT_ROOT = paths.installProjectRoot;
|
|
11230
11231
|
return env;
|
|
@@ -12271,6 +12272,15 @@ var CONFIG_SCHEMA = [
|
|
|
12271
12272
|
// drained/reset, not just the file rewritten.
|
|
12272
12273
|
manageCommand: "argent telemetry"
|
|
12273
12274
|
},
|
|
12275
|
+
{
|
|
12276
|
+
key: "autoUpdate.enabled",
|
|
12277
|
+
description: "Automatically update the global Argent installation. Project-local installs require confirmation.",
|
|
12278
|
+
scopes: ["global"],
|
|
12279
|
+
parse: asBoolean,
|
|
12280
|
+
merge: "prioritize-local",
|
|
12281
|
+
default: true,
|
|
12282
|
+
example: "false"
|
|
12283
|
+
},
|
|
12274
12284
|
{
|
|
12275
12285
|
key: "lens.agent",
|
|
12276
12286
|
description: "Coding-agent id remembered by `argent lens` to skip the picker.",
|
|
@@ -38575,7 +38585,7 @@ function isCi(env = process.env) {
|
|
|
38575
38585
|
var SESSION_ID2 = randomUUID5();
|
|
38576
38586
|
function readCliVersion() {
|
|
38577
38587
|
if (true) {
|
|
38578
|
-
return "0.35.1-next.
|
|
38588
|
+
return "0.35.1-next.5";
|
|
38579
38589
|
}
|
|
38580
38590
|
return "0.0.0";
|
|
38581
38591
|
}
|
|
@@ -41738,7 +41748,8 @@ async function runDetached(paths, port, host, idleTimeoutMinutes, token) {
|
|
|
41738
41748
|
const { port: actualPort, pid } = await spawnToolsServer(paths, port, {
|
|
41739
41749
|
host,
|
|
41740
41750
|
idleTimeoutMinutes,
|
|
41741
|
-
token
|
|
41751
|
+
token,
|
|
41752
|
+
managed: "cli"
|
|
41742
41753
|
});
|
|
41743
41754
|
await writeToolsServerState({
|
|
41744
41755
|
port: actualPort,
|
|
@@ -41763,7 +41774,8 @@ async function runForeground(paths, port, host, idleTimeoutMinutes, token) {
|
|
|
41763
41774
|
const env = buildToolsServerEnv(paths, port, process.env, {
|
|
41764
41775
|
host,
|
|
41765
41776
|
idleTimeoutMinutes,
|
|
41766
|
-
token
|
|
41777
|
+
token,
|
|
41778
|
+
managed: "cli"
|
|
41767
41779
|
});
|
|
41768
41780
|
const cannotStart = (err) => {
|
|
41769
41781
|
const message = err instanceof Error ? err.message : String(err);
|
|
@@ -46263,12 +46275,12 @@ import * as fs33 from "node:fs";
|
|
|
46263
46275
|
import * as path45 from "node:path";
|
|
46264
46276
|
import { execFile } from "node:child_process";
|
|
46265
46277
|
import { promisify } from "node:util";
|
|
46266
|
-
import { homedir as
|
|
46278
|
+
import { homedir as homedir12 } from "node:os";
|
|
46267
46279
|
|
|
46268
46280
|
// ../argent-installer/src/mcp-configs.ts
|
|
46269
46281
|
import * as fs26 from "node:fs";
|
|
46270
46282
|
import * as path36 from "node:path";
|
|
46271
|
-
import { execFileSync as
|
|
46283
|
+
import { execFileSync as execFileSync8 } from "node:child_process";
|
|
46272
46284
|
import { homedir as homedir9 } from "node:os";
|
|
46273
46285
|
|
|
46274
46286
|
// ../argent-installer/src/constants.ts
|
|
@@ -46286,7 +46298,7 @@ import * as path35 from "node:path";
|
|
|
46286
46298
|
import * as dns from "node:dns";
|
|
46287
46299
|
import { createHash as createHash6 } from "node:crypto";
|
|
46288
46300
|
import * as os5 from "node:os";
|
|
46289
|
-
import { execFileSync as
|
|
46301
|
+
import { execFileSync as execFileSync7, execSync } from "node:child_process";
|
|
46290
46302
|
|
|
46291
46303
|
// ../../node_modules/smol-toml/dist/error.js
|
|
46292
46304
|
function getLineColFromPtr(string4, ptr) {
|
|
@@ -48618,6 +48630,7 @@ function resolvePackageRoot(dirname28) {
|
|
|
48618
48630
|
}
|
|
48619
48631
|
|
|
48620
48632
|
// ../argent-installer/src/package-manager.ts
|
|
48633
|
+
import { execFileSync as execFileSync6 } from "node:child_process";
|
|
48621
48634
|
import * as fs23 from "node:fs";
|
|
48622
48635
|
import * as os4 from "node:os";
|
|
48623
48636
|
import * as path33 from "node:path";
|
|
@@ -49200,7 +49213,7 @@ function escapeStringRegexp(string4) {
|
|
|
49200
49213
|
// ../argent-installer/src/mcp-configs.ts
|
|
49201
49214
|
var TOOL_SERVER_BUNDLE = path36.join(import.meta.dirname, "tool-server.cjs");
|
|
49202
49215
|
function getAvailableToolIds() {
|
|
49203
|
-
const out =
|
|
49216
|
+
const out = execFileSync8("node", [TOOL_SERVER_BUNDLE, "-t"], { encoding: "utf8" });
|
|
49204
49217
|
const tools2 = JSON.parse(out);
|
|
49205
49218
|
return tools2.map((t2) => t2.id);
|
|
49206
49219
|
}
|
|
@@ -50176,7 +50189,7 @@ var OPENCODE_GLOBAL_FILES = ["opencode.jsonc", "opencode.json", "config.json"];
|
|
|
50176
50189
|
function hasOpenCodeBinary() {
|
|
50177
50190
|
try {
|
|
50178
50191
|
const cmd = process.platform === "win32" ? "where" : "which";
|
|
50179
|
-
|
|
50192
|
+
execFileSync8(cmd, [OPENCODE_BINARY], { stdio: ["ignore", "ignore", "ignore"] });
|
|
50180
50193
|
return true;
|
|
50181
50194
|
} catch {
|
|
50182
50195
|
return false;
|
|
@@ -50528,15 +50541,15 @@ import * as fs30 from "node:fs";
|
|
|
50528
50541
|
import * as path41 from "node:path";
|
|
50529
50542
|
|
|
50530
50543
|
// ../argent-installer/src/shell.ts
|
|
50531
|
-
import { execFileSync as
|
|
50544
|
+
import { execFileSync as execFileSync9, spawn as spawn5 } from "node:child_process";
|
|
50532
50545
|
|
|
50533
50546
|
// ../argent-installer/src/skills.ts
|
|
50534
|
-
import { execFileSync as
|
|
50547
|
+
import { execFileSync as execFileSync11 } from "node:child_process";
|
|
50535
50548
|
import * as fs29 from "node:fs";
|
|
50536
50549
|
import * as path40 from "node:path";
|
|
50537
50550
|
|
|
50538
50551
|
// ../argent-installer/src/skills-runner.ts
|
|
50539
|
-
import { execFileSync as
|
|
50552
|
+
import { execFileSync as execFileSync10 } from "node:child_process";
|
|
50540
50553
|
import * as fs28 from "node:fs";
|
|
50541
50554
|
import * as path39 from "node:path";
|
|
50542
50555
|
|
|
@@ -50552,6 +50565,7 @@ import * as path42 from "node:path";
|
|
|
50552
50565
|
// ../argent-installer/src/update.ts
|
|
50553
50566
|
var import_semver5 = __toESM(require_semver2(), 1);
|
|
50554
50567
|
import * as fs31 from "node:fs";
|
|
50568
|
+
import * as os7 from "node:os";
|
|
50555
50569
|
import * as path43 from "node:path";
|
|
50556
50570
|
|
|
50557
50571
|
// ../argent-installer/src/update-target.ts
|
|
@@ -50637,7 +50651,7 @@ function check2(status2, label, extra = {}) {
|
|
|
50637
50651
|
return { status: status2, label, ...extra };
|
|
50638
50652
|
}
|
|
50639
50653
|
function home(p) {
|
|
50640
|
-
const h2 =
|
|
50654
|
+
const h2 = homedir12();
|
|
50641
50655
|
return p === h2 || p.startsWith(h2 + path45.sep) ? `~${p.slice(h2.length)}` : p;
|
|
50642
50656
|
}
|
|
50643
50657
|
function installSection(ctx) {
|
|
@@ -50925,7 +50939,7 @@ function xcodesIn(dir) {
|
|
|
50925
50939
|
}
|
|
50926
50940
|
}
|
|
50927
50941
|
function installedXcodes() {
|
|
50928
|
-
return [...xcodesIn("/Applications"), ...xcodesIn(path45.join(
|
|
50942
|
+
return [...xcodesIn("/Applications"), ...xcodesIn(path45.join(homedir12(), "Applications"))];
|
|
50929
50943
|
}
|
|
50930
50944
|
function selectXcodeFix(xcodeApps) {
|
|
50931
50945
|
const app = xcodeApps.find((p) => path45.basename(p) === "Xcode.app") ?? xcodeApps[0];
|
|
@@ -51004,14 +51018,14 @@ function ancestorsBelowHome(dir, homeDir) {
|
|
|
51004
51018
|
}
|
|
51005
51019
|
return ancestors;
|
|
51006
51020
|
}
|
|
51007
|
-
function resolveDoctorRoot(cwd, homeDir =
|
|
51021
|
+
function resolveDoctorRoot(cwd, homeDir = homedir12()) {
|
|
51008
51022
|
const projectRoot = resolveProjectRoot2(cwd, homeDir);
|
|
51009
51023
|
const resolvedHome = path45.resolve(homeDir);
|
|
51010
51024
|
if (projectRoot === resolvedHome || hasProjectConfig(projectRoot)) return projectRoot;
|
|
51011
51025
|
return ancestorsInRepo(projectRoot, resolvedHome).find(hasProjectConfig) ?? ancestorsBelowHome(projectRoot, resolvedHome).find(hasClaudeProjectConfig) ?? projectRoot;
|
|
51012
51026
|
}
|
|
51013
51027
|
function crossesGitRoot(cwd, projectRoot) {
|
|
51014
|
-
const dirs = [cwd, ...ancestorsBelowHome(cwd, path45.resolve(
|
|
51028
|
+
const dirs = [cwd, ...ancestorsBelowHome(cwd, path45.resolve(homedir12()))];
|
|
51015
51029
|
const rootIndex = dirs.indexOf(projectRoot);
|
|
51016
51030
|
return rootIndex > 0 && dirs.slice(0, rootIndex).some((d) => fs33.existsSync(path45.join(d, ".git")));
|
|
51017
51031
|
}
|
package/dist/client.js
CHANGED
|
@@ -8159,6 +8159,15 @@ var CONFIG_SCHEMA = [
|
|
|
8159
8159
|
// drained/reset, not just the file rewritten.
|
|
8160
8160
|
manageCommand: "argent telemetry"
|
|
8161
8161
|
},
|
|
8162
|
+
{
|
|
8163
|
+
key: "autoUpdate.enabled",
|
|
8164
|
+
description: "Automatically update the global Argent installation. Project-local installs require confirmation.",
|
|
8165
|
+
scopes: ["global"],
|
|
8166
|
+
parse: asBoolean,
|
|
8167
|
+
merge: "prioritize-local",
|
|
8168
|
+
default: true,
|
|
8169
|
+
example: "false"
|
|
8170
|
+
},
|
|
8162
8171
|
{
|
|
8163
8172
|
key: "lens.agent",
|
|
8164
8173
|
description: "Coding-agent id remembered by `argent lens` to skip the picker.",
|
|
@@ -8308,6 +8317,7 @@ function buildToolsServerEnv(paths, port, baseEnv = process.env, options = {}) {
|
|
|
8308
8317
|
env.ARGENT_IDLE_TIMEOUT_MINUTES = String(options.idleTimeoutMinutes);
|
|
8309
8318
|
}
|
|
8310
8319
|
env[AUTH_TOKEN_ENV] = options.token ?? "";
|
|
8320
|
+
env.ARGENT_SERVER_MANAGED = options.managed ?? "autospawn";
|
|
8311
8321
|
if (paths.installKind) env.ARGENT_INSTALL_KIND = paths.installKind;
|
|
8312
8322
|
if (paths.installProjectRoot) env.ARGENT_PROJECT_ROOT = paths.installProjectRoot;
|
|
8313
8323
|
return env;
|