@elvatis_com/openclaw-cli-bridge-elvatis 0.2.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.
@@ -0,0 +1,31 @@
1
+ # CONVENTIONS.md — openclaw-cli-bridge-elvatis
2
+
3
+ ## Language & Runtime
4
+ - TypeScript strict mode, ESM (`"type": "module"`)
5
+ - Node 16 module resolution (`"moduleResolution": "Node16"`)
6
+ - Target: ES2022
7
+
8
+ ## Package
9
+ - Scope: `@elvatis_com/openclaw-cli-bridge-elvatis`
10
+ - Plugin ID: `openclaw-cli-bridge-elvatis`
11
+ - Providers declared: `["openai-codex"]`
12
+
13
+ ## File Layout
14
+ ```
15
+ .ai/handoff/ ← AAHP protocol files (this folder)
16
+ src/ ← per-CLI auth modules (codex-auth.ts, gemini-auth.ts, ...)
17
+ index.ts ← plugin entry point (registerProvider calls)
18
+ openclaw.plugin.json ← manifest
19
+ package.json / tsconfig.json
20
+ ```
21
+
22
+ ## Code Style
23
+ - Named exports from `src/`, default export from `index.ts`
24
+ - No secrets printed to logs — redact tokens with `[REDACTED]`
25
+ - Auth files accessed read-only
26
+ - Error messages must include actionable fix hint (e.g. "Run 'codex login' and retry")
27
+
28
+ ## Release Checklist (mandatory for every publish)
29
+ 1. GitHub tag + release (elvatis org)
30
+ 2. `npm publish --access public`
31
+ 3. `clawhub publish`
@@ -0,0 +1,74 @@
1
+ # [PROJECT]: Build Dashboard
2
+
3
+ > Single source of truth for build health, test coverage, and pipeline state.
4
+ > Updated by agents at the end of every completed task.
5
+
6
+ ---
7
+
8
+ ## 🏗️ Services / Components
9
+
10
+ | Name | Version | Build | Tests | Status | Notes |
11
+ |------|---------|-------|-------|--------|-------|
12
+ | service-a | - | ✅ | - | ✅ | |
13
+ | service-b | - | ✅ | 42/42 ✅ | ✅ | |
14
+ | service-c | - | ❌ | - | 🔴 Broken | See LOG.md |
15
+
16
+ **Legend:** ✅ passing · ❌ failing · 🔵 stub/mock · ⏳ pending · 🔴 blocked
17
+
18
+ ---
19
+
20
+ ## 🧪 Test Coverage
21
+
22
+ | Suite | Tests | Status | Last Run |
23
+ |-------|-------|--------|----------|
24
+ | unit | - | - | - |
25
+ | integration | - | - | - |
26
+ | e2e | - | - | - |
27
+
28
+ ---
29
+
30
+ ## 🚀 Infrastructure / Deployment
31
+
32
+ | Component | Status | Blocker |
33
+ |-----------|--------|---------|
34
+ | Local dev stack | ✅ | - |
35
+ | Staging | ⏳ Not deployed | Needs credentials |
36
+ | Production | ⏳ Not deployed | Needs credentials |
37
+
38
+ ---
39
+
40
+ ## 🤖 Pipeline State
41
+
42
+ | Field | Value |
43
+ |-------|-------|
44
+ | Current task | - |
45
+ | Phase | idle |
46
+ | Last completed | - |
47
+ | Rate limit | None |
48
+
49
+ ---
50
+
51
+ ## 📋 Open Tasks (strategic priority)
52
+
53
+ | ID | Task | Priority | Blocked by | Ready? |
54
+ |----|------|----------|-----------|--------|
55
+ | T-001 | Describe task here | 🔴 HIGH | - | ✅ Ready |
56
+ | T-002 | Another task | 🟠 MEDIUM | Waiting for X | 🔴 Blocked |
57
+
58
+ ---
59
+
60
+ ## 🔄 Update Instructions (for agents)
61
+
62
+ After completing any task:
63
+
64
+ 1. Update the relevant row to ✅ with current date
65
+ 2. Update test counts
66
+ 3. Update "Pipeline State"
67
+ 4. Move completed task out of "Open Tasks"
68
+ 5. Add newly discovered tasks with correct priority
69
+
70
+ **Pipeline rules:**
71
+ - Blocked task → skip, take next unblocked
72
+ - All tasks blocked → notify the project owner
73
+ - Notify project owner only on **fully completed tasks**, not phase transitions
74
+ - On test failures: attempt 1–2 self-fixes before escalating
@@ -0,0 +1,10 @@
1
+ # [PROJECT]: Agent Journal -Archive
2
+
3
+ > **Archived entries from LOG.md.**
4
+ > When LOG.md exceeds 10 entries, older entries are moved here.
5
+ > This file is for human review and forensics, not routine agent consumption.
6
+ > Agents should only read this file when investigating historical decisions.
7
+
8
+ ---
9
+
10
+ <!-- Archived entries are prepended below this line -->
@@ -0,0 +1,28 @@
1
+ # LOG.md — openclaw-cli-bridge-elvatis
2
+
3
+ ## 2026-03-07 — Session 1 (gpt-5.3-codex / sonnet)
4
+
5
+ **Major progress**
6
+ - Implemented and verified Codex auth bridge for provider `openai-codex`.
7
+ - Resolved "Unknown provider openai-codex" by registering provider in plugin.
8
+ - Added `.gitignore` for build artifacts + secrets.
9
+ - Created GitHub repo under `elvatis`: https://github.com/elvatis/openclaw-cli-bridge-elvatis
10
+ - Pushed initial release code and follow-up fix for AAHP version label.
11
+
12
+ **Architecture upgrade**
13
+ - Added full request-bridge components:
14
+ - `src/cli-runner.ts`
15
+ - `src/proxy-server.ts`
16
+ - `src/config-patcher.ts`
17
+ - Updated plugin to `0.2.0` conceptually (manifest), with phase split:
18
+ - Phase 1: auth bridge (`openai-codex`)
19
+ - Phase 2: HTTP proxy + vllm mapping (`cli-gemini/*`, `cli-claude/*`)
20
+
21
+ **Operational notes**
22
+ - `openai-codex/gpt-5.4` returns 401 missing scope `model.request`.
23
+ - `openai-codex/gpt-5.3-codex` selected as current dev model.
24
+ - Self-heal startup warning investigated; startup cleanup delay increased in `openclaw-self-healing-elvatis`.
25
+
26
+ **Next**
27
+ - Validate proxy endpoints + live vllm model calls end-to-end.
28
+ - Then release pipeline (GitHub tag, npm, ClawHub).
@@ -0,0 +1,35 @@
1
+ {
2
+ "aahp_version": "3.0",
3
+ "project": "openclaw-cli-bridge-elvatis",
4
+ "last_session": {
5
+ "agent": "openai-codex/gpt-5.3-codex",
6
+ "session_id": "main",
7
+ "timestamp": "2026-03-07T21:29:00Z",
8
+ "commit": "16fca7c",
9
+ "phase": "integration",
10
+ "duration_minutes": 60
11
+ },
12
+ "files": {
13
+ "STATUS.md": { "checksum": "sha256:tbd", "updated": "2026-03-07T21:29:00Z", "lines": 0, "summary": "Auth bridge done; request bridge implemented; pending runtime validation." },
14
+ "NEXT_ACTIONS.md": { "checksum": "sha256:tbd", "updated": "2026-03-07T21:29:00Z", "lines": 0, "summary": "Top priority: validate proxy + vllm model calls, then release pipeline." },
15
+ "LOG.md": { "checksum": "sha256:tbd", "updated": "2026-03-07T21:29:00Z", "lines": 0, "summary": "Repo created, provider fixed, proxy architecture added." },
16
+ "DASHBOARD.md": { "checksum": "sha256:tbd", "updated": "2026-03-07T21:29:00Z", "lines": 0, "summary": "2 bridge phases implemented; validation pending." },
17
+ "TRUST.md": { "checksum": "sha256:tbd", "updated": "2026-03-07T21:29:00Z", "lines": 0, "summary": "No secret output, local-only proxy, explicit scope constraints." },
18
+ "CONVENTIONS.md": { "checksum": "sha256:tbd", "updated": "2026-03-07T21:29:00Z", "lines": 0, "summary": "TypeScript strict + AAHP v3 + multi-platform release discipline." },
19
+ "WORKFLOW.md": { "checksum": "sha256:tbd", "updated": "2026-03-07T21:29:00Z", "lines": 0, "summary": "Validate → harden → publish (GitHub, npm, ClawHub)." }
20
+ },
21
+ "quick_context": "Codex auth bridge is working and repo is live. gpt-5.4 fails due to OpenAI scope limitations, so development is on gpt-5.3-codex. Request-bridge code for Gemini/Claude via vllm-compatible proxy exists; next is end-to-end validation.",
22
+ "token_budget": { "manifest_only": 90, "manifest_plus_core": 350, "full_read": 700 },
23
+ "next_task_id": 9,
24
+ "tasks": {
25
+ "T-001": { "title": "Scaffold plugin structure + AAHP handoff", "status": "done", "priority": "high", "depends_on": [], "created": "2026-03-07T20:40:00Z", "completed": "2026-03-07T20:56:00Z" },
26
+ "T-002": { "title": "Implement openai-codex provider (Codex CLI auth bridge)", "status": "done", "priority": "high", "depends_on": ["T-001"], "created": "2026-03-07T20:40:00Z", "completed": "2026-03-07T20:56:00Z" },
27
+ "T-003": { "title": "Test auth flow: openclaw models auth login --provider openai-codex", "status": "done", "priority": "high", "depends_on": ["T-002"], "created": "2026-03-07T20:56:00Z", "completed": "2026-03-07T21:01:00Z" },
28
+ "T-004": { "title": "Verify model call: test gpt-5.2 or gpt-5.3-codex responds", "status": "done", "priority": "high", "depends_on": ["T-003"], "created": "2026-03-07T20:56:00Z", "completed": "2026-03-07T21:27:00Z" },
29
+ "T-005": { "title": "Implement Gemini CLI request bridge", "status": "done", "priority": "medium", "depends_on": ["T-003"], "created": "2026-03-07T20:56:00Z", "completed": "2026-03-07T21:23:00Z" },
30
+ "T-006": { "title": "Implement Claude Code CLI request bridge", "status": "done", "priority": "medium", "depends_on": ["T-003"], "created": "2026-03-07T20:56:00Z", "completed": "2026-03-07T21:23:00Z" },
31
+ "T-007": { "title": "Create GitHub repo and push initial code", "status": "done", "priority": "high", "depends_on": ["T-004"], "created": "2026-03-07T21:20:00Z", "completed": "2026-03-07T21:24:00Z" },
32
+ "T-008": { "title": "Validate proxy endpoints + vllm model calls end-to-end", "status": "ready", "priority": "high", "depends_on": ["T-005", "T-006"], "created": "2026-03-07T21:29:00Z" },
33
+ "T-009": { "title": "Publish to npm + ClawHub", "status": "blocked", "priority": "medium", "depends_on": ["T-008"], "created": "2026-03-07T21:29:00Z" }
34
+ }
35
+ }
@@ -0,0 +1,37 @@
1
+ # NEXT_ACTIONS.md — openclaw-cli-bridge-elvatis
2
+
3
+ _Last updated: 2026-03-07_
4
+
5
+ ## Immediate
6
+
7
+ 1. **Validate proxy runtime**
8
+ - Confirm local proxy listens on `127.0.0.1:31337`
9
+ - Test:
10
+ - `GET /v1/models`
11
+ - `POST /v1/chat/completions` (non-stream + stream)
12
+
13
+ 2. **Validate OpenClaw vllm integration**
14
+ - Ensure `models.providers.vllm` contains `cli-gemini/*` + `cli-claude/*`
15
+ - Send live test prompts with:
16
+ - `vllm/cli-gemini/gemini-2.5-pro`
17
+ - `vllm/cli-claude/claude-sonnet-4-6`
18
+
19
+ 3. **Stability pass**
20
+ - Confirm timeout behavior and error mapping (CLI exits, malformed output)
21
+ - Confirm no secret leakage in logs
22
+
23
+ ## Next
24
+
25
+ 4. **Self-heal integration**
26
+ - Update `openclaw-self-healing-elvatis` model order for dev-safe default fallback chain.
27
+
28
+ 5. **Release pipeline**
29
+ - GitHub release tag
30
+ - npm publish (`@elvatis_com/openclaw-cli-bridge-elvatis`)
31
+ - ClawHub publish
32
+
33
+ ## Optional hardening
34
+
35
+ - Add unit tests for prompt formatter + model router
36
+ - Add proxy auth key rotation via config
37
+ - Add explicit model allowlist for CLI execution
@@ -0,0 +1,32 @@
1
+ # STATUS.md — openclaw-cli-bridge-elvatis
2
+
3
+ _Last updated: 2026-03-07 by gpt-5.3-codex_
4
+
5
+ ## Phase: Integration & validation
6
+
7
+ ## What is done
8
+
9
+ - ✅ Repo created: `https://github.com/elvatis/openclaw-cli-bridge-elvatis`
10
+ - ✅ AAHP handoff in `.ai/handoff/` (v3)
11
+ - ✅ Phase 1 implemented: `openai-codex` auth bridge via `~/.codex/auth.json`
12
+ - ✅ Auth flow verified with `openclaw models auth login --provider openai-codex`
13
+ - ✅ Session model switching verified (`gpt-5.3-codex` works)
14
+ - ✅ Phase 2 implemented: local OpenAI-compatible proxy server (`src/proxy-server.ts`)
15
+ - ✅ CLI routing implemented (`src/cli-runner.ts`):
16
+ - `cli-gemini/*` → `gemini`
17
+ - `cli-claude/*` → `claude`
18
+ - ✅ Config patcher implemented (`src/config-patcher.ts`) for `models.providers.vllm`
19
+
20
+ ## Current state
21
+
22
+ - Development model pinned to: `openai-codex/gpt-5.3-codex`
23
+ - `openai-codex/gpt-5.4` still fails with OpenAI scope error (`model.request`)
24
+ - Plugin should now support both:
25
+ - direct Codex OAuth auth bridge
26
+ - vllm-based CLI request bridge (Gemini + Claude)
27
+
28
+ ## Open risks
29
+
30
+ - Need explicit runtime validation of proxy endpoints and vllm model calls.
31
+ - Config patcher writes `openclaw.json`; keep backup/doctor discipline before release.
32
+ - `gpt-5.4` scope limitation is external (OpenAI account/role/scope), not plugin code.
@@ -0,0 +1,69 @@
1
+ # [PROJECT]: Trust Register
2
+
3
+ > Tracks verification status of critical system properties.
4
+ > In multi-agent pipelines, hallucinations and drift are real risks.
5
+ > Every claim here has a confidence level tied to how it was verified.
6
+
7
+ ---
8
+
9
+ ## Confidence Levels
10
+
11
+ | Level | Meaning |
12
+ |-------|---------|
13
+ | **verified** | An agent executed code, ran tests, or observed output to confirm this |
14
+ | **assumed** | Derived from docs, config files, or chat, not directly tested |
15
+ | **untested** | Status unknown; needs verification |
16
+
17
+ ---
18
+
19
+ ## Build System
20
+
21
+ | Property | Status | Last Verified | Agent | Notes |
22
+ |----------|--------|---------------|-------|-------|
23
+ | `build` passes | untested | - | - | |
24
+ | `test` passes | untested | - | - | |
25
+ | `lint` passes | untested | - | - | |
26
+ | `type-check` passes | untested | - | - | |
27
+
28
+ ---
29
+
30
+ ## Infrastructure
31
+
32
+ | Property | Status | Last Verified | Agent | Notes |
33
+ |----------|--------|---------------|-------|-------|
34
+ | Local dev stack boots | untested | - | - | |
35
+ | All health endpoints respond | untested | - | - | |
36
+ | Database connection works | untested | - | - | |
37
+ | Auth flow completes | untested | - | - | |
38
+
39
+ ---
40
+
41
+ ## Integrations
42
+
43
+ | Property | Status | Last Verified | Agent | Notes |
44
+ |----------|--------|---------------|-------|-------|
45
+ | External API A reachable | untested | - | - | |
46
+ | Webhook delivery confirmed | untested | - | - | |
47
+
48
+ ---
49
+
50
+ ## Security
51
+
52
+ | Property | Status | Last Verified | Agent | Notes |
53
+ |----------|--------|---------------|-------|-------|
54
+ | No secrets in source | assumed | - | - | Pre-commit hooks configured |
55
+ | Auth tokens expire correctly | untested | - | - | |
56
+ | PII not logged | untested | - | - | |
57
+
58
+ ---
59
+
60
+ ## Update Rules (for agents)
61
+
62
+ - Change `untested` → `verified` only after **running actual code/tests**
63
+ - Change `assumed` → `verified` after direct confirmation
64
+ - Never downgrade `verified` without explaining why in `LOG.md`
65
+ - Add new rows when new system properties become critical
66
+
67
+ ---
68
+
69
+ *Trust degrades over time. Re-verify periodically, especially after major refactors.*
@@ -0,0 +1,152 @@
1
+ # [PROJECT]: Autonomous Multi-Agent Workflow
2
+
3
+ > Based on the [AAHP Protocol](https://github.com/homeofe/AAHP).
4
+ > No manual triggers. Agents read `handoff/DASHBOARD.md` and work autonomously.
5
+
6
+ ---
7
+
8
+ ## Agent Roles
9
+
10
+ | Agent | Model | Role | Responsibility |
11
+ |-------|-------|------|---------------|
12
+ | 🔭 Researcher | e.g. perplexity/sonar-pro | Researcher | OSS research, compliance checks, doc review |
13
+ | 🏛️ Architect | e.g. claude-opus | Architect | System design, ADRs, interface definitions |
14
+ | ⚙️ Implementer | e.g. claude-sonnet | Implementer | Code, tests, refactoring, commits |
15
+ | 💬 Reviewer | e.g. gpt-4 / second model | Reviewer | Second opinion, edge cases, security review |
16
+
17
+ > Adapt roles and models to your team's tooling.
18
+
19
+ ---
20
+
21
+ ## The Pipeline
22
+
23
+ ### Phase 1: Research & Context
24
+
25
+ ```
26
+ Reads: handoff/NEXT_ACTIONS.md or DASHBOARD.md (top unblocked task)
27
+ handoff/STATUS.md (current project state)
28
+
29
+ Does: Researches relevant OSS libraries / APIs / compliance requirements
30
+ Checks whether similar solutions already exist in the project
31
+ Clarifies ambiguities in the task
32
+
33
+ Writes: handoff/LOG.md -research findings + sources + recommendation
34
+ ```
35
+
36
+ ### Phase 2: Architecture Decision
37
+
38
+ ```
39
+ Reads: Research output from LOG.md
40
+ handoff/STATUS.md
41
+ Relevant source files, config, docs
42
+
43
+ Does: Decides architecture and interface design
44
+ Chooses branch name
45
+ Defines exactly what the Implementer should build
46
+
47
+ Writes: handoff/LOG.md -ADR (Architecture Decision Record)
48
+
49
+ ADR format:
50
+ ## [DATE] ADR: [Feature Name]
51
+ **Decision:** ...
52
+ **Rationale:** ...
53
+ **Consequences:** ...
54
+ **Branch:** feat/...
55
+ **Instructions for Implementer:** [numbered steps]
56
+ ```
57
+
58
+ ### Phase 3: Implementation
59
+
60
+ ```
61
+ Reads: ADR from LOG.md
62
+ CONTRIBUTING.md / CONVENTIONS.md (MANDATORY before first commit)
63
+
64
+ Does: Creates feature branch: git checkout -b feat/<scope>-<name>
65
+ Writes code + unit tests
66
+ Runs tests and type-check
67
+ Commits and pushes branch
68
+
69
+ Branch convention:
70
+ feat/<scope>-<short-name> → new feature
71
+ fix/<scope>-<short-name> → bug fix
72
+ docs/<scope>-<name> → documentation only
73
+
74
+ Commit format:
75
+ feat(scope): description [AAHP-auto]
76
+ fix(scope): description [AAHP-fix]
77
+ ```
78
+
79
+ ### Phase 4: Discussion Round
80
+
81
+ ```
82
+ All agents review the completed code on the feature branch.
83
+
84
+ Architect → "Does the implementation match the ADR?"
85
+ Reviewer → "What could be more robust, simpler, or more secure?"
86
+ Researcher → "Were all task items fulfilled? Any compliance concerns?"
87
+
88
+ Outcome:
89
+ - Minor fixes → Implementer fixes in the same branch
90
+ - Larger issues → New tasks added to NEXT_ACTIONS.md / DASHBOARD.md
91
+ - Everything documented in LOG.md
92
+ ```
93
+
94
+ ### Phase 5: Completion & Handoff
95
+
96
+ ```
97
+ DASHBOARD.md: Update build status, test counts, pipeline state
98
+ STATUS.md: Update changed system state (Verified / Assumed / Unknown)
99
+ LOG.md: Append session summary
100
+ NEXT_ACTIONS.md: Check off completed task, add newly discovered tasks
101
+
102
+ Git: Branch pushed, PR-ready
103
+ Notify: Project owner -only on fully completed tasks, not phase transitions
104
+ Format: "✅ [Feature] done -Branch: feat/... -Tests: X/X"
105
+ ```
106
+
107
+ ---
108
+
109
+ ## Autonomy Boundaries
110
+
111
+ | Allowed ✅ | Not allowed ❌ |
112
+ |-----------|--------------|
113
+ | Write & commit code | Push directly to `main` |
114
+ | Write & run tests | Install new dependencies without documenting |
115
+ | Push feature branches | Write secrets or PII into source |
116
+ | Research & propose OSS libraries | Call external APIs without credentials |
117
+ | Make architecture decisions | Perform production deployments |
118
+ | Break tests (when fixing identified bugs) | Delete tests without replacement |
119
+
120
+ ---
121
+
122
+ ## Task Selection Rules
123
+
124
+ 1. Read `DASHBOARD.md`, take the top task where `Ready? = ✅`
125
+ 2. If a task is **blocked** → skip it, take the next unblocked one
126
+ 3. If **all tasks are blocked** → notify the project owner, pause
127
+ 4. Never start a task without reading `STATUS.md` first
128
+ 5. After completing a task → always update `DASHBOARD.md` before stopping
129
+
130
+ ---
131
+
132
+ ## Error Handling
133
+
134
+ If an agent fails or is uncertain:
135
+ - Mark task as `(Unknown)` in `STATUS.md`
136
+ - Document the specific blocker in `LOG.md`
137
+ - Notify the project owner
138
+ - **Never proceed on assumptions when certainty is missing**
139
+
140
+ ---
141
+
142
+ ## Open Source First
143
+
144
+ Before any custom implementation:
145
+ 1. Researcher searches for existing OSS solutions
146
+ 2. Architect evaluates: build vs. OSS vs. fork
147
+ 3. Decision is documented in the ADR
148
+ 4. Custom builds must be: clean abstraction, testable, documented
149
+
150
+ ---
151
+
152
+ *This document lives in the repo and is continuously refined by the agents themselves.*
package/README.md ADDED
@@ -0,0 +1,84 @@
1
+ # openclaw-cli-bridge-elvatis
2
+
3
+ > OpenClaw plugin that bridges locally installed AI CLIs (Codex, Gemini, Claude Code) as model providers.
4
+
5
+ ## What it does
6
+
7
+ **Phase 1 — Auth bridge:** Registers the `openai-codex` provider using OAuth tokens already stored by the Codex CLI (`~/.codex/auth.json`). No re-login needed.
8
+
9
+ **Phase 2 — Request bridge:** Starts a local OpenAI-compatible HTTP proxy server (default port `31337`) and configures OpenClaw's `vllm` provider to route model calls through `gemini` and `claude` CLI subprocesses.
10
+
11
+ | Model reference | CLI invoked |
12
+ |---|---|
13
+ | `vllm/cli-gemini/gemini-2.5-pro` | `gemini -m gemini-2.5-pro -p "<prompt>"` |
14
+ | `vllm/cli-gemini/gemini-2.5-flash` | `gemini -m gemini-2.5-flash -p "<prompt>"` |
15
+ | `vllm/cli-claude/claude-opus-4-6` | `claude -p -m claude-opus-4-6 --output-format text "<prompt>"` |
16
+ | `vllm/cli-claude/claude-sonnet-4-6` | `claude -p -m claude-sonnet-4-6 --output-format text "<prompt>"` |
17
+
18
+ ## Requirements
19
+
20
+ - [OpenClaw](https://openclaw.ai) gateway running
21
+ - One or more of:
22
+ - [`@openai/codex`](https://github.com/openai/codex) — `npm i -g @openai/codex` + `codex login`
23
+ - [`@google/gemini-cli`](https://github.com/google-gemini/gemini-cli) — `npm i -g @google/gemini-cli` + `gemini auth`
24
+ - [`@anthropic-ai/claude-code`](https://github.com/anthropic-ai/claude-code) — `npm i -g @anthropic-ai/claude-code` + `claude auth`
25
+
26
+ ## Installation
27
+
28
+ ```bash
29
+ # Install from ClawHub (once published)
30
+ clawhub install openclaw-cli-bridge-elvatis
31
+
32
+ # Or load directly from this repo (development)
33
+ # Add to ~/.openclaw/openclaw.json:
34
+ # plugins.load.paths: ["<path-to-this-repo>"]
35
+ # plugins.allow: ["openclaw-cli-bridge-elvatis"]
36
+ # plugins.entries.openclaw-cli-bridge-elvatis: { "enabled": true }
37
+ ```
38
+
39
+ ## Auth setup (Phase 1 — Codex)
40
+
41
+ After enabling the plugin, register the Codex auth profile:
42
+
43
+ ```bash
44
+ openclaw models auth login --provider openai-codex
45
+ # Select: "Codex CLI (existing login)"
46
+ ```
47
+
48
+ The proxy server (Phase 2) starts automatically and patches `openclaw.json` with the `vllm` provider config. Restart the gateway to activate the new models.
49
+
50
+ ## Configuration
51
+
52
+ Add to your `plugins.entries.openclaw-cli-bridge-elvatis.config` in `~/.openclaw/openclaw.json`:
53
+
54
+ ```json5
55
+ {
56
+ "enableCodex": true, // register openai-codex from Codex CLI auth
57
+ "enableProxy": true, // start the local CLI proxy server
58
+ "proxyPort": 31337, // port for the proxy (default: 31337)
59
+ "proxyApiKey": "cli-bridge", // key used between OpenClaw and the proxy
60
+ "proxyTimeoutMs": 120000 // CLI timeout in ms (default: 2 min)
61
+ }
62
+ ```
63
+
64
+ ## Architecture
65
+
66
+ ```
67
+ OpenClaw agent
68
+
69
+ ├─ openai-codex/* ──► OpenAI API (auth via Codex CLI OAuth tokens)
70
+
71
+ └─ vllm/cli-gemini/* ─┐
72
+ vllm/cli-claude/* ─┤─► openclaw-cli-bridge-elvatis proxy (127.0.0.1:31337)
73
+ │ ├─ cli-gemini/* → gemini -m <model> -p "<prompt>"
74
+ │ └─ cli-claude/* → claude -p -m <model> "<prompt>"
75
+ └──────────────────────────────────────────────────────
76
+ ```
77
+
78
+ ## AAHP handoff
79
+
80
+ Project tracking lives in `.ai/handoff/` (AAHP v3 protocol).
81
+
82
+ ## License
83
+
84
+ MIT