Skip to content

feat: Durable Web Search golem:web-search API #39

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 22 commits into from

Conversation

SmartManoj
Copy link
Contributor

@SmartManoj SmartManoj commented Jun 17, 2025

closes #34
/claim #34

@SmartManoj SmartManoj changed the title Rename directory for windows compatibility Implement Durable Web Search golem:web-search API Jun 17, 2025
@SmartManoj SmartManoj marked this pull request as draft June 18, 2025 09:58
…s compatibility

- Fixed missing SearchMetadata fields in Bing provider
- Fixed unused import warnings in Serper and Brave providers
- Fixed WIT interface syntax (changed from export to include)
- Added component metadata to all provider Cargo.toml files
- Fixed deps.toml format and updated WIT dependencies
- Made directory names Windows-compatible (removed colons)
- Successfully built all 5 WASM components
- All providers now implement golem:web-search interface correctly
- Fixed macro crate references: changed 'crate::' to '$crate::' in all provider macros
- Removed unnecessary .clone() calls on Copy types (SafeSearchLevel)
- Applied cargo fmt formatting to all files
- All clippy warnings resolved
- cargo make check now passes successfully
@Rutik7066
Copy link
Contributor

@SmartManoj You can stop working on this and save tokens

@SmartManoj
Copy link
Contributor Author

You can stop working on this and save tokens

@Rutik7066, Thanks, but I’m continuing with this to understand and fix the integration issues. The token cost is worth the learning and potential improvement.

@Rutik7066
Copy link
Contributor

You can stop working on this and save tokens

@Rutik7066, Thanks, but I’m continuing with this to understand and fix the integration issues. The token cost is worth the learning and potential improvement.

?

openhands-agent and others added 7 commits June 20, 2025 14:42
…cies

- Create wit/test-websearch.wit file defining test-websearch-api interface
- Add golem:web-search dependency to test/wit/deps/ directory
- Fix websearch-google dependency path in test-websearch Cargo.toml
- Add defaultProfile to test-websearch golem.yaml configuration
- Remove unused component bindings from test-websearch Cargo.toml

Enables successful compilation of all test components including test-helper,
test-llm, and test-websearch. LLM components (anthropic, grok, openai,
openrouter, ollama) and test components now build successfully.
…_google components

- Updated websearch-google/wit/google.wit to include golem:web-search/web-search-library@1.0.0 world
- Modified wit_bindgen configuration in websearch-google/src/lib.rs to generate exports with proper interface mappings
- Fixed GoogleWebSearchProvider trait implementation to return SearchSession resource correctly
- Updated imports in websearch-google/src/client.rs to use crate:: paths
- Successfully resolved wac plug compatibility issue, allowing test_websearch.wasm to be combined with web_search_google.wasm
- Verified cargo make build-test-components completes successfully with all components building and plugging correctly
- Added build-websearch-google and build-websearch-google-portable tasks
- Added websearch-google to build and build-portable dependencies
- Added websearch-google to build-all and release-build-all scripts
- Added release-build-websearch-google and release-build-websearch-google-portable tasks
- Added websearch-google to release-build and release-build-portable dependencies
- This ensures web_search_google.wasm is built before test components need it
- Added explicit cargo-component build step for web-search-google in build-test-components task
- Added cargo-component installation to ensure tool is available
- This fixes CI issue where test components try to use web_search_google.wasm before it's built
- Removed problematic cargo-component installation that had GLIBC compatibility issues
- Added explicit cargo-component build step for web-search-google component
- This ensures web_search_google.wasm is available before test components try to use it in wac plug operations
- Addresses CI build failures where test components couldn't find the required dependency
- Add build-websearch-google step before build-ollama to resolve missing dependency
- Add wasm32-wasip1 target to Rust toolchain setup
- Update cargo-component version to 0.20.0 for compatibility
- Fixes "No such file or directory" error when wac plug tries to use web_search_google.wasm

The ollama test was failing because it depends on the web-search-google component
being built first, but the CI workflow wasn't building it in the correct order.
@SmartManoj SmartManoj changed the title Implement Durable Web Search golem:web-search API feat: Durable Web Search golem:web-search API Jun 20, 2025
- Standardize cargo-component version to 0.20.0 across all CI jobs
- Add wasm32-wasip1 target to all WASM build jobs for consistency
- Add cargo clean step to prevent cached component version conflicts
- Maintain websearch-google dependency build order

Fixes "cannot merge used type `input-stream` as it is expected to be from
interface `wasi:io/streams@0.2.0` but it is from interface `wasi:io/streams@0.2.3`"
error in wac plug command during ollama integration tests.

The issue was caused by different CI jobs using different cargo-component
versions (0.20.0 vs 0.21.1), resulting in components built with incompatible
WASI interface versions.
- Standardize cargo-component version to 0.20.0 across all CI jobs
- Add wasm32-wasip1 target to all WASM build jobs for consistency
- Add cargo clean step to prevent cached component version conflicts
- Synchronize golem-cli version to 1.2.3 in Makefile.toml and CI
- Update all test components to use cargo-component instead of cargo component
- Add wit dependency to build-test-components to sync WIT interfaces
- Install wit-deps-cli in CI for WIT dependency synchronization

Fixes 'cannot merge used type input-stream as it is expected to be from
interface wasi:io/streams@0.2.0 but it is from interface wasi:io/streams@0.2.3'
error in wac plug command during component merging.

The issue was caused by inconsistent tooling versions between main components
and test components, resulting in incompatible WASI interface versions.
The build-test-components task has a dependency on the wit task which
requires wit-deps-cli, but it wasn't installed in the CI job.
@SmartManoj SmartManoj marked this pull request as ready for review June 20, 2025 19:03
@jdegoes jdegoes closed this Jun 25, 2025
@SmartManoj
Copy link
Contributor Author

Still working on demo video. @jdegoes Closing on favor of #46?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement Durable Web Search golem:web-search API Across Different Providers in Rust
4 participants