From 0e0f71c6087806418c48ff61c08e69910439308e Mon Sep 17 00:00:00 2001 From: gitfromwildan <201965665+gitfromwildan@users.noreply.github.com> Date: Thu, 19 Nov 2026 07:26:10 +0700 Subject: [PATCH] docs: follow the post-merge code in milestone status and parity The fixes that landed on top of #7 and #8, and #9, moved or changed code these documents cite: - Five path:line citations pointed at the wrong line (bedrock_from_env, the embedding model resolution and request, install_database_user_provider, and JwtGuard::logout). - A failed sync dispatch is dead-lettered through the configured default queue connection, not a connection literally named database. - The OpenAI embedding default applies only to OpenAI's own endpoint, and a Bedrock embeddings call without BEDROCK_EMBEDDING_MODEL is a configuration error. --- .../modules/identity-access/auth.md | 2 +- docs/laravel-parity.md | 6 ++--- docs/milestones.md | 22 +++++++++---------- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/.agents/documents/application/modules/identity-access/auth.md b/.agents/documents/application/modules/identity-access/auth.md index 83ad2b3..0d319d1 100644 --- a/.agents/documents/application/modules/identity-access/auth.md +++ b/.agents/documents/application/modules/identity-access/auth.md @@ -133,7 +133,7 @@ enum AuthError { GuardMismatch{ expected:String, actual:String }, BadCredentials > **As-built note (2026-11-18):** the Status column was checked against the source tree on this date; the Component and Description columns are the original plan and are unchanged. `Done` means every element named in the row exists in reachable non-test code (for a Tests row: a test exists for each named case). Tests were read, not run. Live status: `docs/milestones.md`. > > Open items: -> - `F-M3-AUTH-01` — `login`, `parse`, and `refresh` are real over `jsonwebtoken` HS256 + Argon2; `logout` is a no-op with no revocation or deny-list (`crates/rustasea-auth/src/jwt.rs:270`), and `refresh` does not invalidate the old token. The runnable app wires only `SessionGuard`. +> - `F-M3-AUTH-01` — `login`, `parse`, and `refresh` are real over `jsonwebtoken` HS256 + Argon2; `logout` is a no-op with no revocation or deny-list (`crates/rustasea-auth/src/jwt.rs:267`), and `refresh` does not invalidate the old token. The runnable app wires only `SessionGuard`. ## 10. Cross-References - API: [api-auth](../../api/identity-access/api-auth.md) diff --git a/docs/laravel-parity.md b/docs/laravel-parity.md index a1ecc0f..8e8b740 100644 --- a/docs/laravel-parity.md +++ b/docs/laravel-parity.md @@ -1,6 +1,6 @@ # RustaSea × Laravel 13.x — API-Surface Parity Map -> **Last updated:** 2026-11-18 +> **Last updated:** 2026-11-19 > **Scope:** Maps the Laravel 13.x **API surface** (namespaces, contracts/interfaces, traits, notable classes) to RustaSea crates/modules, with an adoption status per row. > **Companion docs:** [`docs/laravel-13-research.md`](laravel-13-research.md) (feature-level research) · [`docs/milestones.md`](milestones.md) (M0–M6 implementation status). @@ -71,7 +71,7 @@ It is the API-surface parity layer. It is intentionally **not** a 1:1 inventory | `Illuminate\Bus` | `rustasea-queue` (`BatchHandle`, `BatchId`) | **Partial** | Batch handles plus a durable `DatabaseBatchRepository` over the `job_batches` table (`crates/rustasea-queue/src/batch_db.rs:77`). | | `lorisleiva/laravel-actions` | `rustasea-action` (`Action`, `ActionController`, `ActionJob`, `ActionCommand`, `ActionListener`) | **Partial** | One action unit invoked from HTTP/queue/CLI/events with validate/authorize hooks; `make:action` generator; scaffold auth actions demonstrate the pattern (ADOPT-028). | | `Laravel\Horizon` | `rustasea-queue-dashboard` (`DashboardConfig`, `sampler`, `QueueMetricsHistory`) | **Partial** | Queue dashboard (`/queue`): live depth/age, `queue_metrics` history + retention, failed-job retry/forget, worker heartbeats; feature `queue-dashboard` (ADOPT-021). No supervisor/balancing/auto-scaling yet. | -| `Illuminate\Auth` | `rustasea-auth` (`AuthManager`, `Guard`, `JwtGuard`, `SessionGuard`) | **Partial** | JWT/CSRF/throttle real; session guard real over `tower-sessions` (`crates/rustasea-auth/src/session.rs:99`) with an in-memory default store and a database store (`crates/rustasea-auth/src/session/database.rs:74`); users resolve through the database-backed `DatabaseUserProvider` (`crates/rustasea-auth/src/users/provider/database.rs:49`), which the runnable app installs at boot when the `users` table exists (`crates/rustasea-app/src/bootstrap/auth.rs:320`). | +| `Illuminate\Auth` | `rustasea-auth` (`AuthManager`, `Guard`, `JwtGuard`, `SessionGuard`) | **Partial** | JWT/CSRF/throttle real; session guard real over `tower-sessions` (`crates/rustasea-auth/src/session.rs:99`) with an in-memory default store and a database store (`crates/rustasea-auth/src/session/database.rs:74`); users resolve through the database-backed `DatabaseUserProvider` (`crates/rustasea-auth/src/users/provider/database.rs:49`), which the runnable app installs at boot when the `users` table exists (`crates/rustasea-app/src/bootstrap/auth.rs:333`). | | `Illuminate\Auth\Access` | `rustasea-router` (`AuthorizeRegistry`, `AuthorizeResource`, `#[authorize]` metadata) | **Adopted** | `#[authorize]` metadata is resolved and enforced at dispatch: `Router::authorize_meta` consumes the macro-emitted tuple (`crates/rustasea-router/src/authorize.rs:216`), and `apply_authorize` wraps the route in a fail-closed authorization layer (`crates/rustasea-router/src/dispatch.rs:135`). | | `Illuminate\Validation` | `rustasea-validation` (`Validatable`, `Rules`, `ErrorBag`, `FormRequest`) | **Partial** | Rules + ErrorBag + form requests real; DB presence verifier absent. | | `Illuminate\Hashing` | `rustasea-auth` (`PasswordVerifier`, `Argon2Verifier`) | **Partial** | Argon2 verifier real; no hasher manager / rehash policy. | @@ -97,7 +97,7 @@ It is the API-surface parity layer. It is intentionally **not** a 1:1 inventory | `pestphp/pest-plugin-browser` | `rustasea-testing` (`Browser`, `ServerHandle`, `BrowserError`) | **Partial** | Feature-gated WebDriver harness (feature `browser`, `fantoccini`) with Dusk-style `visit`/`fill`/`click`/`select`/`check`/`press`/`wait_for`/`assert_see` helpers, an ephemeral axum `ServerHandle`, and failure screenshots. Auto-skips when `WEBDRIVER_URL` is unreachable rather than failing the default run; `make:test --browser` scaffolds a test (ADOPT-029). No DevTools protocol, parallel browser pool, or Vite integration. | | `Illuminate\Image` | rustasea-image (Image, ImageBuilder, ImageTransformJob) | Partial | Fluent pipeline (resize/fit/cover/thumbnail/crop/rotate/watermark text+image), EXIF auto-orient, jpeg/png/webp/gif/bmp/tiff encode, storage round-trip + queued transforms (ADOPT-024). No GD/Imagick drivers or animated webp/gif transforms. | | `Illuminate\JsonSchema` | — | **Planned** | No JSON-schema contract. | -| AI SDK (`laravel/ai`, separate package) | `rustasea-ai` (`AiProvider`, `Agent`, `Tool`) | **Partial** | Provider-agnostic traits real; the agent runtime echoes the prompt and never calls a provider (`crates/rustasea-ai/src/agent.rs:247`); real HTTP-backed OpenAI-style and Anthropic adapters plus a deterministic in-process provider kept for tests (feature `ai`; `crates/rustasea-ai/src/providers/mod.rs:27`, `adapters.rs:50`). Gemini and Bedrock are served through their OpenAI-compatible endpoints (`crates/rustasea-ai/src/providers/client.rs:225`, `:376`); the provider-native APIs are not implemented. Provider-backed embeddings send a dedicated embedding model (`crates/rustasea-ai/src/embed.rs:18`, `providers/client.rs:246`); the engine-agnostic `rustasea-search::Str` keeps a deterministic stub fallback (`crates/rustasea-search/src/embeddings.rs:97`). | +| AI SDK (`laravel/ai`, separate package) | `rustasea-ai` (`AiProvider`, `Agent`, `Tool`) | **Partial** | Provider-agnostic traits real; the agent runtime echoes the prompt and never calls a provider (`crates/rustasea-ai/src/agent.rs:247`); real HTTP-backed OpenAI-style and Anthropic adapters plus a deterministic in-process provider kept for tests (feature `ai`; `crates/rustasea-ai/src/providers/mod.rs:27`, `adapters.rs:50`). Gemini and Bedrock are served through their OpenAI-compatible endpoints (`crates/rustasea-ai/src/providers/client.rs:225`, `:382`); the provider-native APIs are not implemented. Provider-backed embeddings send a dedicated embedding model (`crates/rustasea-ai/src/embed.rs:18`, `providers/client.rs:246`), and Bedrock requires `BEDROCK_EMBEDDING_MODEL`; the engine-agnostic `rustasea-search::Str` keeps a deterministic stub fallback (`crates/rustasea-search/src/embeddings.rs:97`). | | `spatie/laravel-permission` | `rustasea-auth::rbac` (`Role`, `RbacRegistry`, `HasRoles`, `PermissionResolver`) | **Adopted** | Role/permission assignment with cached permission lookups and a `PermissionResolver` the ability `Gate` consults after its defined abilities (ADOPT-001; `crates/rustasea-auth/src/rbac/{mod,role,registry,has_roles}.rs`). | | `spatie/laravel-activitylog` | `rustasea-activitylog` (`ActivityLogger`, `ActivityEvent`) | **Adopted** | Model-change audit trail with JSON property diffs and an optional `batch_uuid`, built on the ORM `#[logs_activity]` seam and persisted to the `audit_log` table (ADOPT-002; `crates/rustasea-activitylog/src/{lib,recorder,model}.rs`). | | `rappasoft/laravel-authentication-log` | `rustasea-authlog` (`AuthenticationLogLogger`, `NewDeviceNotifier`) | **Adopted** | One row per login/failed/lockout/logout with client IP and `User-Agent`; an unknown-IP login triggers a queued new-device notification (ADOPT-003; `crates/rustasea-authlog/src/{lib,recorder,notifier}.rs`). | diff --git a/docs/milestones.md b/docs/milestones.md index e44cab5..09213fa 100644 --- a/docs/milestones.md +++ b/docs/milestones.md @@ -1,6 +1,6 @@ # RustaSea Milestone Status -> **Last updated:** 2026-11-18 +> **Last updated:** 2026-11-19 > **Scope:** Authoritative done / partial / missing status for milestones **M0–M6**, plus the **gap-closure program** progress (P0–P5). ## Purpose @@ -44,9 +44,9 @@ section records the reason. | **M1** | Routing & HTTP | **Partial** | Router DSL + controller dispatch real (`crates/rustasea-router/src/dispatch.rs:23`, `:62`); `route:list` renders the live 6-column table published at boot via `RouteSource` (`crates/rustasea-cli/src/routes.rs:19`, `:33`; `crates/rustasea-app/src/bootstrap/app.rs:57`; `crates/rustasea-cli/src/commands/inspect.rs:44`); `show:model` now parses `app/models/{snake}.rs` with `syn` for source-level metadata (`crates/rustasea-cli/src/model_inspect.rs:123`, `:217`; `crates/rustasea-cli/src/commands/inspect.rs:129`) and the HTTP client idle (inter-chunk) timeout is now enforced for streamed bodies (`crates/rustasea-http/src/idle.rs:23`, wired in `crates/rustasea-http/src/lib.rs:448`) | | **M2** | ORM & Database | **Done** | Real sqlx pool + async execution (`crates/rustasea-orm/src/db.rs:24`, `db/exec.rs:72`); model CRUD (`model_ops.rs:28`), transactions (`tx.rs:67`), custom `Migrator` (`migration.rs:131`, `:189`), eager loading (`eager.rs:59`), pgvector (`vector.rs:100`); `raw`/`raw_sql` remain display-only fragments (`execution.rs:239`, `:247`) | | **M3** | Auth, Middleware & Validation | **Partial** | JWT/CSRF/throttle/validation real; session guard now real via `tower-sessions` (`crates/rustasea-auth/src/session.rs:99`, `impl Guard` `:291`, login `:296`, parse `:352`, refresh `:380`, logout `:408`); declarative attributes are consumed at runtime through `MiddlewareRegistry` (`crates/rustasea-router/src/metadata.rs:237`, `dispatch.rs:109`) and `AuthorizeRegistry` (`crates/rustasea-router/src/authorize.rs:216`, `dispatch.rs:135`); store-backed options are real: `DatabaseSessionStore` (`crates/rustasea-auth/src/session/database.rs:74`) and `DatabaseUserProvider` (`crates/rustasea-auth/src/users/provider/database.rs:49`); remaining: scaffolded apps do not wire the database user provider yet (see section) | -| **M4** | Queue, Cache, Scheduling & Events | **Partial** | Database/Redis queue drivers + worker + persistent failed jobs real (`crates/rustasea-queue/src/driver/database.rs:36`, `driver/worker.rs:75`); `queue:work`/`queue:failed`/`queue:retry` CLI real (`crates/rustasea-cli/src/commands/queue.rs:18`, `ops.rs:21`, `:72`); Redis cache store real behind the `redis` feature (`crates/rustasea-cache/src/redis.rs:155`); async listeners enqueue (`crates/rustasea-events/src/dispatcher.rs:82`); declarative job attributes bind through `JobPolicy` at registration (`crates/rustasea-queue/src/policy.rs:21`, `driver/worker.rs:66`); failed `sync` dispatches persist to `failed_jobs` through the registered `database` connection (`crates/rustasea-queue/src/driver.rs:192`); remaining: the scheduler cannot dispatch a due command (`crates/rustasea-schedule/src/scheduler.rs:146`), schedule pause state is per-process, and after-response events are never flushed (`crates/rustasea-events/src/dispatcher.rs:254`) | +| **M4** | Queue, Cache, Scheduling & Events | **Partial** | Database/Redis queue drivers + worker + persistent failed jobs real (`crates/rustasea-queue/src/driver/database.rs:36`, `driver/worker.rs:75`); `queue:work`/`queue:failed`/`queue:retry` CLI real (`crates/rustasea-cli/src/commands/queue.rs:18`, `ops.rs:21`, `:72`); Redis cache store real behind the `redis` feature (`crates/rustasea-cache/src/redis.rs:155`); async listeners enqueue (`crates/rustasea-events/src/dispatcher.rs:82`); declarative job attributes bind through `JobPolicy` at registration (`crates/rustasea-queue/src/policy.rs:21`, `driver/worker.rs:66`); failed `sync` dispatches are dead-lettered through the configured default queue connection (`crates/rustasea-queue/src/driver.rs:192`); remaining: the scheduler cannot dispatch a due command (`crates/rustasea-schedule/src/scheduler.rs:146`), schedule pause state is per-process, and after-response events are never flushed (`crates/rustasea-events/src/dispatcher.rs:254`) | | **M5** | DX, CLI & Testing | **Partial** | CLI + 17 `make:*` generators real (canonical `enum Kind`: `crates/rustasea-cli/src/generators/mod.rs:19-54`; registrations `crates/rustasea-cli/src/commands/mod.rs:17-31`); `cargo rustasea new --variant` real (`crates/rustasea/src/bin/cargo-rustasea.rs:46`); real `xtask` cycle detection (`xtask/src/cycles.rs:32`) and `xtask migrate` (`xtask/src/main.rs:37`); testcontainers-backed `PostgresTestDb` (`crates/rustasea-testing/src/fixtures.rs:49`) with a Docker-gated suite (`crates/rustasea/tests/feature/`); remaining: integration tests are opt-in and generated controllers still need manual route registration (`crates/rustasea-cli/src/generators/kinds/controller.rs:35`) | -| **M6** | Advanced (Broadcast, Search, FS, AI) | **Partial** | Broadcast WS/SSE, `object_store` storage + `config/storage.toml` facade, JSON:API, `rustasea-mail`, `rustasea-view`/`rustasea-inertia`/`rustasea-livewire`/`rustasea-scaffold`, real AI HTTP providers (`crates/rustasea-ai/src/providers/mod.rs:27`), AI queueing (`crates/rustasea-ai/src/queue.rs:41`), MCP client (`crates/rustasea-ai/src/mcp/client.rs:40`), and feature-gated pgvector (`crates/rustasea-search/src/pgvector.rs:24`) all real; Gemini/Bedrock served through their OpenAI-compatible endpoints (`crates/rustasea-ai/src/providers/client.rs:225`, `:376`); remaining: the agent runtime does not call a provider (`crates/rustasea-ai/src/agent.rs:247`), provider-native Gemini/Bedrock APIs, and `InProcessProvider` kept for deterministic tests | +| **M6** | Advanced (Broadcast, Search, FS, AI) | **Partial** | Broadcast WS/SSE, `object_store` storage + `config/storage.toml` facade, JSON:API, `rustasea-mail`, `rustasea-view`/`rustasea-inertia`/`rustasea-livewire`/`rustasea-scaffold`, real AI HTTP providers (`crates/rustasea-ai/src/providers/mod.rs:27`), AI queueing (`crates/rustasea-ai/src/queue.rs:41`), MCP client (`crates/rustasea-ai/src/mcp/client.rs:40`), and feature-gated pgvector (`crates/rustasea-search/src/pgvector.rs:24`) all real; Gemini/Bedrock served through their OpenAI-compatible endpoints (`crates/rustasea-ai/src/providers/client.rs:225`, `:382`); remaining: the agent runtime does not call a provider (`crates/rustasea-ai/src/agent.rs:247`), provider-native Gemini/Bedrock APIs, and `InProcessProvider` kept for deterministic tests | --- @@ -73,7 +73,7 @@ database, cache, or queue bindings are installed in the container at boot. **Partial (reason)** - The runnable app's `AppServiceProvider` binds only environment-derived defaults (environment name, password policy, destructive-command guard) — `crates/rustasea-app/src/bootstrap/providers.rs:124`; `AuthServiceProvider` installs the session guard (`:173`). -- The config loader is mounted at boot (`crates/rustasea-foundation/src/lib.rs:309`, read back through `Application::config` `:299`), but no database pool, cache manager, or queue driver is bound in the container; features that need a pool connect on their own (the queue dashboard, and the database user provider — `crates/rustasea-app/src/bootstrap/auth.rs:320`). +- The config loader is mounted at boot (`crates/rustasea-foundation/src/lib.rs:309`, read back through `Application::config` `:299`), but no database pool, cache manager, or queue driver is bound in the container; features that need a pool connect on their own (the queue dashboard, and the database user provider — `crates/rustasea-app/src/bootstrap/auth.rs:333`). - `graceful` waits for `SIGTERM`/`SIGINT` but ignores its timeout argument (`crates/rustasea-foundation/src/shutdown.rs:6`); the only enforced drain is axum's graceful shutdown, which has no timeout. - The root `bootstrap/` directory is an uncompiled skeleton mirror; its `AppServiceProvider` is a no-op (`bootstrap/providers.rs:17`). The compiled bootstrap is `crates/rustasea-app/src/bootstrap/`. @@ -189,9 +189,9 @@ configured, and scaffolded apps do not wire the database user provider yet. **Partial (reason)** - The default session store is in-memory (`MemoryStore`). `driver = "database"` in `config/session.toml` selects the persistent `DatabaseSessionStore` (`crates/rustasea-auth/src/session/database.rs:74`), built by `SessionGuard::from_config_database` (`crates/rustasea-auth/src/session.rs:155`); the `redis` driver is rejected at load time. -- The guard's default synchronous lookup is the fail-closed `StaticLookup` (`crates/rustasea-auth/src/session.rs:194`). The database-backed `DatabaseUserProvider` (`crates/rustasea-auth/src/users/provider/database.rs:49`) covers registration, login, password reset, verification, and profile updates over the `users` table; the runnable app installs it at boot when the default guard's provider is ORM-backed and the table exists (`crates/rustasea-app/src/bootstrap/auth.rs:320`, called from `crates/rustasea-app/src/main.rs:32`). +- The guard's default synchronous lookup is the fail-closed `StaticLookup` (`crates/rustasea-auth/src/session.rs:194`). The database-backed `DatabaseUserProvider` (`crates/rustasea-auth/src/users/provider/database.rs:49`) covers registration, login, password reset, verification, and profile updates over the `users` table; the runnable app installs it at boot when the default guard's provider is ORM-backed and the table exists (`crates/rustasea-app/src/bootstrap/auth.rs:333`, called from `crates/rustasea-app/src/main.rs:32`). - `DatabaseUserProvider` is exercised on SQLite only (`crates/rustasea-auth/tests/database_user_provider.rs`); it has not been run against Postgres or MySQL. -- `JwtGuard::logout` is a no-op with no revocation or deny-list (`crates/rustasea-auth/src/jwt.rs:270`). +- `JwtGuard::logout` is a no-op with no revocation or deny-list (`crates/rustasea-auth/src/jwt.rs:267`). - The `in:` / `in_array:` rule parses each list item as JSON and drops what does not parse (`crates/rustasea-validation/src/rules/support.rs:134`), so a bare-word list such as `in:admin,editor` yields an empty allow-list and rejects every value; numbers and quoted strings work. - The deserialization allow-list (`SessionPolicy::allow`) is defined but not called; `cache.serializable_classes` is parsed and unused (`crates/rustasea-cache/src/config.rs:191`). @@ -217,8 +217,8 @@ the scheduler exist; the gap-closure program added real `database`/`redis` queue drivers with a worker loop, persistent failed jobs, `queue:work`/ `queue:failed`/`queue:retry` CLI, a real feature-gated Redis cache store, queue-backed async listeners, and a runtime consumer for the declarative job -attributes. A failed inline `sync` dispatch is persisted through the `database` -connection when one is registered. Remaining: the scheduler cannot run a due +attributes. A failed inline `sync` dispatch is dead-lettered through the +configured default queue connection when its driver is registered. Remaining: the scheduler cannot run a due command, its pause state is not shared across processes, and events buffered by `dispatchAfterResponse` are never delivered. @@ -241,7 +241,7 @@ command, its pause state is not shared across processes, and events buffered by - Schedule pause state is a process-local `RwLock` (`crates/rustasea-schedule/src/pause.rs:28`), not stored in the cache or database, so `schedule:pause` in one process does not reach another. `on_one_server` records a flag and a `lock_key` (`crates/rustasea-schedule/src/command.rs:46`) but no lock is taken. - `dispatchAfterResponse` only buffers into `EventSink` (`crates/rustasea-events/src/dispatcher.rs:254`); no non-test code drains it, so listeners for after-response events never run. `Dispatcher::dispatch` returns `EventError::Unhandled` when an event has no listener (`:244`), which also makes `schedule:pause` / `schedule:resume` report an error when nothing listens for `SchedulePaused` / `ScheduleResumed`. - `Queue::chain` runs its jobs inline on the caller's task and never goes through a routed driver (`crates/rustasea-queue/src/registry.rs:175`). -- A failed `sync` dispatch is written to the `failed_jobs` table only when a `database` connection is registered (`dead_letter_sync`, `crates/rustasea-queue/src/driver.rs:192`; callers `crates/rustasea-queue/src/registry.rs:150`, `:186`). Without one, or when the insert fails, it falls back to the process-local list (`crates/rustasea-queue/src/driver.rs:174`), which does not survive the process. +- A failed `sync` dispatch is dead-lettered through the configured default queue connection, or `database` when the queue config names none, and reaches the `failed_jobs` table only when that connection's registered driver is the database driver (`dead_letter_sync`, `crates/rustasea-queue/src/driver.rs:192`, connection resolved at `:201`; callers `crates/rustasea-queue/src/registry.rs:150`, `:186`). Without one, or when the insert fails, it falls back to the process-local list (`crates/rustasea-queue/src/driver.rs:174`), which does not survive the process. - `JobAttempted` and `QueueBusy` are defined (`crates/rustasea-events/src/event.rs:32`, `:51`) but nothing emits them. **Missing** @@ -354,8 +354,8 @@ AI provider is kept for tests. - Timezone mapping (ADOPT-006, `glhd/laravel-timezone-mapper` parity): `crates/rustasea-timezone`: IANA validation plus a deterministic user-timezone resolution chain (stored preference, session, request header, app default) and UTC/local formatting helpers (`crates/rustasea-timezone/src/{lib,mapper}.rs`). **Partial (reason)** -- Gemini and Bedrock resolve to their OpenAI-compatible endpoints only (`crates/rustasea-ai/src/providers/client.rs:225`, `bedrock_from_env` `:376`): chat completions, streaming, and embeddings in the OpenAI wire format, with `GEMINI_API_KEY` / a Bedrock API key (`AWS_BEARER_TOKEN_BEDROCK`). The provider-native APIs (Gemini `generateContent`, Bedrock Converse with SigV4) are not implemented. Neither provider has been called against the live service from this repository. -- Provider-backed embeddings are real: `StrToEmbeddings` (`crates/rustasea-ai/src/embed.rs:18`) calls `AiProvider::embeddings`, and the HTTP adapter sends the configured embedding model (`crates/rustasea-ai/src/providers/client.rs:246`, `:313`; `crates/rustasea-ai/src/providers/openai.rs:155`). The engine-agnostic `Str::to_embeddings` in `rustasea-search` still falls back to a deterministic hashing stub when its closure yields no vector (`crates/rustasea-search/src/embeddings.rs:97`). +- Gemini and Bedrock resolve to their OpenAI-compatible endpoints only (`crates/rustasea-ai/src/providers/client.rs:225`, `bedrock_from_env` `:382`): chat completions, streaming, and embeddings in the OpenAI wire format, with `GEMINI_API_KEY` / a Bedrock API key (`AWS_BEARER_TOKEN_BEDROCK`). The provider-native APIs (Gemini `generateContent`, Bedrock Converse with SigV4) are not implemented. Neither provider has been called against the live service from this repository. +- Provider-backed embeddings are real: `StrToEmbeddings` (`crates/rustasea-ai/src/embed.rs:18`) calls `AiProvider::embeddings`, and the HTTP adapter sends the configured embedding model (`crates/rustasea-ai/src/providers/client.rs:246`, `:317`; `crates/rustasea-ai/src/providers/openai.rs:163`). The model comes from `_EMBEDDING_MODEL`, then a built-in default for `gemini`, `mistral`, and `openai` (the OpenAI default applies only to OpenAI's own endpoint, not a custom `OPENAI_BASE_URL`), then the chat model. Bedrock has no built-in default: an embeddings call without `BEDROCK_EMBEDDING_MODEL` returns a configuration error (`crates/rustasea-ai/src/providers/openai.rs:157`). The engine-agnostic `Str::to_embeddings` in `rustasea-search` still falls back to a deterministic hashing stub when its closure yields no vector (`crates/rustasea-search/src/embeddings.rs:97`). - `InProcessProvider` remains for deterministic tests — `crates/rustasea-ai/src/adapters.rs:50`. - The agent runtime does not call a model: `Agent::run_inner` echoes the prompt and runs a tool only when the prompt literally contains `tool:name(args)` (`crates/rustasea-ai/src/agent.rs:247`), so `Agent::run`, `prompt_stream`, and the queued `AgentRunJob` never reach an `AiProvider` even though the HTTP providers are real. `provider_from_env` returns a boxed provider that `Ai::register` cannot take directly. - Image, audio, rerank, and files exist only on the in-process stand-in; the HTTP adapters cover text, streaming, and (OpenAI-style only) embeddings. `AiProvider` has no `vector_stores` method.