negotium 0.5.3 → 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.3";
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,29 +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
- if (agent === "maestro") {
2764
- return {
2765
- type: "http",
2766
- url: `http://127.0.0.1:${port}/mcp?${query}`,
2767
- headers: { "X-Browser-Capability": ownerCapability }
2768
- };
2769
- }
2770
- return {
2771
- type: "sse",
2772
- url: `http://127.0.0.1:${port}/sse?${query}`,
2773
- headers: { "X-Browser-Capability": ownerCapability }
2774
- };
2775
- }
2776
2781
  function longLivedHttpMcp(agent, port) {
2777
2782
  return agent === "codex" ? { url: `http://127.0.0.1:${port}/mcp` } : { type: "sse", url: `http://127.0.0.1:${port}/sse` };
2778
2783
  }
@@ -3066,7 +3071,7 @@ function getMcpServersForQuery(opts) {
3066
3071
  peerBridge: opts.peerBridge
3067
3072
  });
3068
3073
  }
3069
- 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;
3070
3075
  var init_mcp_config = __esm(() => {
3071
3076
  init_canonical_bridge_config();
3072
3077
  init_runtime_spec();
@@ -3076,6 +3081,7 @@ var init_mcp_config = __esm(() => {
3076
3081
  init_logger();
3077
3082
  init_mcp_catalog_policy();
3078
3083
  init_capability();
3084
+ init_mcp_transport();
3079
3085
  _playwrightUnavailableLastNotifiedAt = new Map;
3080
3086
  _PLAYWRIGHT_UNAVAILABLE_COOLDOWN_MS = 5 * 60000;
3081
3087
  _playwrightUnavailableThisTurn = new Set;
@@ -3087,7 +3093,7 @@ var init_mcp_config = __esm(() => {
3087
3093
  const owner = browserOwnerForContext({ userId, session, topicId });
3088
3094
  if (!owner)
3089
3095
  return null;
3090
- return playwrightTransport(playwrightPort, owner, playwrightCapability, agent);
3096
+ return buildPlaywrightMcpTransport(playwrightPort, owner, playwrightCapability, agent);
3091
3097
  }
3092
3098
  _markPlaywrightUnavailable({
3093
3099
  userId,
@@ -47667,4 +47673,4 @@ switch (command) {
47667
47673
  }
47668
47674
  }
47669
47675
 
47670
- //# debugId=79F8A0C50EF3E9F564756E2164756E21
47676
+ //# debugId=5BB48E6D3A61C9D764756E2164756E21