@swmansion/argent 0.31.1-next.1 → 0.31.1-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/cli-cmds.mjs CHANGED
@@ -35594,7 +35594,7 @@ var _CI_VENDOR_COUNT_FOR_TEST = vendors_default.length;
35594
35594
  var SESSION_ID2 = randomUUID5();
35595
35595
  function readCliVersion() {
35596
35596
  if (true) {
35597
- return "0.31.1-next.1";
35597
+ return "0.31.1-next.2";
35598
35598
  }
35599
35599
  return "0.0.0";
35600
35600
  }
@@ -16900,7 +16900,7 @@ var _CI_VENDOR_COUNT_FOR_TEST = vendors_default.length;
16900
16900
  var SESSION_ID = randomUUID4();
16901
16901
  function readCliVersion() {
16902
16902
  if (true) {
16903
- return "0.31.1-next.1";
16903
+ return "0.31.1-next.2";
16904
16904
  }
16905
16905
  return "0.0.0";
16906
16906
  }
@@ -17545,6 +17545,7 @@ var NPM_REGISTRY = "https://registry.npmjs.org";
17545
17545
  var MCP_SERVER_KEY = "argent";
17546
17546
  var MCP_BINARY_NAME = "argent";
17547
17547
  var PERMISSION_RULE = "mcp__argent";
17548
+ var DEVIN_PERMISSION_RULE = "mcp__argent__*";
17548
17549
  var CURSOR_ALLOWLIST_PATTERN = "argent:*";
17549
17550
 
17550
17551
  // ../argent-installer/src/utils.ts
@@ -21179,8 +21180,17 @@ function vscodeUserDirs() {
21179
21180
  }
21180
21181
  return dirs;
21181
21182
  }
