agent-relay-server 0.4.13 → 0.4.15

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,75 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
-
4
- PACKAGE="${AGENT_RELAY_PACKAGE:-agent-relay-server@latest}"
5
- INSTALL_ARGS=(install)
6
-
7
- usage() {
8
- cat <<'EOF'
9
- Install Agent Relay for Codex.
10
-
11
- Usage:
12
- curl -fsSL https://unpkg.com/agent-relay-server@latest/codex/install-codex.sh | bash
13
- curl -fsSL https://unpkg.com/agent-relay-server@latest/codex/install-codex.sh | bash -s -- --alias
14
- curl -fsSL https://unpkg.com/agent-relay-server@latest/codex/install-codex.sh | bash -s -- --no-alias
15
-
16
- Options:
17
- --alias Install a PATH shim so plain `codex` starts with Agent Relay.
18
- --no-alias Keep plain `codex` unchanged. You can still use `codex-relay`.
19
- EOF
20
- }
21
-
22
- for arg in "$@"; do
23
- case "$arg" in
24
- --alias|--no-alias)
25
- INSTALL_ARGS+=("$arg")
26
- ;;
27
- -h|--help)
28
- usage
29
- exit 0
30
- ;;
31
- *)
32
- echo "Unknown option: $arg" >&2
33
- usage >&2
34
- exit 2
35
- ;;
36
- esac
37
- done
38
-
39
- if ! command -v bun >/dev/null 2>&1; then
40
- cat >&2 <<'EOF'
41
- Error: Bun is required to install Agent Relay for Codex.
42
-
43
- Install Bun first:
44
- curl -fsSL https://bun.sh/install | bash
45
-
46
- Then rerun this installer.
47
- EOF
48
- exit 1
49
- fi
50
-
51
- if ! command -v codex >/dev/null 2>&1; then
52
- cat >&2 <<'EOF'
53
- Error: Codex CLI is required before installing Agent Relay for Codex.
54
-
55
- Install and log in to Codex first, then rerun this installer.
56
- EOF
57
- exit 1
58
- fi
59
-
60
- if [[ " ${INSTALL_ARGS[*]} " != *" --alias "* && " ${INSTALL_ARGS[*]} " != *" --no-alias "* ]]; then
61
- if [[ "${AGENT_RELAY_CODEX_ALIAS:-}" == "1" || "${AGENT_RELAY_CODEX_ALIAS:-}" == "true" ]]; then
62
- INSTALL_ARGS+=(--alias)
63
- elif [[ -r /dev/tty && -w /dev/tty ]]; then
64
- printf 'Make plain `codex` start with Agent Relay? You can still use `codex-relay` either way. [y/N] ' >/dev/tty
65
- read -r answer </dev/tty || answer=""
66
- case "${answer,,}" in
67
- y|yes) INSTALL_ARGS+=(--alias) ;;
68
- *) INSTALL_ARGS+=(--no-alias) ;;
69
- esac
70
- else
71
- INSTALL_ARGS+=(--no-alias)
72
- fi
73
- fi
74
-
75
- exec bunx -p "$PACKAGE" agent-relay-codex "${INSTALL_ARGS[@]}"
@@ -1,20 +0,0 @@
1
- import { describe, expect, it } from "bun:test";
2
- import { loadConfig, parseThreadMode } from "./live-sidecar";
3
-
4
- describe("codex live sidecar config", () => {
5
- it("defaults to starting an isolated thread", () => {
6
- const config = loadConfig({
7
- CODEX_LIVE_CWD: "/tmp/agent-relay-test",
8
- });
9
-
10
- expect(config.threadMode).toBe("start");
11
- });
12
-
13
- it("only accepts known thread attachment modes", () => {
14
- expect(parseThreadMode("auto")).toBe("auto");
15
- expect(parseThreadMode("resume")).toBe("resume");
16
- expect(parseThreadMode("start")).toBe("start");
17
- expect(parseThreadMode("latest")).toBe("start");
18
- expect(parseThreadMode(undefined)).toBe("start");
19
- });
20
- });