feat(solver): Phase 3e — Create workbench "Solve on Server" command #159

Open
opened 2026-02-20 02:02:42 +00:00 by forbes · 0 comments
Owner

Phase 3e: Client Integration

Add a "Solve on Server" command to the Assembly workbench in Kindred Create, allowing users to offload constraint solving to Silo server workers.

See docs/SOLVER.md — Phase 3e

Files to modify

  • mods/silo/freecad/ — Solver client methods in silo-mod
  • src/Mod/Assembly/ — Server solve command in Assembly workbench

User flow

  1. User opens assembly in Create
  2. User invokes "Solve on Server" command
  3. Client builds SolveContext from the active assembly
  4. Client submits to POST /api/solver/jobs via silo-client
  5. Client subscribes to SSE stream, filtering job.* events by definition_name
  6. On job.completed, client fetches full result via GET /api/jobs/{id}
  7. Client applies returned placements back to the assembly and recomputes

UI integration

  • Silo viewport widget shows job status indicator (pending/running/done/failed)
  • Diagnostic results (redundant/conflicting constraints) surface in the constraint tree
  • Failed jobs show error in the report panel

Python client SDK additions

from silo_client import SiloClient

client = SiloClient(url, token=token)
job = client.solver.submit(ctx.to_dict(), solver="ondsel")
result = client.solver.wait(job.id, timeout=60)

# Or stream via SSE
for event in client.solver.stream(job.id):
    print(event.type, event.data)

Dependencies

  • Phase 3a (JSON serialization) — build_solve_context()to_dict()
  • Phase 3b (server endpoints) — server accepts and queues jobs
  • Phase 3c (runner support) — runners can actually execute solves
  • This work is in the Kindred Create and silo-mod repos
## Phase 3e: Client Integration Add a "Solve on Server" command to the Assembly workbench in Kindred Create, allowing users to offload constraint solving to Silo server workers. See [docs/SOLVER.md — Phase 3e](../docs/SOLVER.md#phase-3e-client-integration) ### Files to modify - `mods/silo/freecad/` — Solver client methods in silo-mod - `src/Mod/Assembly/` — Server solve command in Assembly workbench ### User flow 1. User opens assembly in Create 2. User invokes "Solve on Server" command 3. Client builds `SolveContext` from the active assembly 4. Client submits to `POST /api/solver/jobs` via silo-client 5. Client subscribes to SSE stream, filtering `job.*` events by `definition_name` 6. On `job.completed`, client fetches full result via `GET /api/jobs/{id}` 7. Client applies returned placements back to the assembly and recomputes ### UI integration - Silo viewport widget shows job status indicator (pending/running/done/failed) - Diagnostic results (redundant/conflicting constraints) surface in the constraint tree - Failed jobs show error in the report panel ### Python client SDK additions ```python from silo_client import SiloClient client = SiloClient(url, token=token) job = client.solver.submit(ctx.to_dict(), solver="ondsel") result = client.solver.wait(job.id, timeout=60) # Or stream via SSE for event in client.solver.stream(job.id): print(event.type, event.data) ``` ### Dependencies - Phase 3a (JSON serialization) — `build_solve_context()` → `to_dict()` - Phase 3b (server endpoints) — server accepts and queues jobs - Phase 3c (runner support) — runners can actually execute solves - This work is in the Kindred Create and silo-mod repos
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: kindred/silo#159