F∆I orchestrator module — turns natural-language goals into structured execution plans (Phase 0.5, version 0.8.0)
Find a file
flemming-it 00fad982d6
All checks were successful
CI / Linux x86_64 (Forgejo) (push) Successful in 1m33s
fix(llm): scope LLM module to where it is actually reachable
The dead-code lint Stefan flagged was a real signal — pretending
otherwise with #[allow(dead_code)] would have hidden a future
genuinely-dead helper. Two structural changes:

1. Gate `mod llm;` in lib.rs to `cfg(any(target_arch = "wasm32",
   test))`. The LLM client only has callers on wasm32 (WakiClient)
   and in the host test harness; on a host non-test build the
   module is genuinely unreachable, so we don't compile it.

2. Add a test that covers every LlmError Display message so the
   `Status` and `MissingInput` variants are constructed in the
   test build (they were used by WakiClient on wasm32 but never
   touched by host tests). The test doubles as a regression net
   for the user-facing error strings.

18 host tests green (was 17). Drops the previous
allow(dead_code) escape hatch entirely.

Signed-off-by: flemming-it <sf@flemming.it>
2026-04-30 10:04:08 +02:00
.forgejo/workflows ci: Forgejo Actions workflow for orchestrator-llm 2026-04-30 00:39:50 +02:00
src fix(llm): scope LLM module to where it is actually reachable 2026-04-30 10:04:08 +02:00
tests feat: real LLM call via wasi-http (Ollama adapter) — v0.2.0 2026-04-29 21:27:07 +02:00
wit feat: deterministic stub orchestrator (v0.1.0) 2026-04-29 17:43:46 +02:00
.gitignore Initial commit 2026-04-29 16:31:31 +02:00
Cargo.toml feat: real LLM call via wasi-http (Ollama adapter) — v0.2.0 2026-04-29 21:27:07 +02:00
LICENSE Initial commit 2026-04-29 16:31:31 +02:00
module.yaml feat: real LLM call via wasi-http (Ollama adapter) — v0.2.0 2026-04-29 21:27:07 +02:00
README.md feat: deterministic stub orchestrator (v0.1.0) 2026-04-29 17:43:46 +02:00
rust-toolchain.toml feat: deterministic stub orchestrator (v0.1.0) 2026-04-29 17:43:46 +02:00

orchestrator-llm

F∆I orchestrator module — turns natural-language goals into structured execution plans (fai_hub::plan::Plan JSON).

Status

v0.1.0deterministic stub. Always returns a structurally valid plan that creates a single debug.echo flow regardless of the goal. Useful as a smoke test for the full module → plan → fai plan apply path.

v0.2.0 (next) — replaces the stub with an actual LLM call to a configured endpoint (Ollama or OpenAI-compatible) once the F∆I platform exposes outbound HTTP to permitted modules via wasi-http.

Capability

  • orchestrator.plan@0.1.0

Inputs

Name Type Description
goal text Natural-language goal
available_capabilities text (JSON list) Optional. Capabilities currently installed in the hub.
store_capabilities text (JSON list) Optional. All capabilities the hub knows about.

Outputs

Name Type Description
plan json Plan JSON deserializable by fai_hub::plan::Plan

Permissions

None. The deterministic stub does not call out. v0.2.0 will declare net: <llm-endpoint> once the platform supports it.

Build

cargo build --release --target wasm32-wasip2

The built WASM lands at target/wasm32-wasip2/release/orchestrator_llm.wasm.

Test

Host-side unit and integration tests exercise the pure plan-building logic (no WASM build required for tests):

cargo test

Use from a flow

schema_version: 1
name: plan-from-goal
inputs:
  goal: text
steps:
  - id: orchestrate
    use: orchestrator.plan@^0
    with:
      goal: $inputs.goal
outputs:
  plan: $orchestrate.plan

The plan output is JSON — pipe it through fai plan apply - to execute it.

License

Apache-2.0. See LICENSE.