21183
+ function devinUserConfigPath() {
21184
+ if (process.platform === "win32") {
21185
+ const appData = process.env.APPDATA || path18.join(homedir4(), "AppData", "Roaming");
21186
+ return path18.join(appData, "devin", "config.json");
21187
+ }
21188
+ const xdg = process.env.XDG_CONFIG_HOME;
21189
+ return path18.join(xdg || path18.join(homedir4(), ".config"), "devin", "config.json");
21190
+ }
21182
21191
  var windsurfAdapter = {
21183
- name: "Windsurf",
21192
+ name: "Devin Desktop",
21193
+ telemetryName: "windsurf",
21184
21194
  detect() {
21185
21195
  return dirHasEditorEvidence(
21186
21196
  path18.join(homedir4(), ".codeium", "windsurf"),
@@ -21219,16 +21229,19 @@ var windsurfAdapter = {
21219
21229
  return this.getArgentEntry(configPath) !== null;
21220
21230
  },
21221
21231
  // Targets just the argent entry's alwaysAllow key, so comments and foreign
21222
- // servers survive.
21232
+ // servers survive. alwaysAllow serves the legacy Cascade agent; the Devin
21233
+ // agent needs its own permission rule.
21223
21234
  addAllowlist() {
21224
21235
  const configPath = path18.join(homedir4(), ".codeium", "windsurf", "mcp_config.json");
21225
21236
  const config = readJsonc(configPath);
21226
21237
  const servers = config.mcpServers;
21227
21238
  if (!servers?.[MCP_SERVER_KEY]) return;
21228
21239
  editJsoncFile(configPath, ["mcpServers", MCP_SERVER_KEY, "alwaysAllow"], ["*"]);
21240
+ addAllowRule(devinUserConfigPath(), DEVIN_PERMISSION_RULE);
21229
21241
  },
21230
21242
  removeAllowlist(_root, scope) {
21231
21243
  if (scope !== "global") return;
21244
+ removeAllowRule(devinUserConfigPath(), DEVIN_PERMISSION_RULE);
21232
21245
  const configPath = path18.join(homedir4(), ".codeium", "windsurf", "mcp_config.json");
21233
21246
  if (!fs17.existsSync(configPath)) return;
21234
21247
  const config = readJsonc(configPath);
@@ -21651,25 +21664,32 @@ function findConfiguredAdapterScopes(adapters, projectRoot) {
21651
21664
  }
21652
21665
  return results;
21653
21666
  }
21654
- function addClaudePermission(root, scope) {
21655
- const settingsPath = scope === "global" ? path18.join(homedir4(), ".claude", "settings.json") : path18.join(root, ".claude", "settings.json");
21667
+ function addAllowRule(settingsPath, rule) {
21656
21668
  const config = readJsonc(settingsPath);
21657
21669
  const permissions = config.permissions ?? {};
21658
21670
  const allow = Array.isArray(permissions.allow) ? permissions.allow : [];
21659
- if (allow.includes(PERMISSION_RULE)) return;
21660
- editJsoncFile(settingsPath, ["permissions", "allow"], [...allow, PERMISSION_RULE]);
21671
+ if (allow.includes(rule)) return;
21672
+ editJsoncFile(settingsPath, ["permissions", "allow"], [...allow, rule]);
21661
21673
  }
21662
- function removeClaudePermission(root, scope) {
21663
- const settingsPath = scope === "global" ? path18.join(homedir4(), ".claude", "settings.json") : path18.join(root, ".claude", "settings.json");
21674
+ function removeAllowRule(settingsPath, rule) {
21664
21675
  if (!fs17.existsSync(settingsPath)) return;
21665
21676
  const config = readJsonc(settingsPath);
21666
21677
  const permissions = config?.permissions;
21667
21678
  const allow = permissions?.allow;
21668
21679
  if (!permissions || !Array.isArray(allow)) return;
21669
- if (!allow.includes(PERMISSION_RULE)) return;
21670
- const next = allow.filter((rule) => rule !== PERMISSION_RULE);
21680
+ if (!allow.includes(rule)) return;
21681
+ const next = allow.filter((r2) => r2 !== rule);
21671
21682
  editJsoncFile(settingsPath, ["permissions", "allow"], next.length > 0 ? next : void 0);
21672
21683
  }
21684
+ function claudeSettingsPath(root, scope) {
21685
+ return scope === "global" ? path18.join(homedir4(), ".claude", "settings.json") : path18.join(root, ".claude", "settings.json");
21686
+ }
21687
+ function addClaudePermission(root, scope) {
21688
+ addAllowRule(claudeSettingsPath(root, scope), PERMISSION_RULE);
21689
+ }
21690
+ function removeClaudePermission(root, scope) {
21691
+ removeAllowRule(claudeSettingsPath(root, scope), PERMISSION_RULE);
21692
+ }
21673
21693
  function formatCopyDestination(target, writtenPath, root) {
21674
21694
  if (writtenPath === target.targetPath) return target.label;
21675
21695
  return `${target.label} -> ${formatManagedPathLabel(writtenPath, realpathOrSelf(root))}`;
@@ -23268,7 +23288,7 @@ async function init2(args) {
23268
23288
  });
23269
23289
  tel.editorsConfiguredCount = writtenAdapters.length;
23270
23290
  track("installation:editors_select", {
23271
- editors: writtenAdapters.map((a2) => sanitizeEditorName(a2.name)),
23291
+ editors: writtenAdapters.map((a2) => a2.telemetryName ?? sanitizeEditorName(a2.name)),
23272
23292
  detected_editor_count: detected.length,
23273
23293
  scope,
23274
23294
  install_mode: tel.installMode
@@ -27493,13 +27493,14 @@ var RUNTIME_CLIENT_PATTERNS = [
27493
27493
  [/^opencode\b/, "opencode"],
27494
27494
  [/^github-copilot-developer\b/, "copilot"]
27495
27495
  ];
27496
- function canonicalizeAiClient(value) {
27496
+ function canonicalizeAiClient(value, env = {}) {
27497
27497
  if (typeof value !== "string") return void 0;
27498
27498
  const lower = value.trim().toLowerCase();
27499
27499
  if (!lower) return void 0;
27500
27500
  for (const [pattern, slug] of RUNTIME_CLIENT_PATTERNS) {
27501
27501
  if (pattern.test(lower)) return slug;
27502
27502
  }
27503
+ if (lower === "rmcp" && env.WINDSURF_IDE_TYPE) return "windsurf";
27503
27504
  return void 0;
27504
27505
  }
27505
27506
 
@@ -28777,7 +28778,7 @@ async function startMcpServer(options) {
28777
28778
  }
28778
28779
  function aiClientHeaders() {
28779
28780
  const rawName = server.getClientVersion()?.name?.trim() || void 0;
28780
- const aiClient = canonicalizeAiClient(rawName);
28781
+ const aiClient = canonicalizeAiClient(rawName, process.env);
28781
28782
  if (aiClient) return { "X-Argent-AI-Client": aiClient };
28782
28783
  if (rawName) return { "X-Argent-AI-Client": "other" };
28783
28784
  return {};
@@ -100961,7 +100961,7 @@ var _CI_VENDOR_COUNT_FOR_TEST = vendors_default.length;
100961
100961
  var SESSION_ID = (0, import_node_crypto3.randomUUID)();
100962
100962
  function readCliVersion() {
100963
100963
  if (true) {
100964
- return "0.31.1-next.1";
100964
+ return "0.31.1-next.2";
100965
100965
  }
100966
100966
  return "0.0.0";
100967
100967
  }
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.2",
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",