@brainbase-labs/cli 0.8.1 → 0.8.3

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.
Files changed (2) hide show
  1. package/dist/index.js +28 -3
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -29449,7 +29449,7 @@ function padStart(s, n) {
29449
29449
  // package.json
29450
29450
  var package_default = {
29451
29451
  name: "@brainbase-labs/cli",
29452
- version: "0.8.1",
29452
+ version: "0.8.3",
29453
29453
  description: "Pack, share, and install agent templates across harnesses (Claude Code, Codex, ...).",
29454
29454
  type: "module",
29455
29455
  bin: {
@@ -36201,6 +36201,31 @@ function stringify(obj, { maxDepth = 1000, numbersAsFloat = false } = {}) {
36201
36201
 
36202
36202
  // src/harnesses/codex/config-toml.ts
36203
36203
  import path14 from "node:path";
36204
+ function normalizeCodexMcpEntry(entry) {
36205
+ const out = { ...entry };
36206
+ delete out.is_enabled;
36207
+ const hasUrl = typeof out.url === "string" && out.url.length > 0;
36208
+ if (hasUrl) {
36209
+ delete out.command;
36210
+ delete out.args;
36211
+ delete out.env;
36212
+ if (out.headers && typeof out.headers === "object" && !isEmptyObject(out.headers)) {
36213
+ out.http_headers = out.headers;
36214
+ }
36215
+ delete out.headers;
36216
+ } else {
36217
+ delete out.url;
36218
+ delete out.headers;
36219
+ if (Array.isArray(out.args) && out.args.length === 0)
36220
+ delete out.args;
36221
+ if (isEmptyObject(out.env))
36222
+ delete out.env;
36223
+ }
36224
+ return out;
36225
+ }
36226
+ function isEmptyObject(v2) {
36227
+ return !!v2 && typeof v2 === "object" && Object.keys(v2).length === 0;
36228
+ }
36204
36229
  function readCodexConfig(file) {
36205
36230
  if (!exists(file))
36206
36231
  return {};
@@ -36594,7 +36619,7 @@ async function installMcp2(comp, opts, ctx) {
36594
36619
  }
36595
36620
  }
36596
36621
  }
36597
- setMcpServer2(config, comp.slug, resolveMcpEnvTemplates(payload));
36622
+ setMcpServer2(config, comp.slug, normalizeCodexMcpEntry(resolveMcpEnvTemplates(payload)));
36598
36623
  return {
36599
36624
  type: "mcp",
36600
36625
  slug: comp.slug,
@@ -54337,7 +54362,7 @@ async function runAgentUnpack(cwd2, args) {
54337
54362
  slug: entry.name,
54338
54363
  scope,
54339
54364
  rootDir: compDir,
54340
- payload,
54365
+ payload: proxifyMcpPayload(payload),
54341
54366
  checksum: ""
54342
54367
  });
54343
54368
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brainbase-labs/cli",
3
- "version": "0.8.1",
3
+ "version": "0.8.3",
4
4
  "description": "Pack, share, and install agent templates across harnesses (Claude Code, Codex, ...).",
5
5
  "type": "module",
6
6
  "bin": {