forked from 1b-agent/fieldcraft-upstream
Rename the project to FieldCraft
Crates fieldcraft-*, binaries fieldcraft and fieldcraft-cli, the .fieldcraft file (format tag fieldcraft/1, manifest fieldcraft.json), FIELDCRAFT_* environment variables, the MCP server name, egui widget ids (fc_*), the app icon document FieldCraft.icon and its generated family, docs and licences. No compatibility shim: no files of the earlier name exist. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01NmAttHhUZTokgPeEJia8sm
This commit is contained in:
1 parent
9bc4e1b182
commit
d5bd74570f
268 files changed
+1666
-1666
No files matched your search
@@ -16,10 +16,10 @@ It honours `CARGO_TARGET_DIR`.
|
||||
|
||||
What it does:
|
||||
|
||||
1. Builds `modelcraft`, `modelcraft-cli` and the testkit's `corpus` tool (release).
|
||||
1. Builds `fieldcraft`, `fieldcraft-cli` and the testkit's `corpus` tool (release).
|
||||
2. Writes the corpus I-beam (`tests/corpus/i-beam`) as a `.solidcraft` design to a temporary
|
||||
folder with `corpus --part i-beam --design`.
|
||||
3. Starts the app with `--control PORT` and `modelcraft-cli mcp --connect 127.0.0.1:PORT`, and
|
||||
3. Starts the app with `--control PORT` and `fieldcraft-cli mcp --connect 127.0.0.1:PORT`, and
|
||||
speaks MCP (JSON-RPC over stdio) to it. Every step is an MCP tool call: `open` the design,
|
||||
`mesh` (`hex_sweep`, 4 mm), `batch` (steel, a solid section, the root clamp, a kinematic
|
||||
coupling of the free end to a reference point loaded with 1000 N), `check_model`, `solve`
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Regenerate the README demo video: an I-beam cantilever analysed by an agent over MCP.
|
||||
|
||||
Every analysis step goes through the MCP server (`modelcraft-cli mcp --connect`), bridged to
|
||||
Every analysis step goes through the MCP server (`fieldcraft-cli mcp --connect`), bridged to
|
||||
the desktop app, and every frame is the app window captured offscreen through the MCP
|
||||
`screenshot` tool (`source: window`). See README.md beside this file.
|
||||
|
||||
@@ -54,7 +54,7 @@ def target_dir():
|
||||
|
||||
def build():
|
||||
cargo = os.environ.get("CARGO", "cargo")
|
||||
for args in (["-p", "modelcraft", "-p", "modelcraft-cli"], ["-p", "modelcraft-testkit", "--bin", "corpus"]):
|
||||
for args in (["-p", "fieldcraft", "-p", "fieldcraft-cli"], ["-p", "fieldcraft-testkit", "--bin", "corpus"]):
|
||||
subprocess.run([cargo, "build", "--release", *args], cwd=ROOT, check=True)
|
||||
|
||||
|
||||
@@ -78,7 +78,7 @@ def wait_for_port(port, app, timeout=180.0):
|
||||
|
||||
|
||||
class Mcp:
|
||||
"""A JSON-RPC client of `modelcraft-cli mcp` over stdio."""
|
||||
"""A JSON-RPC client of `fieldcraft-cli mcp` over stdio."""
|
||||
|
||||
def __init__(self, cli, port):
|
||||
self.proc = subprocess.Popen(
|
||||
@@ -258,7 +258,7 @@ def main():
|
||||
if not args.no_build:
|
||||
build()
|
||||
bin_dir = target_dir() / "release"
|
||||
work = Path(tempfile.mkdtemp(prefix="modelcraft-demo-"))
|
||||
work = Path(tempfile.mkdtemp(prefix="fieldcraft-demo-"))
|
||||
frames_dir = args.frames.resolve() if args.frames else work / "frames"
|
||||
frames_dir.mkdir(parents=True, exist_ok=True)
|
||||
design = work / "ibeam.solidcraft"
|
||||
@@ -266,11 +266,11 @@ def main():
|
||||
|
||||
port = free_port()
|
||||
app_log = open(work / "app.log", "w")
|
||||
app = subprocess.Popen([str(bin_dir / "modelcraft"), "--control", str(port)], stdout=app_log, stderr=subprocess.STDOUT)
|
||||
app = subprocess.Popen([str(bin_dir / "fieldcraft"), "--control", str(port)], stdout=app_log, stderr=subprocess.STDOUT)
|
||||
mcp = None
|
||||
try:
|
||||
wait_for_port(port, app)
|
||||
mcp = Mcp(bin_dir / "modelcraft-cli", port)
|
||||
mcp = Mcp(bin_dir / "fieldcraft-cli", port)
|
||||
film = Film(mcp, frames_dir)
|
||||
result = analyse(mcp, film, design)
|
||||
encode(film, frames_dir, args.out / "ibeam-analysis.mp4", args.out / "ibeam-analysis.gif")
|
||||
|
||||
Reference in new issue
Block a user