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.
@@ -2147,6 +2147,30 @@ setInterval(() => {
2147
2147
  logger.debug({ err: e }, "reapOrphanBrowsers sweep failed");
2148
2148
  }
2149
2149
  }, 30 * 60 * 1000).unref();
2150
+ // ../../packages/core/src/platform/playwright/mcp-transport.ts
2151
+ var CODEX_BROWSER_CAPABILITY_ENV = "NEGOTIUM_BROWSER_CAPABILITY";
2152
+ function buildPlaywrightMcpTransport(port, owner, capability, agent) {
2153
+ const query = new URLSearchParams({ owner });
2154
+ const ownerCapability = browserOwnerCapability(capability, owner);
2155
+ if (agent === "codex") {
2156
+ return {
2157
+ url: `http://127.0.0.1:${port}/mcp?${query}`,
2158
+ env_http_headers: { "X-Browser-Capability": CODEX_BROWSER_CAPABILITY_ENV }
2159
+ };
2160
+ }
2161
+ if (agent === "maestro") {
2162
+ return {
2163
+ type: "http",
2164
+ url: `http://127.0.0.1:${port}/mcp?${query}`,
2165
+ headers: { "X-Browser-Capability": ownerCapability }
2166
+ };
2167
+ }
2168
+ return {
2169
+ type: "sse",
2170
+ url: `http://127.0.0.1:${port}/sse?${query}`,
2171
+ headers: { "X-Browser-Capability": ownerCapability }
2172
+ };
2173
+ }
2150
2174
  // ../../packages/core/src/platform/playwright/profile-management.ts
2151
2175
  async function deleteManagedBrowserProfile(ownerId, rawProfile) {
2152
2176
  const profile = assertBrowserProfileDeletable(ownerId, rawProfile);
@@ -2201,7 +2225,9 @@ export {
2201
2225
  deleteManagedBrowserProfile,
2202
2226
  configurePlaywrightManagerHost,
2203
2227
  closeBrowserOwnerTabs,
2204
- browserProcessMatchesExpectedProfile
2228
+ buildPlaywrightMcpTransport,
2229
+ browserProcessMatchesExpectedProfile,
2230
+ CODEX_BROWSER_CAPABILITY_ENV
2205
2231
  };
2206
2232
 
2207
- //# debugId=0621D3C0957A021F64756E2164756E21
2233
+ //# debugId=4407C165120809FE64756E2164756E21