agental 0.36.0 → 0.37.0

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/cli.js +19 -12
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -7411,7 +7411,7 @@ import { parseArgs } from "node:util";
7411
7411
 
7412
7412
  // ../src/cli-build.ts
7413
7413
  var PUBLISHED = true;
7414
- var CLI_VERSION = true ? "0.36.0" : "dev";
7414
+ var CLI_VERSION = true ? "0.37.0" : "dev";
7415
7415
  var DEFAULT_API_URL = true ? "https://agental.io" : "http://127.0.0.1:8741";
7416
7416
  var PACKAGE_NAME = "agental";
7417
7417
  var USER_AGENT = `agental-cli/${CLI_VERSION}`;
@@ -8538,12 +8538,14 @@ function placesFrom(env = process.env) {
8538
8538
  home,
8539
8539
  config: env["XDG_CONFIG_HOME"]?.trim() || path2.join(home, ".config"),
8540
8540
  claudeDir: env["CLAUDE_CONFIG_DIR"]?.trim() || path2.join(home, ".claude"),
8541
- codexDir: env["CODEX_HOME"]?.trim() || path2.join(home, ".codex")
8541
+ codexDir: env["CODEX_HOME"]?.trim() || path2.join(home, ".codex"),
8542
+ grokDir: env["GROK_HOME"]?.trim() || path2.join(home, ".grok")
8542
8543
  };
8543
8544
  }
8544
8545
  var SIGN_IN = {
8545
8546
  "Claude Code": "/mcp, then agental, then Authenticate",
8546
8547
  Codex: "codex mcp login agental",
8548
+ "Grok Build": "/mcps in grok, then agental",
8547
8549
  Cursor: "Settings \u203A MCP, turn agental on, then log in",
8548
8550
  Windsurf: "its MCP servers list, then agental",
8549
8551
  "Gemini CLI": "/mcp auth agental",
@@ -8606,30 +8608,30 @@ function addToJson(agent, places, url) {
8606
8608
  `);
8607
8609
  return { agent: agent.agent, did: "added" };
8608
8610
  }
8609
- function codexHas(text) {
8611
+ function tomlHasConnector(text) {
8610
8612
  const has = /^\s*\[\s*mcp_servers\s*\.\s*["']?agental["']?\s*[\].]/m.test(text) || /^\s*mcp_servers\s*\.\s*["']?agental["']?\s*[.=]/m.test(text) || /^\s*\[\s*mcp_servers\s*\]/m.test(text) && /^\s*["']?agental["']?\s*[.=]/m.test(text);
8611
8613
  if (has) {
8612
8614
  return "agental";
8613
8615
  }
8614
8616
  return /^\s*mcp_servers\s*=/m.test(text) ? "inline" : null;
8615
8617
  }
8616
- function addToCodex(places, url) {
8617
- if (!existsSync(places.codexDir)) {
8618
+ function addToToml(agent, folder, url) {
8619
+ if (!existsSync(folder)) {
8618
8620
  return null;
8619
8621
  }
8620
- const file = path2.join(places.codexDir, "config.toml");
8622
+ const file = path2.join(folder, "config.toml");
8621
8623
  const text = existsSync(file) ? readFileSync2(file, "utf8") : "";
8622
- const has = codexHas(text);
8624
+ const has = tomlHasConnector(text);
8623
8625
  if (has === "agental") {
8624
- return { agent: "Codex", did: "already" };
8626
+ return { agent, did: "already" };
8625
8627
  }
8626
8628
  if (has === "inline") {
8627
- return { agent: "Codex", did: "left", why: `${file} lists its servers inline, so it was left as it is: add agental = { url = "${url}" } to them` };
8629
+ return { agent, did: "left", why: `${file} lists its servers inline, so it was left as it is: add agental = { url = "${url}" } to them` };
8628
8630
  }
8629
8631
  const eol = text.includes("\r\n") ? "\r\n" : "\n";
8630
8632
  const lead = text === "" ? "" : text.endsWith("\n") ? eol : eol + eol;
8631
8633
  replaceFile(file, `${text}${lead}[mcp_servers.${CONNECTOR_NAME}]${eol}url = "${url}"${eol}`);
8632
- return { agent: "Codex", did: "added" };
8634
+ return { agent, did: "added" };
8633
8635
  }
8634
8636
  function run(command2, args, cwd) {
8635
8637
  return new Promise((resolve) => {
@@ -8667,7 +8669,11 @@ async function step(agent, add) {
8667
8669
  }
8668
8670
  }
8669
8671
  async function addConnector(url, places = placesFrom()) {
8670
- const outcomes = [await step("Claude Code", () => addToClaudeCode(places, url)), await step("Codex", () => addToCodex(places, url))];
8672
+ const outcomes = [
8673
+ await step("Claude Code", () => addToClaudeCode(places, url)),
8674
+ await step("Codex", () => addToToml("Codex", places.codexDir, url)),
8675
+ await step("Grok Build", () => addToToml("Grok Build", places.grokDir, url))
8676
+ ];
8671
8677
  for (const agent of JSON_AGENTS) {
8672
8678
  outcomes.push(await step(agent.agent, () => addToJson(agent, places, url)));
8673
8679
  }
@@ -11503,7 +11509,8 @@ var LIFECYCLE_EVENTS = [
11503
11509
  "sandbox.labels_changed",
11504
11510
  "sandbox.low_cpu",
11505
11511
  "sandbox.upgraded",
11506
- "sandbox.reclaim_chance"
11512
+ "sandbox.reclaim_chance",
11513
+ "sandbox.lost"
11507
11514
  ];
11508
11515
  var WEBHOOK_EVENTS = [...LIFECYCLE_EVENTS, "prompt.created"];
11509
11516
  var EMAIL_EVENTS = ["email.received", "email.delivered", "email.bounced"];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agental",
3
- "version": "0.36.0",
3
+ "version": "0.37.0",
4
4
  "description": "The agental command: Linux sandboxes for your agents, from the terminal. npx agental@latest signs you in and installs the agent skills.",
5
5
  "license": "MIT",
6
6
  "author": "VERTIXER LTD",