forked from 1b-agent/fieldcraft-upstream
MCP server: modelcraft-cli mcp (headless or bridged), read/write roots, end-to-end analysis over MCP (#48)
* io: read and write roots that confine an automation client's file access Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NmAttHhUZTokgPeEJia8sm * engine: every file a command reads or writes is checked against the session's roots Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NmAttHhUZTokgPeEJia8sm * engine: headless pictures of a session (model, geometry, deformed shape and contours) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NmAttHhUZTokgPeEJia8sm * mcp: MCP server over stdio with headless and connected backends, roots and caps Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NmAttHhUZTokgPeEJia8sm * cli: modelcraft-cli mcp [--connect ADDR | --headless] with automation read and write roots Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NmAttHhUZTokgPeEJia8sm * mcp: end-to-end analysis of a corpus part over MCP (open, tet mesh, define, solve, probe, render) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NmAttHhUZTokgPeEJia8sm * docs: MCP server (docs/mcp.md), Claude Code setup, roots; architecture, README, roadmap, attribution Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NmAttHhUZTokgPeEJia8sm --------- Co-authored-by: jyviko <2501648+jyviko@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
29 files changed
+2405
-49
No files matched your search
@@ -224,15 +224,18 @@ pub fn parts() -> Result<Vec<Part>> {
|
||||
Ok(parts)
|
||||
}
|
||||
|
||||
/// Build a part: run its recipe (or generate the shape) and open the design.
|
||||
pub fn load(part: &Part) -> Result<Design> {
|
||||
let geometry = |source| Error::Geometry { part: part.name.clone(), source };
|
||||
let bytes = match &part.source {
|
||||
/// A part's design as `.solidcraft` bytes: its recipe run (or its shape generated).
|
||||
pub fn design_bytes(part: &Part) -> Result<Vec<u8>> {
|
||||
match &part.source {
|
||||
Source::Recipe(script) => script_design(script),
|
||||
Source::Analytic(shape) => shape.design(),
|
||||
}
|
||||
.map_err(geometry)?;
|
||||
open_design(&bytes).map_err(geometry)
|
||||
.map_err(|source| Error::Geometry { part: part.name.clone(), source })
|
||||
}
|
||||
|
||||
/// Build a part: run its recipe (or generate the shape) and open the design.
|
||||
pub fn load(part: &Part) -> Result<Design> {
|
||||
open_design(&design_bytes(part)?).map_err(|source| Error::Geometry { part: part.name.clone(), source })
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
|
||||
Reference in new issue
Block a user