diff --git a/crates/goose-sdk/README.md b/crates/goose-sdk/README.md index 07a8eadadb..0334ae4bcc 100644 --- a/crates/goose-sdk/README.md +++ b/crates/goose-sdk/README.md @@ -9,8 +9,7 @@ callers construct declarative providers from JSON and stream provider completions. ```bash -just python # build bindings + run examples/uniffi/ping.py -just kotlin # build bindings + run examples/uniffi/Ping.kt +just python # build bindings + run examples/uniffi/provider.py +just kotlin # build bindings + run examples/uniffi/Provider.kt ``` -Both print `pong: aaif.io`. diff --git a/crates/goose-sdk/examples/uniffi/Ping.kt b/crates/goose-sdk/examples/uniffi/Ping.kt deleted file mode 100644 index 054e281375..0000000000 --- a/crates/goose-sdk/examples/uniffi/Ping.kt +++ /dev/null @@ -1,9 +0,0 @@ -package aaif.example - -import io.aaif.goose.Client - -fun main() { - val client = Client() - val pong = client.ping("aaif.io") - println(pong.message) -} diff --git a/crates/goose-sdk/examples/uniffi/ping.py b/crates/goose-sdk/examples/uniffi/ping.py deleted file mode 100644 index 07de552008..0000000000 --- a/crates/goose-sdk/examples/uniffi/ping.py +++ /dev/null @@ -1,21 +0,0 @@ -"""Minimal Goose SDK demo: ping the SDK and print the pong.""" - -from __future__ import annotations - -import sys -from pathlib import Path - -HERE = Path(__file__).resolve().parent -sys.path.insert(0, str(HERE.parent.parent / "generated")) - -from goose import Client # noqa: E402 - - -def main() -> None: - client = Client() - pong = client.ping("aaif.io") - print(pong.message) - - -if __name__ == "__main__": - main() diff --git a/crates/goose-sdk/justfile b/crates/goose-sdk/justfile index d451095a38..8bdf8bd306 100644 --- a/crates/goose-sdk/justfile +++ b/crates/goose-sdk/justfile @@ -22,7 +22,7 @@ _generate lang: _build python: (_generate "python") DYLD_LIBRARY_PATH={{lib_dir}} LD_LIBRARY_PATH={{lib_dir}} \ - python3 {{examples_dir}}/ping.py + uv run --script {{examples_dir}}/provider.py kotlin: (_generate "kotlin") @if [ ! -f {{examples_dir}}/jna.jar ]; then \ @@ -31,8 +31,8 @@ kotlin: (_generate "kotlin") fi kotlinc -cp {{examples_dir}}/jna.jar -nowarn \ {{gen_dir}}/io/aaif/goose/goose.kt \ - {{examples_dir}}/Ping.kt \ - -include-runtime -d {{examples_dir}}/ping.jar 2>/dev/null + {{examples_dir}}/Provider.kt \ + -include-runtime -d {{examples_dir}}/provider.jar 2>/dev/null java -Djna.library.path={{lib_dir}} \ --enable-native-access=ALL-UNNAMED \ - -cp {{examples_dir}}/ping.jar:{{examples_dir}}/jna.jar aaif.example.PingKt + -cp {{examples_dir}}/provider.jar:{{examples_dir}}/jna.jar aaif.example.ProviderKt