negotium 0.5.2 → 0.5.4

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/main.js CHANGED
@@ -1874,7 +1874,7 @@ var exports_version = {};
1874
1874
  __export(exports_version, {
1875
1875
  NEGOTIUM_VERSION: () => NEGOTIUM_VERSION
1876
1876
  });
1877
- var NEGOTIUM_VERSION = "0.5.2";
1877
+ var NEGOTIUM_VERSION = "0.5.4";
1878
1878
 
1879
1879
  // ../../packages/core/src/agents/codex-native-multi-agent.ts
1880
1880
  import { spawn } from "child_process";
@@ -2671,6 +2671,34 @@ function browserOwnerCapability(capability, owner) {
2671
2671
  }
2672
2672
  var init_capability = () => {};
2673
2673
 
2674
+ // ../../packages/core/src/platform/playwright/mcp-transport.ts
2675
+ function buildPlaywrightMcpTransport(port, owner, capability, agent) {
2676
+ const query = new URLSearchParams({ owner });
2677
+ const ownerCapability = browserOwnerCapability(capability, owner);
2678
+ if (agent === "codex") {
2679
+ return {
2680
+ url: `http://127.0.0.1:${port}/mcp?${query}`,
2681
+ env_http_headers: { "X-Browser-Capability": CODEX_BROWSER_CAPABILITY_ENV }
2682
+ };
2683
+ }
2684
+ if (agent === "maestro") {
2685
+ return {
2686
+ type: "http",
2687
+ url: `http://127.0.0.1:${port}/mcp?${query}`,
2688
+ headers: { "X-Browser-Capability": ownerCapability }
2689
+ };
2690
+ }
2691
+ return {
2692
+ type: "sse",
2693
+ url: `http://127.0.0.1:${port}/sse?${query}`,
2694
+ headers: { "X-Browser-Capability": ownerCapability }
2695
+ };
2696
+ }
2697
+ var CODEX_BROWSER_CAPABILITY_ENV = "NEGOTIUM_BROWSER_CAPABILITY";
2698
+ var init_mcp_transport = __esm(() => {
2699
+ init_capability();
2700
+ });
2701
+
2674
2702
  // ../../packages/core/src/platform/mcp-config.ts
2675
2703
  import { accessSync as accessSync2, constants as fsConstants } from "fs";
2676
2704
  import { homedir as homedir6 } from "os";
@@ -2750,22 +2778,6 @@ function browserOwnerForContext(ctx) {
2750
2778
  return `user:${ctx.userId}:${ctx.session}`;
2751
2779
  return;
2752
2780
  }
2753
- function playwrightTransport(port, owner, capability, agent) {
2754
- const ownerCapability = browserOwnerCapability(capability, owner);
2755
- if (agent === "codex") {
2756
- const query2 = new URLSearchParams({ owner });
2757
- return {
2758
- url: `http://127.0.0.1:${port}/mcp?${query2}`,
2759
- env_http_headers: { "X-Browser-Capability": CODEX_BROWSER_CAPABILITY_ENV }
2760
- };
2761
- }
2762
- const query = new URLSearchParams({ owner });
2763
- return {
2764
- type: "sse",
2765
- url: `http://127.0.0.1:${port}/sse?${query}`,
2766
- headers: { "X-Browser-Capability": ownerCapability }
2767
- };
2768
- }
2769
2781
  function longLivedHttpMcp(agent, port) {
2770
2782
  return agent === "codex" ? { url: `http://127.0.0.1:${port}/mcp` } : { type: "sse", url: `http://127.0.0.1:${port}/sse` };
2771
2783
  }
@@ -3059,7 +3071,7 @@ function getMcpServersForQuery(opts) {
3059
3071
  peerBridge: opts.peerBridge
3060
3072
  });
3061
3073
  }
3062
- var _playwrightUnavailableNotifier, _playwrightUnavailableLastNotifiedAt, _PLAYWRIGHT_UNAVAILABLE_COOLDOWN_MS, _playwrightUnavailableThisTurn, CODEX_BROWSER_CAPABILITY_ENV = "NEGOTIUM_BROWSER_CAPABILITY", cuaRsMcpPort, cuaRsMcpToken, MCP_CATALOG, allForumMcpServerNames, requiredForumMcpServers, REQUIRED_FORUM_MCP_SERVERS, optionalForumMcpServers, OPTIONAL_FORUM_MCP_SERVERS, nodeMcpEntries;
3074
+ var _playwrightUnavailableNotifier, _playwrightUnavailableLastNotifiedAt, _PLAYWRIGHT_UNAVAILABLE_COOLDOWN_MS, _playwrightUnavailableThisTurn, cuaRsMcpPort, cuaRsMcpToken, MCP_CATALOG, allForumMcpServerNames, requiredForumMcpServers, REQUIRED_FORUM_MCP_SERVERS, optionalForumMcpServers, OPTIONAL_FORUM_MCP_SERVERS, nodeMcpEntries;
3063
3075
  var init_mcp_config = __esm(() => {
3064
3076
  init_canonical_bridge_config();
3065
3077
  init_runtime_spec();
@@ -3069,6 +3081,7 @@ var init_mcp_config = __esm(() => {
3069
3081
  init_logger();
3070
3082
  init_mcp_catalog_policy();
3071
3083
  init_capability();
3084
+ init_mcp_transport();
3072
3085
  _playwrightUnavailableLastNotifiedAt = new Map;
3073
3086
  _PLAYWRIGHT_UNAVAILABLE_COOLDOWN_MS = 5 * 60000;
3074
3087
  _playwrightUnavailableThisTurn = new Set;
@@ -3080,7 +3093,7 @@ var init_mcp_config = __esm(() => {
3080
3093
  const owner = browserOwnerForContext({ userId, session, topicId });
3081
3094
  if (!owner)
3082
3095
  return null;
3083
- return playwrightTransport(playwrightPort, owner, playwrightCapability, agent);
3096
+ return buildPlaywrightMcpTransport(playwrightPort, owner, playwrightCapability, agent);
3084
3097
  }
3085
3098
  _markPlaywrightUnavailable({
3086
3099
  userId,
@@ -47660,4 +47673,4 @@ switch (command) {
47660
47673
  }
47661
47674
  }
47662
47675
 
47663
- //# debugId=A98143381B45D73164756E2164756E21
47676
+ //# debugId=5BB48E6D3A61C9D764756E2164756E21