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.
@@ -845,6 +845,34 @@ function browserOwnerCapability(capability, owner) {
845
845
  }
846
846
  var init_capability = () => {};
847
847
 
848
+ // ../../packages/core/src/platform/playwright/mcp-transport.ts
849
+ function buildPlaywrightMcpTransport(port, owner, capability, agent) {
850
+ const query = new URLSearchParams({ owner });
851
+ const ownerCapability = browserOwnerCapability(capability, owner);
852
+ if (agent === "codex") {
853
+ return {
854
+ url: `http://127.0.0.1:${port}/mcp?${query}`,
855
+ env_http_headers: { "X-Browser-Capability": CODEX_BROWSER_CAPABILITY_ENV }
856
+ };
857
+ }
858
+ if (agent === "maestro") {
859
+ return {
860
+ type: "http",
861
+ url: `http://127.0.0.1:${port}/mcp?${query}`,
862
+ headers: { "X-Browser-Capability": ownerCapability }
863
+ };
864
+ }
865
+ return {
866
+ type: "sse",
867
+ url: `http://127.0.0.1:${port}/sse?${query}`,
868
+ headers: { "X-Browser-Capability": ownerCapability }
869
+ };
870
+ }
871
+ var CODEX_BROWSER_CAPABILITY_ENV = "NEGOTIUM_BROWSER_CAPABILITY";
872
+ var init_mcp_transport = __esm(() => {
873
+ init_capability();
874
+ });
875
+
848
876
  // ../../packages/core/src/platform/mcp-config.ts
849
877
  function buildStdioMcpServer(agent, serverFile, serverArgs, env) {
850
878
  if (agent === "codex") {
@@ -918,22 +946,6 @@ function browserOwnerForContext(ctx) {
918
946
  return `user:${ctx.userId}:${ctx.session}`;
919
947
  return;
920
948
  }
921
- function playwrightTransport(port, owner, capability, agent) {
922
- const ownerCapability = browserOwnerCapability(capability, owner);
923
- if (agent === "codex") {
924
- const query2 = new URLSearchParams({ owner });
925
- return {
926
- url: `http://127.0.0.1:${port}/mcp?${query2}`,
927
- env_http_headers: { "X-Browser-Capability": CODEX_BROWSER_CAPABILITY_ENV }
928
- };
929
- }
930
- const query = new URLSearchParams({ owner });
931
- return {
932
- type: "sse",
933
- url: `http://127.0.0.1:${port}/sse?${query}`,
934
- headers: { "X-Browser-Capability": ownerCapability }
935
- };
936
- }
937
949
  function longLivedHttpMcp(agent, port) {
938
950
  return agent === "codex" ? { url: `http://127.0.0.1:${port}/mcp` } : { type: "sse", url: `http://127.0.0.1:${port}/sse` };
939
951
  }
@@ -1178,7 +1190,7 @@ function getMcpServersForQuery(opts) {
1178
1190
  peerBridge: opts.peerBridge
1179
1191
  });
1180
1192
  }
1181
- 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, nodeMcpEntries;
1193
+ var _playwrightUnavailableNotifier, _playwrightUnavailableLastNotifiedAt, _PLAYWRIGHT_UNAVAILABLE_COOLDOWN_MS, _playwrightUnavailableThisTurn, cuaRsMcpPort, cuaRsMcpToken, MCP_CATALOG, allForumMcpServerNames, requiredForumMcpServers, REQUIRED_FORUM_MCP_SERVERS, optionalForumMcpServers, nodeMcpEntries;
1182
1194
  var init_mcp_config = __esm(() => {
1183
1195
  init_canonical_bridge_config();
1184
1196
  init_runtime_spec();
@@ -1188,6 +1200,7 @@ var init_mcp_config = __esm(() => {
1188
1200
  init_logger();
1189
1201
  init_mcp_catalog_policy();
1190
1202
  init_capability();
1203
+ init_mcp_transport();
1191
1204
  _playwrightUnavailableLastNotifiedAt = new Map;
1192
1205
  _PLAYWRIGHT_UNAVAILABLE_COOLDOWN_MS = 5 * 60000;
1193
1206
  _playwrightUnavailableThisTurn = new Set;
@@ -1199,7 +1212,7 @@ var init_mcp_config = __esm(() => {
1199
1212
  const owner = browserOwnerForContext({ userId, session, topicId });
1200
1213
  if (!owner)
1201
1214
  return null;
1202
- return playwrightTransport(playwrightPort, owner, playwrightCapability, agent);
1215
+ return buildPlaywrightMcpTransport(playwrightPort, owner, playwrightCapability, agent);
1203
1216
  }
1204
1217
  _markPlaywrightUnavailable({
1205
1218
  userId,
@@ -2426,7 +2439,7 @@ var init_claude_registry = __esm(() => {
2426
2439
  });
2427
2440
 
2428
2441
  // ../../packages/core/src/version.ts
2429
- var NEGOTIUM_VERSION = "0.5.2";
2442
+ var NEGOTIUM_VERSION = "0.5.4";
2430
2443
 
2431
2444
  // ../../packages/core/src/agents/codex-native-multi-agent.ts
2432
2445
  import { spawn as spawn2 } from "child_process";
@@ -19156,4 +19169,4 @@ export {
19156
19169
  DEFAULT_SELF_CONFIG_PRODUCT
19157
19170
  };
19158
19171
 
19159
- //# debugId=1B25D75C87B2239164756E2164756E21
19172
+ //# debugId=DB614B6BA7F0CF2B64756E2164756E21