@swmansion/argent 0.31.1-next.1 → 0.31.1-next.3

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 CHANGED
@@ -31617,6 +31617,18 @@ var CONFIG_SCHEMA = [
31617
31617
  merge: "prioritize-local",
31618
31618
  example: "~/Library/Android/sdk"
31619
31619
  },
31620
+ {
31621
+ key: "android.adbServerPort",
31622
+ description: "Port of the adb server argent uses, for hosts that run Android devices on a server other than the default 5037 (a device pool with its own server, for example). Applies when the tool-server starts, to the tool-server and every adb and simulator-server it runs. `ANDROID_ADB_SERVER_PORT` or `ADB_SERVER_SOCKET` in the tool-server's environment still wins, as it does for adb itself.",
31623
+ scopes: ["project", "global"],
31624
+ parse: (raw) => {
31625
+ const value = asPositiveInteger(raw);
31626
+ return value !== void 0 && value < 65536 ? value : void 0;
31627
+ },
31628
+ expected: "a TCP port, 1-65535",
31629
+ merge: "prioritize-local",
31630
+ example: "5038"
31631
+ },
31620
31632
  {
31621
31633
  key: "recordings.directory",
31622
31634
  description: "Directory where finished screen recordings (mp4) are saved on the client host. Absolute, `~`-prefixed, or relative to the project root (home dir when not in a project). Unset \u21D2 `.argent/recordings` under the project root.",
@@ -35594,7 +35606,7 @@ var _CI_VENDOR_COUNT_FOR_TEST = vendors_default.length;
35594
35606
  var SESSION_ID2 = randomUUID5();
35595
35607
  function readCliVersion() {
35596
35608
  if (true) {
35597
- return "0.31.1-next.1";
35609
+ return "0.31.1-next.3";
35598
35610
  }
35599
35611
  return "0.0.0";
35600
35612
  }
package/dist/client.js CHANGED
@@ -8064,6 +8064,18 @@ var CONFIG_SCHEMA = [
8064
8064
  merge: "prioritize-local",
8065
8065
  example: "~/Library/Android/sdk"
8066
8066
  },
8067
+ {
8068
+ key: "android.adbServerPort",
8069
+ description: "Port of the adb server argent uses, for hosts that run Android devices on a server other than the default 5037 (a device pool with its own server, for example). Applies when the tool-server starts, to the tool-server and every adb and simulator-server it runs. `ANDROID_ADB_SERVER_PORT` or `ADB_SERVER_SOCKET` in the tool-server's environment still wins, as it does for adb itself.",
8070
+ scopes: ["project", "global"],
8071
+ parse: (raw) => {
8072
+ const value = asPositiveInteger(raw);
8073
+ return value !== void 0 && value < 65536 ? value : void 0;
8074
+ },
8075
+ expected: "a TCP port, 1-65535",
8076
+ merge: "prioritize-local",
8077
+ example: "5038"
8078
+ },
8067
8079
  {
8068
8080
  key: "recordings.directory",
8069
8081
  description: "Directory where finished screen recordings (mp4) are saved on the client host. Absolute, `~`-prefixed, or relative to the project root (home dir when not in a project). Unset \u21D2 `.argent/recordings` under the project root.",
@@ -15432,6 +15432,18 @@ var CONFIG_SCHEMA = [
15432
15432
  merge: "prioritize-local",
15433
15433
  example: "~/Library/Android/sdk"
15434
15434
  },
15435
+ {
15436
+ key: "android.adbServerPort",
15437
+ description: "Port of the adb server argent uses, for hosts that run Android devices on a server other than the default 5037 (a device pool with its own server, for example). Applies when the tool-server starts, to the tool-server and every adb and simulator-server it runs. `ANDROID_ADB_SERVER_PORT` or `ADB_SERVER_SOCKET` in the tool-server's environment still wins, as it does for adb itself.",
15438
+ scopes: ["project", "global"],
15439
+ parse: (raw) => {
15440
+ const value = asPositiveInteger(raw);
15441
+ return value !== void 0 && value < 65536 ? value : void 0;
15442
+ },
15443
+ expected: "a TCP port, 1-65535",
15444
+ merge: "prioritize-local",
15445
+ example: "5038"
15446
+ },
15435
15447
  {
15436
15448
  key: "recordings.directory",
15437
15449
  description: "Directory where finished screen recordings (mp4) are saved on the client host. Absolute, `~`-prefixed, or relative to the project root (home dir when not in a project). Unset \u21D2 `.argent/recordings` under the project root.",
@@ -16900,7 +16912,7 @@ var _CI_VENDOR_COUNT_FOR_TEST = vendors_default.length;
16900
16912
  var SESSION_ID = randomUUID4();
16901
16913
  function readCliVersion() {
16902
16914
  if (true) {
16903
- return "0.31.1-next.1";
16915
+ return "0.31.1-next.3";
16904
16916
  }
16905
16917
  return "0.0.0";
16906
16918
  }
@@ -17545,6 +17557,7 @@ var NPM_REGISTRY = "https://registry.npmjs.org";
17545
17557
  var MCP_SERVER_KEY = "argent";
17546
17558
  var MCP_BINARY_NAME = "argent";
17547
17559
  var PERMISSION_RULE = "mcp__argent";
17560
+ var DEVIN_PERMISSION_RULE = "mcp__argent__*";
17548
17561
  var CURSOR_ALLOWLIST_PATTERN = "argent:*";
17549
17562
 
17550
17563
  // ../argent-installer/src/utils.ts
@@ -21179,8 +21192,17 @@ function vscodeUserDirs() {
21179
21192
  }
21180
21193
  return dirs;
21181
21194
  }
21195
+ function devinUserConfigPath() {
21196
+ if (process.platform === "win32") {
21197
+ const appData = process.env.APPDATA || path18.join(homedir4(), "AppData", "Roaming");
21198
+ return path18.join(appData, "devin", "config.json");
21199
+ }
21200
+ const xdg = process.env.XDG_CONFIG_HOME;
21201
+ return path18.join(xdg || path18.join(homedir4(), ".config"), "devin", "config.json");
21202
+ }
21182
21203
  var windsurfAdapter = {
21183
- name: "Windsurf",
21204
+ name: "Devin Desktop",
21205
+ telemetryName: "windsurf",
21184
21206
  detect() {
21185
21207
  return dirHasEditorEvidence(
21186
21208
  path18.join(homedir4(), ".codeium", "windsurf"),
@@ -21219,16 +21241,19 @@ var windsurfAdapter = {
21219
21241
  return this.getArgentEntry(configPath) !== null;
21220
21242
  },
21221
21243
  // Targets just the argent entry's alwaysAllow key, so comments and foreign
21222
- // servers survive.
21244
+ // servers survive. alwaysAllow serves the legacy Cascade agent; the Devin
21245
+ // agent needs its own permission rule.
21223
21246
  addAllowlist() {
21224
21247
  const configPath = path18.join(homedir4(), ".codeium", "windsurf", "mcp_config.json");
21225
21248
  const config = readJsonc(configPath);
21226
21249
  const servers = config.mcpServers;
21227
21250
  if (!servers?.[MCP_SERVER_KEY]) return;
21228
21251
  editJsoncFile(configPath, ["mcpServers", MCP_SERVER_KEY, "alwaysAllow"], ["*"]);
21252
+ addAllowRule(devinUserConfigPath(), DEVIN_PERMISSION_RULE);
21229
21253
  },
21230
21254
  removeAllowlist(_root, scope) {
21231
21255
  if (scope !== "global") return;
21256
+ removeAllowRule(devinUserConfigPath(), DEVIN_PERMISSION_RULE);
21232
21257
  const configPath = path18.join(homedir4(), ".codeium", "windsurf", "mcp_config.json");
21233
21258
  if (!fs17.existsSync(configPath)) return;
21234
21259
  const config = readJsonc(configPath);
@@ -21651,25 +21676,32 @@ function findConfiguredAdapterScopes(adapters, projectRoot) {
21651
21676
  }
21652
21677
  return results;
21653
21678
  }
21654
- function addClaudePermission(root, scope) {
21655
- const settingsPath = scope === "global" ? path18.join(homedir4(), ".claude", "settings.json") : path18.join(root, ".claude", "settings.json");
21679
+ function addAllowRule(settingsPath, rule) {
21656
21680
  const config = readJsonc(settingsPath);
21657
21681
  const permissions = config.permissions ?? {};
21658
21682
  const allow = Array.isArray(permissions.allow) ? permissions.allow : [];
21659
- if (allow.includes(PERMISSION_RULE)) return;
21660
- editJsoncFile(settingsPath, ["permissions", "allow"], [...allow, PERMISSION_RULE]);
21683
+ if (allow.includes(rule)) return;
21684
+ editJsoncFile(settingsPath, ["permissions", "allow"], [...allow, rule]);
21661
21685
  }
21662
- function removeClaudePermission(root, scope) {
21663
- const settingsPath = scope === "global" ? path18.join(homedir4(), ".claude", "settings.json") : path18.join(root, ".claude", "settings.json");
21686
+ function removeAllowRule(settingsPath, rule) {
21664
21687
  if (!fs17.existsSync(settingsPath)) return;
21665
21688
  const config = readJsonc(settingsPath);
21666
21689
  const permissions = config?.permissions;
21667
21690
  const allow = permissions?.allow;
21668
21691
  if (!permissions || !Array.isArray(allow)) return;
21669
- if (!allow.includes(PERMISSION_RULE)) return;
21670
- const next = allow.filter((rule) => rule !== PERMISSION_RULE);
21692
+ if (!allow.includes(rule)) return;
21693
+ const next = allow.filter((r2) => r2 !== rule);
21671
21694
  editJsoncFile(settingsPath, ["permissions", "allow"], next.length > 0 ? next : void 0);
21672
21695
  }
21696
+ function claudeSettingsPath(root, scope) {
21697
+ return scope === "global" ? path18.join(homedir4(), ".claude", "settings.json") : path18.join(root, ".claude", "settings.json");
21698
+ }
21699
+ function addClaudePermission(root, scope) {
21700
+ addAllowRule(claudeSettingsPath(root, scope), PERMISSION_RULE);
21701
+ }
21702
+ function removeClaudePermission(root, scope) {
21703
+ removeAllowRule(claudeSettingsPath(root, scope), PERMISSION_RULE);
21704
+ }
21673
21705
  function formatCopyDestination(target, writtenPath, root) {
21674
21706
  if (writtenPath === target.targetPath) return target.label;
21675
21707
  return `${target.label} -> ${formatManagedPathLabel(writtenPath, realpathOrSelf(root))}`;
@@ -23268,7 +23300,7 @@ async function init2(args) {
23268
23300
  });
23269
23301
  tel.editorsConfiguredCount = writtenAdapters.length;
23270
23302
  track("installation:editors_select", {
23271
- editors: writtenAdapters.map((a2) => sanitizeEditorName(a2.name)),
23303
+ editors: writtenAdapters.map((a2) => a2.telemetryName ?? sanitizeEditorName(a2.name)),
23272
23304
  detected_editor_count: detected.length,
23273
23305
  scope,
23274
23306
  install_mode: tel.installMode
@@ -27090,6 +27090,18 @@ var CONFIG_SCHEMA = [
27090
27090
  merge: "prioritize-local",
27091
27091
  example: "~/Library/Android/sdk"
27092
27092
  },
27093
+ {
27094
+ key: "android.adbServerPort",
27095
+ description: "Port of the adb server argent uses, for hosts that run Android devices on a server other than the default 5037 (a device pool with its own server, for example). Applies when the tool-server starts, to the tool-server and every adb and simulator-server it runs. `ANDROID_ADB_SERVER_PORT` or `ADB_SERVER_SOCKET` in the tool-server's environment still wins, as it does for adb itself.",
27096
+ scopes: ["project", "global"],
27097
+ parse: (raw) => {
27098
+ const value = asPositiveInteger(raw);
27099
+ return value !== void 0 && value < 65536 ? value : void 0;
27100
+ },
27101
+ expected: "a TCP port, 1-65535",
27102
+ merge: "prioritize-local",
27103
+ example: "5038"
27104
+ },
27093
27105
  {
27094
27106
  key: "recordings.directory",
27095
27107
  description: "Directory where finished screen recordings (mp4) are saved on the client host. Absolute, `~`-prefixed, or relative to the project root (home dir when not in a project). Unset \u21D2 `.argent/recordings` under the project root.",
@@ -27493,13 +27505,14 @@ var RUNTIME_CLIENT_PATTERNS = [
27493
27505
  [/^opencode\b/, "opencode"],
27494
27506
  [/^github-copilot-developer\b/, "copilot"]
27495
27507
  ];
27496
- function canonicalizeAiClient(value) {
27508
+ function canonicalizeAiClient(value, env = {}) {
27497
27509
  if (typeof value !== "string") return void 0;
27498
27510
  const lower = value.trim().toLowerCase();
27499
27511
  if (!lower) return void 0;
27500
27512
  for (const [pattern, slug] of RUNTIME_CLIENT_PATTERNS) {
27501
27513
  if (pattern.test(lower)) return slug;
27502
27514
  }
27515
+ if (lower === "rmcp" && env.WINDSURF_IDE_TYPE) return "windsurf";
27503
27516
  return void 0;
27504
27517
  }
27505
27518
 
@@ -28777,7 +28790,7 @@ async function startMcpServer(options) {
28777
28790
  }
28778
28791
  function aiClientHeaders() {
28779
28792
  const rawName = server.getClientVersion()?.name?.trim() || void 0;
28780
- const aiClient = canonicalizeAiClient(rawName);
28793
+ const aiClient = canonicalizeAiClient(rawName, process.env);
28781
28794
  if (aiClient) return { "X-Argent-AI-Client": aiClient };
28782
28795
  if (rawName) return { "X-Argent-AI-Client": "other" };
28783
28796
  return {};
@@ -887,6 +887,18 @@ var init_config_schema = __esm({
887
887
  merge: "prioritize-local",
888
888
  example: "~/Library/Android/sdk"
889
889
  },
890
+ {
891
+ key: "android.adbServerPort",
892
+ description: "Port of the adb server argent uses, for hosts that run Android devices on a server other than the default 5037 (a device pool with its own server, for example). Applies when the tool-server starts, to the tool-server and every adb and simulator-server it runs. `ANDROID_ADB_SERVER_PORT` or `ADB_SERVER_SOCKET` in the tool-server's environment still wins, as it does for adb itself.",
893
+ scopes: ["project", "global"],
894
+ parse: (raw) => {
895
+ const value = asPositiveInteger(raw);
896
+ return value !== void 0 && value < 65536 ? value : void 0;
897
+ },
898
+ expected: "a TCP port, 1-65535",
899
+ merge: "prioritize-local",
900
+ example: "5038"
901
+ },
890
902
  {
891
903
  key: "recordings.directory",
892
904
  description: "Directory where finished screen recordings (mp4) are saved on the client host. Absolute, `~`-prefixed, or relative to the project root (home dir when not in a project). Unset \u21D2 `.argent/recordings` under the project root.",
@@ -961,6 +973,10 @@ function getAndroidSdkRoot(options = {}) {
961
973
  if (value.startsWith("~/")) return path4.resolve(home, value.slice(2));
962
974
  return path4.resolve(value);
963
975
  }
976
+ function getAndroidAdbServerPort(options = {}) {
977
+ const value = getConfigValueByKey(ANDROID_ADB_SERVER_PORT_KEY, options);
978
+ return typeof value === "number" ? value : null;
979
+ }
964
980
  function getAdditionalIosDeviceSets(options = {}) {
965
981
  const def = requireDefinition(IOS_ADDITIONAL_DEVICE_SETS_KEY);
966
982
  if (def.merge !== "union") {
@@ -985,7 +1001,7 @@ function resolveDeviceSetEntries(entries, baseDir, home) {
985
1001
  return path4.resolve(baseDir, entry);
986
1002
  });
987
1003
  }
988
- var path4, UnknownConfigKeyError, ANDROID_SDK_ROOT_KEY, IOS_ADDITIONAL_DEVICE_SETS_KEY;
1004
+ var path4, UnknownConfigKeyError, ANDROID_SDK_ROOT_KEY, ANDROID_ADB_SERVER_PORT_KEY, IOS_ADDITIONAL_DEVICE_SETS_KEY;
989
1005
  var init_config_access = __esm({
990
1006
  "../configuration-core/src/config-access.ts"() {
991
1007
  "use strict";
@@ -1004,6 +1020,7 @@ var init_config_access = __esm({
1004
1020
  key;
1005
1021
  };
1006
1022
  ANDROID_SDK_ROOT_KEY = "android.sdkRoot";
1023
+ ANDROID_ADB_SERVER_PORT_KEY = "android.adbServerPort";
1007
1024
  IOS_ADDITIONAL_DEVICE_SETS_KEY = "ios.additionalDeviceSets";
1008
1025
  }
1009
1026
  });
@@ -100961,7 +100978,7 @@ var _CI_VENDOR_COUNT_FOR_TEST = vendors_default.length;
100961
100978
  var SESSION_ID = (0, import_node_crypto3.randomUUID)();
100962
100979
  function readCliVersion() {
100963
100980
  if (true) {
100964
- return "0.31.1-next.1";
100981
+ return "0.31.1-next.3";
100965
100982
  }
100966
100983
  return "0.0.0";
100967
100984
  }
@@ -141108,6 +141125,10 @@ async function adbServerShell(serial, shellCommand, options = {}) {
141108
141125
  });
141109
141126
  });
141110
141127
  }
141128
+ function configuredAdbServerPort(env, configured) {
141129
+ if (configured === null || env.ADB_SERVER_SOCKET || env.ANDROID_ADB_SERVER_PORT) return null;
141130
+ return String(configured);
141131
+ }
141111
141132
  function adbServerAddress(env) {
141112
141133
  const socketSpec = env.ADB_SERVER_SOCKET;
141113
141134
  if (socketSpec) {
@@ -178549,6 +178570,12 @@ function initializeStdioTimestampWrapper() {
178549
178570
  }
178550
178571
  function start() {
178551
178572
  initializeStdioTimestampWrapper();
178573
+ const adbServerPort = configuredAdbServerPort(process.env, getAndroidAdbServerPort());
178574
+ if (adbServerPort !== null) {
178575
+ process.env.ANDROID_ADB_SERVER_PORT = adbServerPort;
178576
+ process.stderr.write(`android.adbServerPort \u2192 ANDROID_ADB_SERVER_PORT=${adbServerPort}
178577
+ `);
178578
+ }
178552
178579
  let shuttingDown = false;
178553
178580
  let crashing = false;
178554
178581
  let finalExitCode = 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@swmansion/argent",
3
- "version": "0.31.1-next.1",
3
+ "version": "0.31.1-next.3",
4
4
  "mcpName": "io.github.software-mansion/argent",
5
5
  "description": "MCP server for iOS Simulator and Android Emulator control",
6
6
  "license": "Apache-2.0",