mirror of
https://github.com/block/goose.git
synced 2026-07-09 16:09:22 +00:00
update namespacing
This commit is contained in:
parent
1535ca70f9
commit
b74fd62062
9 changed files with 14 additions and 14 deletions
|
|
@ -4,9 +4,9 @@ The bindings layer for Goose. It houses the shared types used for both ACP and
|
|||
SDK access, and exposes a cross-language version of the Goose API.
|
||||
|
||||
With `--features uniffi` the crate compiles to native bindings for Python and
|
||||
Kotlin (namespace `aaif_goose` / `aaif.goose`). The published surface is
|
||||
currently a `ping` -> `pong` stub in `src/bindings.rs` — the scaffold for the
|
||||
real implementation.
|
||||
Kotlin (namespace `goose` / `io.aaif.goose`). The UniFFI surface currently lets
|
||||
callers construct declarative providers from JSON and stream provider
|
||||
completions.
|
||||
|
||||
```bash
|
||||
just python # build bindings + run examples/uniffi/ping.py
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
package aaif.example
|
||||
|
||||
import aaif.goose.Client
|
||||
import io.aaif.goose.Client
|
||||
|
||||
fun main() {
|
||||
val client = Client()
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
package aaif.example
|
||||
|
||||
import aaif.goose.DeclarativeProvider
|
||||
import aaif.goose.MessageRole
|
||||
import aaif.goose.ProviderMessage
|
||||
import aaif.goose.ProviderModelConfig
|
||||
import io.aaif.goose.DeclarativeProvider
|
||||
import io.aaif.goose.MessageRole
|
||||
import io.aaif.goose.ProviderMessage
|
||||
import io.aaif.goose.ProviderModelConfig
|
||||
import java.nio.file.Paths
|
||||
|
||||
fun main() {
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ Compile and run:
|
|||
|
||||
```bash
|
||||
kotlinc -cp crates/goose-sdk/examples/uniffi/jna.jar -nowarn \
|
||||
crates/goose-sdk/generated/aaif/goose/aaif_goose.kt \
|
||||
crates/goose-sdk/generated/io/aaif/goose/goose.kt \
|
||||
crates/goose-sdk/examples/uniffi/Provider.kt \
|
||||
-include-runtime -d crates/goose-sdk/examples/uniffi/provider.jar
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ from pathlib import Path
|
|||
HERE = Path(__file__).resolve().parent
|
||||
sys.path.insert(0, str(HERE.parent.parent / "generated"))
|
||||
|
||||
from aaif_goose import Client # noqa: E402
|
||||
from goose import Client # noqa: E402
|
||||
|
||||
|
||||
def main() -> None:
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ from pathlib import Path
|
|||
HERE = Path(__file__).resolve().parent
|
||||
sys.path.insert(0, str(HERE.parent.parent / "generated"))
|
||||
|
||||
from aaif_goose import ( # noqa: E402
|
||||
from goose import ( # noqa: E402
|
||||
DeclarativeProvider,
|
||||
MessageRole,
|
||||
ProviderMessage,
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ kotlin: (_generate "kotlin")
|
|||
https://repo1.maven.org/maven2/net/java/dev/jna/jna/5.14.0/jna-5.14.0.jar; \
|
||||
fi
|
||||
kotlinc -cp {{examples_dir}}/jna.jar -nowarn \
|
||||
{{gen_dir}}/aaif/goose/aaif_goose.kt \
|
||||
{{gen_dir}}/io/aaif/goose/goose.kt \
|
||||
{{examples_dir}}/Ping.kt \
|
||||
-include-runtime -d {{examples_dir}}/ping.jar 2>/dev/null
|
||||
java -Djna.library.path={{lib_dir}} \
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
pub use goose_sdk_types::{custom_notifications, custom_requests};
|
||||
|
||||
#[cfg(feature = "uniffi")]
|
||||
uniffi::setup_scaffolding!("aaif_goose");
|
||||
uniffi::setup_scaffolding!("goose");
|
||||
|
||||
#[cfg(feature = "uniffi")]
|
||||
pub mod bindings;
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
[bindings.kotlin]
|
||||
package_name = "aaif.goose"
|
||||
package_name = "io.aaif.goose"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue