Repository navigation
feat(computer): captcha_provider selects TypeSafe or Surplus for the captcha solver - #8733
Conversation
Update the vendored tinycomputer submodule to the latest upstream commit. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
Adds a `captcha_provider` field to the computer config so the captcha solver can run on either TypeSafe or Surplus Intelligence, defaulting to TypeSafe when unset. The settings patch normalises and validates the value, rejecting unknown providers with an error that lists the accepted options. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
The captcha solver can now use either TypeSafe or Surplus as its Jev provider, selected via a new `captcha_provider` setting that defaults to TypeSafe when unset. The provider's own API key is resolved for the chosen route, and unknown providers are rejected at config time and skipped with a warning at runtime. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
The captcha debug log now formats the provider directly into the message string instead of passing it as a structured field, keeping the log output unchanged while simplifying the call. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
The captcha solver section now describes the new `captcha_provider` setting, which chooses between TypeSafe and Surplus Intelligence for image challenges, along with the per-provider default models and the validation that rejects unknown values. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
Adds a test that update_computer_settings writes the selected captcha provider to the config file and that the schema exposes the captcha_provider input with its supported values. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
…date The update handler now writes a null captcha provider instead of the submitted value, and the test resolves the schema through the shared schema definitions. This keeps the stored provider from being overwritten by settings updates. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
The update handler was hardcoding captcha_provider to None, silently discarding any value supplied by the caller. It now passes through update.captcha_provider so the setting is actually saved. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
Update the vendored tinycomputer submodule to the latest upstream commit. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
The auto-commit hook recorded the in-progress tinycomputer checkout; the re-pin to the released v0.18.0 lands separately. Co-authored-by: Medulla <medulla@tinyhumans.ai>
Update the vendored tinycomputer submodule to the latest upstream commit. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Update the vendored tinycomputer submodule to the latest upstream commit. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
Update the vendored tinycomputer submodule to the latest upstream commit. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
Update the pinned tinycomputer module record and vendored submodule from 0.17.0 to 0.18.0, refreshing every platform archive name and checksum to match the new release. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
Bump the expected module version and bus contract version to 0.18.0 and (3, 3), and refresh the published asset filenames and checksums for every target so the registry contract test matches the new release. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
Update the locked versions of the tinycomputer workspace crates from 0.17.0 to 0.18.0 to match the new release. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
Update the locked tinycomputer-bus dependency from 0.17.0 to 0.18.0 in the app's Cargo.lock. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
🔵 Needs a closer look
Despite matching published archive pins, TinyComputer’s missing vendored source/gitlink requires human confirmation that the gitlink and locked host builds use v0.18.0/contract 3.3.
No open issues 🎉
What changed in this PR
Adds configurable TypeSafe or Surplus routing for OpenHuman’s captcha solver while keeping TypeSafe as the default. Provider execution remains in TinyComputer; OpenHuman handles configuration and credential selection.
Changes:
- Adds
captcha_providerto configuration and RPC updates, including normalization, validation, and provider-specific credentials. - Updates TinyComputer release pins and lockfiles to v0.18.0, with bus contract 3.3 expectations.
- Adds configuration and routing tests and documents provider selection and defaults.
| File | Description |
|---|---|
docs/gitbooks/en/developing/jev.md |
Documents captcha providers, credentials, and model defaults. |
crates/openhuman-core/src/modules/registry/records_computer.rs |
Pins v0.18.0 release assets and checksums. |
crates/openhuman-core/src/modules/registry_computer_release_tests.rs |
Updates release and contract expectations. |
crates/openhuman-core/src/modules/computer_config.rs |
Selects captcha provider and matching credentials. |
crates/openhuman-core/src/modules/computer_config_tests.rs |
Tests provider routing and missing-key behavior. |
crates/openhuman-core/src/config/schemas/schema_defs/agent.rs |
Documents the new RPC parameter. |
crates/openhuman-core/src/config/schemas/helpers.rs |
Adds the provider to RPC update parameters. |
crates/openhuman-core/src/config/schemas/controllers/agent.rs |
Forwards provider updates to configuration operations. |
crates/openhuman-core/src/config/schemas/controllers.rs |
Exposes the handler to unit tests. |
crates/openhuman-core/src/config/schemas/controllers_tests.rs |
Tests provider persistence and schema documentation. |
crates/openhuman-core/src/config/schema/computer.rs |
Defines and documents the optional provider setting. |
crates/openhuman-core/src/config/schema/computer_tests.rs |
Tests defaults and TOML round-tripping. |
crates/openhuman-core/src/config/ops/computer.rs |
Normalizes, validates, and applies provider updates. |
crates/openhuman-core/src/config/ops/computer_tests.rs |
Tests accepted spellings, reset, and rejection. |
crates/openhuman-app/Cargo.lock |
Updates the desktop bus dependency to v0.18.0. |
Cargo.lock |
Updates workspace TinyComputer packages to v0.18.0. |
Review effort: Balanced
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7ff4c3245a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
The browser automation capability's privacy destinations now list TypeSafe and Surplus Intelligence as recipients of captcha images, gated on the captcha solver being enabled, so the catalog accurately reflects where data can leave the device. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
|
On the 'needs a closer look' note: |
TinyComputer v0.18.0 re-pin
This PR pins TinyComputer v0.18.0 (tag commit
54aea142427d384aa38301c10d24038a1010acca, bus contract 3.3), which adds the Jev providersurplus.vendor/tinycomputeris at that gitlink, thetinycomputerregistry record uses the asset digests from the release'schecksum.toml, and the registry release test expects v0.18.0 and contract 3.3.Release: https://github.com/tinyhumansai/tinycomputer/releases/tag/v0.18.0
Related: tinyhumansai/tinycomputer#179, tinyhumansai/tinycomputer#181
What
Adds
[computer] captcha_provider, which picks where the captcha solver's image-reading Jev runs:type_safe, or the key left out: behaviour is byte-identical to today. The key comes from thetypesafecredential orTYPESAFE_API_KEY, and the section sent is{"jev":{"api_key","provider":"type_safe","model"?},"max_attempts"?}.surplus(Surplus Intelligence): the key comes from thesurpluscredential orSURPLUS_API_KEY, and the section sends"provider":"surplus".captcha_modelis sent only when it is set; otherwise the module defaults Surplus tojev-1.14. A TypeSafe key is never sent to Surplus. With no Surplus key there is nocaptchasection.config.update_computer_settingsacceptscaptcha_providerand normalises it (case,-/_, andtypesafeall map totype_safe). Empty restores the default. Any other value is refused withUnsupported captcha provider '<x>'. Use type_safe or surplus.[computer] captcha solver provider=<provider>, names the provider. It never includes the key.The host only owns the config. It talks to TinyComputer through the bus contract alone.
Tests
config/schema/computer_tests.rs: default is absent, and the setting round-trips through TOML.config/ops/computer_tests.rs: accepted spellings, empty resets, unknown values refused with the accepted list.config/schemas/controllers_tests.rs: anupdate_computer_settingsRPC persistscaptcha_provider, and the schema documents it.modules/computer_config_tests.rs: Surplus uses the Surplus key, sends the model only when set, and passes the attempt limit through. An explicittype_safeequals the default. Surplus without a key, or an unknown provider, sends no section.pnpm rust:layout: check-test-ownership fails on fouragent/test files, and it fails the same way on main. This PR doesn't touch those files.Docs
docs/gitbooks/en/developing/jev.mdSummary by CodeRabbit