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.
@@ -880,6 +880,31 @@ function browserOwnerCapability(capability, owner) {
880
880
  return createHmac3("sha256", capability).update(owner).digest("hex");
881
881
  }
882
882
 
883
+ // ../../packages/core/src/platform/playwright/mcp-transport.ts
884
+ var CODEX_BROWSER_CAPABILITY_ENV = "NEGOTIUM_BROWSER_CAPABILITY";
885
+ function buildPlaywrightMcpTransport(port, owner, capability, agent) {
886
+ const query = new URLSearchParams({ owner });
887
+ const ownerCapability = browserOwnerCapability(capability, owner);
888
+ if (agent === "codex") {
889
+ return {
890
+ url: `http://127.0.0.1:${port}/mcp?${query}`,
891
+ env_http_headers: { "X-Browser-Capability": CODEX_BROWSER_CAPABILITY_ENV }
892
+ };
893
+ }
894
+ if (agent === "maestro") {
895
+ return {
896
+ type: "http",
897
+ url: `http://127.0.0.1:${port}/mcp?${query}`,
898
+ headers: { "X-Browser-Capability": ownerCapability }
899
+ };
900
+ }
901
+ return {
902
+ type: "sse",
903
+ url: `http://127.0.0.1:${port}/sse?${query}`,
904
+ headers: { "X-Browser-Capability": ownerCapability }
905
+ };
906
+ }
907
+
883
908
  // ../../packages/core/src/platform/mcp-config.ts
884
909
  function buildStdioMcpServer(agent, serverFile, serverArgs, env) {
885
910
  if (agent === "codex") {
@@ -940,7 +965,6 @@ function _markPlaywrightUnavailable(ctx) {
940
965
  logger.warn({ err }, "playwright unavailable notifier threw");
941
966
  }
942
967
  }
943
- var CODEX_BROWSER_CAPABILITY_ENV = "NEGOTIUM_BROWSER_CAPABILITY";
944
968
  function browserOwnerForContext(ctx) {
945
969
  if (ctx.topicId)
946
970
  return `topic:${ctx.topicId}`;
@@ -948,22 +972,6 @@ function browserOwnerForContext(ctx) {
948
972
  return `user:${ctx.userId}:${ctx.session}`;
949
973
  return;
950
974
  }
951
- function playwrightTransport(port, owner, capability, agent) {
952
- const ownerCapability = browserOwnerCapability(capability, owner);
953
- if (agent === "codex") {
954
- const query2 = new URLSearchParams({ owner });
955
- return {
956
- url: `http://127.0.0.1:${port}/mcp?${query2}`,
957
- env_http_headers: { "X-Browser-Capability": CODEX_BROWSER_CAPABILITY_ENV }
958
- };
959
- }
960
- const query = new URLSearchParams({ owner });
961
- return {
962
- type: "sse",
963
- url: `http://127.0.0.1:${port}/sse?${query}`,
964
- headers: { "X-Browser-Capability": ownerCapability }
965
- };
966
- }
967
975
  function longLivedHttpMcp(agent, port) {
968
976
  return agent === "codex" ? { url: `http://127.0.0.1:${port}/mcp` } : { type: "sse", url: `http://127.0.0.1:${port}/sse` };
969
977
  }
@@ -1000,7 +1008,7 @@ var MCP_CATALOG = {
1000
1008
  const owner = browserOwnerForContext({ userId, session, topicId });
1001
1009
  if (!owner)
1002
1010
  return null;
1003
- return playwrightTransport(playwrightPort, owner, playwrightCapability, agent);
1011
+ return buildPlaywrightMcpTransport(playwrightPort, owner, playwrightCapability, agent);
1004
1012
  }
1005
1013
  _markPlaywrightUnavailable({
1006
1014
  userId,
@@ -2398,7 +2406,7 @@ import { tmpdir } from "os";
2398
2406
  import { dirname as dirname5, join as join4 } from "path";
2399
2407
 
2400
2408
  // ../../packages/core/src/version.ts
2401
- var NEGOTIUM_VERSION = "0.5.2";
2409
+ var NEGOTIUM_VERSION = "0.5.4";
2402
2410
 
2403
2411
  // ../../packages/core/src/agents/codex-native-multi-agent.ts
2404
2412
  var moduleRequire = createRequire2(import.meta.url);
@@ -4257,4 +4265,4 @@ export {
4257
4265
  buildClaudeDisallowedTools
4258
4266
  };
4259
4267
 
4260
- //# debugId=39899C5F770BFE5A64756E2164756E21
4268
+ //# debugId=0A19A2D3DC09324C64756E2164756E21