feat: deterministic stub orchestrator (v0.1.0)

The orchestrator-llm module turns a goal text into a Plan JSON
that the F∆I hub can apply. v0.1.0 is a deterministic stub —
it always emits a three-step plan (explain, explain-stub-notice,
save_flow with debug.echo) regardless of the goal.

Why ship a stub: it validates the module → plan → apply pipeline
end-to-end before adding LLM integration. The output is a
structurally valid Plan that round-trips cleanly through
fai_hub::plan::Plan deserialization.

v0.2.0 will replace the stub body with an actual LLM call once
the F∆I platform exposes outbound HTTP to permitted modules via
wasi-http.

Files:
- module.yaml — capability orchestrator.plan@0.1.0, no permissions
- wit/world.wit — copy of fai:platform@0.1.0
- src/lib.rs — wit_bindgen Guest impl that delegates to plan.rs
- src/plan.rs — pure plan-builder (host + WASM compatible)
- tests/plan_compatibility.rs — plan JSON shape assertions
- rust-toolchain.toml — pin to Rust 1.86 with wasm32-wasip2 target
- README.md — usage and status

Signed-off-by: flemming-it <sf@flemming.it>
This commit is contained in:
flemming-it 2026-04-29 17:43:46 +02:00
parent 8b2678f3e8
commit 3bb8fc9e70
8 changed files with 430 additions and 1 deletions

31
module.yaml Normal file
View file

@ -0,0 +1,31 @@
schema_version: 1
name: orchestrator-llm
version: 0.1.0
# Capability provided by this module.
provides:
- capability: orchestrator.plan
version: 0.1.0
# Inputs the invoke function accepts.
inputs:
goal: text
# Optional JSON-encoded list of installed capabilities. If
# omitted or empty, the module plans without capability context.
available_capabilities: text
# Optional JSON-encoded list of all known store capabilities
# (installed + planned + alpha). Used when the orchestrator
# needs to suggest installations.
store_capabilities: text
# Outputs produced.
outputs:
# JSON-encoded Plan compatible with `fai_hub::plan::Plan`.
plan: json
# Permissions required.
#
# v0.1.0 is a deterministic stub — no network, no fs, no env.
# v0.2.0 will add `net: <llm-endpoint>` once the platform exposes
# wasi-http to permitted modules.
permissions: []