* feat(cli): add ironclaw models subcommands (list/status/set/set-provider)
Implements model management CLI (part of #83):
- `models list [provider] [--verbose] [--json]` — list providers; fetches
live model list from the provider API when a specific provider is given
- `models status [--json]` — show active provider/model
- `models set <model>` — set default model with validation
- `models set-provider <id> [--model <name>]` — set provider with alias
normalization
- fix conflicts
* fix(deps): update tar to 0.4.45 (RUSTSEC-2026-0067, RUSTSEC-2026-0068)
---------
Co-authored-by: firat.sertgoz <[email protected]>
Part of #83
Static discovery of lifecycle hooks from bundled (audit_log) and plugin
(WASM *.capabilities.json sidecar) sources. Supports --verbose and
--json output. Workspace hooks (DB-stored) noted but omitted without
DB connection.
[skip-regression-check]
Co-authored-by: [email protected] <[email protected]>
* feat(llm): add OpenAI Codex backend config and OAuth session manager
Add OpenAiCodex as a new LLM backend variant with config for auth
endpoint, API base URL, client ID, and session persistence path.
The session manager implements OpenAI's device code auth flow
(headless-friendly, no browser required on the server) with automatic
token refresh, following the same persistence pattern as the existing
NEAR AI session manager.
Closes#742
Co-Authored-By: Claude Opus 4.6 <[email protected]>
* feat(llm): add Responses API client and token-refreshing decorator
Native Responses API client for chatgpt.com/backend-api/codex/responses,
the endpoint that works with ChatGPT subscription tokens. Handles SSE
streaming, text completions, and tool call round-trips.
Token-refreshing decorator wraps the provider to pre-emptively refresh
OAuth tokens before API calls and retry once on auth failures. Reports
zero cost since billing is through subscription.
Co-Authored-By: Claude Opus 4.6 <[email protected]>
* feat(llm): wire OpenAI Codex into provider factory, CLI, and setup wizard
Connect the new provider to the LLM factory, add openai_codex to the
CLI --backend flag, and add it as an option in the onboarding wizard.
Co-Authored-By: Claude Opus 4.6 <[email protected]>
* fix(llm): address PR #744 review feedback (20 items)
Review fixes for the OpenAI Codex provider PR:
- Remove dead `generate_pkce()` code (device flow gets PKCE from server)
- Fix `refresh_tokens()` to use `.form()` instead of `.json()` per OAuth spec
- Inline codex dispatch into `build_provider_chain()` (single async function,
no separate `assemble_provider_chain()` helper — matches main's pattern)
- Remove Clone from `OpenAiCodexSession`, restrict fields to `pub(crate)`
- Propagate HTTP client builder error instead of silent fallback
- Redact device code response body from debug log
- Change `set_model()` in TokenRefreshingProvider to delegate to inner
- Replace hardcoded `/tmp/` test path with `tempfile::tempdir()`
- Accept `request_timeout_secs` from config instead of hardcoded 300s
- Parse `Retry-After` header on 429 responses (matches nearai_chat.rs pattern)
- Reuse `normalize_schema_strict()` for Codex tool definitions
- Add warning log for dropped image attachments
- Add doc comments on `list_models()` and `include` field
- Add `OPENAI_CODEX_API_URL` to `.env.example`
- Fix codex error message in `create_llm_provider()` for clarity
- Revert unrelated `.worktrees` addition to `.gitignore`
- Update `src/llm/CLAUDE.md` with Codex provider docs
[skip-regression-check]
Co-Authored-By: Claude Opus 4.6 <[email protected]>
* fix: address review feedback and harden OpenAI Codex provider (takeover #744)
Security:
- Add SSRF validation (validate_base_url) on OPENAI_CODEX_AUTH_URL and
OPENAI_CODEX_API_URL, matching the pattern used by all other base URL
configs (regression test for #1103 included)
Correctness:
- Add missing cache_write_multiplier() and cache_read_discount() trait
delegation in TokenRefreshingProvider
- Cap device-code polling backoff at 60s to prevent unbounded interval
growth on repeated 429 responses
- Default expires_in to 3600s when server returns 0, preventing
immediately-expired sessions
- Fix pre-existing SseEvent::JobResult missing fallback_deliverable field
in job_monitor.rs tests
Cleanup:
- Extract duplicated make_test_jwt() and test_codex_config() into shared
codex_test_helpers module
Co-Authored-By: Sanjeev-S <[email protected]>
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
* fix: address PR review feedback on OpenAI Codex provider (#1461)
- Login command now resolves OPENAI_CODEX_* env overrides even when
LLM_BACKEND isn't set to openai_codex (Copilot review)
- Setup wizard "Keep current provider?" for codex no longer re-triggers
device code login — mirrors Bedrock's keep-and-return pattern (Copilot)
- Revert provider init log from info back to debug (Copilot)
- Add warning log when token expires_in=0, before defaulting to 3600s
(Gemini review)
Co-Authored-By: Sanjeev-S <[email protected]>
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
---------
Co-authored-by: Sanjeev Suresh <[email protected]>
Co-authored-by: Claude Opus 4.6 <[email protected]>
* feat(cli): add cron subcommand for managing scheduled routines
Rebase onto staging branch and address collaborator review:
- Fix .unwrap_or(None) → proper error propagation in set_enabled()
- Add --yes/-y flag for non-interactive deletion with confirmation prompt
- Add --json flag for machine-readable output in list and history
- Preserve error context chain with {e:#} in run_cron_cli()
Note: GATEWAY_USER_ID is trusted from the environment; future work may
add authentication for multi-tenant deployments.
* fix(cli): reject invalid cron timezones
* refactor(cli): rename cron subcommand to routines
The system manages all routine types (cron, webhook, event, manual),
not just cron schedules. Rename the CLI subcommand to reflect this:
- `ironclaw cron` -> `ironclaw routines` (with `cron` as hidden alias)
- List shows all routines by default, add --trigger filter
- Remove cron-trigger-only validation
- Simplify require_routine helper (no trigger type check)
Co-Authored-By: Claude Opus 4.6 <[email protected]>
---------
Co-authored-by: reidliu41 <[email protected]>
Co-authored-by: Claude Opus 4.6 <[email protected]>