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:
parent
8b2678f3e8
commit
3bb8fc9e70
8 changed files with 430 additions and 1 deletions
78
README.md
78
README.md
|
|
@ -1,3 +1,79 @@
|
|||
# orchestrator-llm
|
||||
|
||||
F∆I orchestrator module — turns natural-language goals into structured execution plans (Phase 0.5, version 0.8.0)
|
||||
F∆I orchestrator module — turns natural-language goals into
|
||||
structured execution plans (`fai_hub::plan::Plan` JSON).
|
||||
|
||||
## Status
|
||||
|
||||
`v0.1.0` — **deterministic 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
|
||||
|
||||
```bash
|
||||
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):
|
||||
|
||||
```bash
|
||||
cargo test
|
||||
```
|
||||
|
||||
## Use from a flow
|
||||
|
||||
```yaml
|
||||
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`.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue