agent-relay-codex 0.10.18 → 0.10.20

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.
@@ -1,4 +1,11 @@
1
1
  #!/usr/bin/env bun
2
+ import { readFileSync } from "node:fs";
3
+ import { dirname, join } from "node:path";
4
+ import { fileURLToPath } from "node:url";
5
+
6
+ const __dirname = dirname(fileURLToPath(import.meta.url));
7
+ const pkg = JSON.parse(readFileSync(join(__dirname, "../package.json"), "utf8")) as { version?: string };
8
+ const VERSION = pkg.version || "0.0.0";
2
9
 
3
10
  const HELP = `
4
11
  agent-relay-codex
@@ -14,20 +21,50 @@ Usage:
14
21
 
15
22
  export function shouldBypassRelay(args: string[], env: Record<string, string | undefined> = process.env): boolean {
16
23
  if (env.AGENT_RELAY_DISABLED === "1") return true;
24
+ if (args.some((arg) => arg === "--help" || arg === "-h" || arg === "--version" || arg === "-V")) return true;
17
25
  const commands = args.filter((arg) => !arg.startsWith("-"));
18
- return ["exec", "e", "review", "plugin"].includes(commands[0] ?? "");
26
+ return [
27
+ "exec",
28
+ "e",
29
+ "review",
30
+ "login",
31
+ "logout",
32
+ "mcp",
33
+ "plugin",
34
+ "mcp-server",
35
+ "app-server",
36
+ "remote-control",
37
+ "completion",
38
+ "update",
39
+ "sandbox",
40
+ "debug",
41
+ "apply",
42
+ "a",
43
+ "cloud",
44
+ "exec-server",
45
+ "features",
46
+ "help",
47
+ ].includes(commands[0] ?? "");
19
48
  }
20
49
 
21
50
  export function removeAgentRelaySessionStartToml(input: string): string {
22
51
  const blocks = input.split(/\n(?=\[\[hooks\.)/g);
23
52
  return blocks
24
- .filter((block) => !/hooks\/session-start\.ts/.test(block) && !/agent-relay.*SessionStart/i.test(block))
53
+ .filter((block) =>
54
+ !/\.agent-relay\/codex\/package\/hooks\//.test(block) &&
55
+ !/agent-relay-codex.*hook/i.test(block) &&
56
+ !/agent-relay.*(SessionStart|UserPromptSubmit|Stop).*hook/i.test(block)
57
+ )
25
58
  .join("\n")
26
59
  .trimEnd() + "\n";
27
60
  }
28
61
 
29
62
  async function main(args = process.argv.slice(2)): Promise<void> {
30
63
  const command = args[0] ?? "help";
64
+ if (command === "--version" || command === "-v") {
65
+ console.log(VERSION);
66
+ return;
67
+ }
31
68
  if (command === "help" || command === "--help" || command === "-h") {
32
69
  console.log(HELP);
33
70
  return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-relay-codex",
3
- "version": "0.10.18",
3
+ "version": "0.10.20",
4
4
  "description": "Codex integration for Agent Relay — auto-registers sessions as agents and enables inter-agent messaging",
5
5
  "type": "module",
6
6
  "bin": {
@@ -45,6 +45,6 @@
45
45
  "bun": ">=1.0.0"
46
46
  },
47
47
  "dependencies": {
48
- "agent-relay-sdk": "0.2.0"
48
+ "agent-relay-sdk": "0.2.1"
49
49
  }
50
50
  }
@@ -1,12 +1,15 @@
1
1
  {
2
2
  "name": "agent-relay",
3
- "version": "0.10.18",
3
+ "version": "0.10.20",
4
4
  "description": "Agent Relay integration for Codex sessions",
5
5
  "author": {
6
6
  "name": "Edin Mujkanovic"
7
7
  },
8
8
  "repository": "https://github.com/edimuj/agent-relay",
9
9
  "license": "AGPL-3.0-or-later",
10
+ "agentRelayContracts": {
11
+ "providerPluginProtocol": 1
12
+ },
10
13
  "keywords": [
11
14
  "agent-relay",
12
15
  "multi-agent",