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/agent-helpers.js +33 -27
- package/dist/agent-helpers.js.map +6 -5
- package/dist/browser-runtime.js +28 -2
- package/dist/browser-runtime.js.map +4 -3
- package/dist/{chunk-9wvrzxfz.js → chunk-n9g0wk3p.js} +27 -26
- package/dist/{chunk-9wvrzxfz.js.map → chunk-n9g0wk3p.js.map} +5 -4
- package/dist/hosted-agent.js +28 -27
- package/dist/hosted-agent.js.map +6 -5
- package/dist/main.js +33 -27
- package/dist/main.js.map +6 -5
- package/dist/mcp-factories.js +33 -27
- package/dist/mcp-factories.js.map +6 -5
- package/dist/registry.js +3 -3
- package/dist/registry.js.map +2 -2
- package/dist/rollout.js +1 -1
- package/dist/runtime/src/platform/mcp-config.ts +6 -28
- package/dist/runtime/src/platform/playwright/mcp-transport.ts +35 -0
- package/dist/runtime/src/platform/playwright/public-runtime.ts +1 -0
- package/dist/runtime/src/prompts/sessions/_shared-tools.md +1 -0
- package/dist/runtime/src/version.ts +1 -1
- package/dist/types/packages/core/src/platform/mcp-config.d.ts +2 -2
- package/dist/types/packages/core/src/platform/playwright/mcp-transport.d.ts +4 -0
- package/dist/types/packages/core/src/platform/playwright/public-runtime.d.ts +1 -0
- package/dist/types/packages/core/src/version.d.ts +1 -1
- package/package.json +1 -1
package/dist/hosted-agent.js
CHANGED
|
@@ -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,29 +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
|
-
if (agent === "maestro") {
|
|
962
|
-
return {
|
|
963
|
-
type: "http",
|
|
964
|
-
url: `http://127.0.0.1:${port}/mcp?${query}`,
|
|
965
|
-
headers: { "X-Browser-Capability": ownerCapability }
|
|
966
|
-
};
|
|
967
|
-
}
|
|
968
|
-
return {
|
|
969
|
-
type: "sse",
|
|
970
|
-
url: `http://127.0.0.1:${port}/sse?${query}`,
|
|
971
|
-
headers: { "X-Browser-Capability": ownerCapability }
|
|
972
|
-
};
|
|
973
|
-
}
|
|
974
975
|
function longLivedHttpMcp(agent, port) {
|
|
975
976
|
return agent === "codex" ? { url: `http://127.0.0.1:${port}/mcp` } : { type: "sse", url: `http://127.0.0.1:${port}/sse` };
|
|
976
977
|
}
|
|
@@ -1007,7 +1008,7 @@ var MCP_CATALOG = {
|
|
|
1007
1008
|
const owner = browserOwnerForContext({ userId, session, topicId });
|
|
1008
1009
|
if (!owner)
|
|
1009
1010
|
return null;
|
|
1010
|
-
return
|
|
1011
|
+
return buildPlaywrightMcpTransport(playwrightPort, owner, playwrightCapability, agent);
|
|
1011
1012
|
}
|
|
1012
1013
|
_markPlaywrightUnavailable({
|
|
1013
1014
|
userId,
|
|
@@ -2405,7 +2406,7 @@ import { tmpdir } from "os";
|
|
|
2405
2406
|
import { dirname as dirname5, join as join4 } from "path";
|
|
2406
2407
|
|
|
2407
2408
|
// ../../packages/core/src/version.ts
|
|
2408
|
-
var NEGOTIUM_VERSION = "0.5.
|
|
2409
|
+
var NEGOTIUM_VERSION = "0.5.4";
|
|
2409
2410
|
|
|
2410
2411
|
// ../../packages/core/src/agents/codex-native-multi-agent.ts
|
|
2411
2412
|
var moduleRequire = createRequire2(import.meta.url);
|
|
@@ -4264,4 +4265,4 @@ export {
|
|
|
4264
4265
|
buildClaudeDisallowedTools
|
|
4265
4266
|
};
|
|
4266
4267
|
|
|
4267
|
-
//# debugId=
|
|
4268
|
+
//# debugId=0A19A2D3DC09324C64756E2164756E21
|