feat: studio.translate.ollama v0.1.0 — Ollama-backed translate hook
First plugin to exercise the Studio-plugin translate hook end-to-end. Routes through an Ollama-shaped /api/chat endpoint configured via OLLAMA_ENDPOINT (default http://localhost:11434/api/chat). System prompt constrains the model to ONLY the translation — no commentary, no markdown frames — so the translate hook contract (plain string in, plain string out) stays honest. Declared permissions: net: localhost + net: 127.0.0.1 + net: ollama. Operator policy extends the ceiling for remote / cloud LLM endpoints. v0.1 limits: no glossary, no batching, no caching. Same SDK v0.1 single-world contract — declares Declined stubs for the theme and output-view hooks. Built artefact: ~108 KiB stripped wasm. Uploaded to releases.fai.flemming.ai (sha256 0101ed6e…) and reachable via `fai install studio.translate.ollama`. Signed-off-by: flemming-it <sf@flemming.it>
This commit is contained in:
commit
884e275b0e
8 changed files with 976 additions and 0 deletions
32
Cargo.toml
Normal file
32
Cargo.toml
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
[package]
|
||||
name = "studio_translate_ollama"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
authors = ["Dr. Stefan Flemming <platform@flemming.ai>"]
|
||||
license = "Apache-2.0"
|
||||
publish = false
|
||||
description = "F∆I Studio plugin — Ollama-backed translate hook"
|
||||
repository = "https://git.flemming.ai/fai-modules/studio-translate-ollama"
|
||||
rust-version = "1.85"
|
||||
|
||||
[lib]
|
||||
crate-type = ["cdylib"]
|
||||
|
||||
[dependencies]
|
||||
fai-studio-plugin-sdk = { path = "../../fai_studio_plugin_sdk" }
|
||||
serde = { version = "1", features = ["derive"] }
|
||||
serde_json = "1"
|
||||
|
||||
# WASI-0.2 HTTP client. Only compiled into the wasm32-wasip2
|
||||
# target; the rlib used by host-side tests doesn't need it.
|
||||
[target.'cfg(target_arch = "wasm32")'.dependencies]
|
||||
waki = "0.5"
|
||||
|
||||
[package.metadata.component]
|
||||
package = "fai:studio-plugin"
|
||||
|
||||
[profile.release]
|
||||
opt-level = "s"
|
||||
lto = true
|
||||
codegen-units = 1
|
||||
strip = true
|
||||
Loading…
Add table
Add a link
Reference in a new issue