Repository navigation
v1.37.1-beta.3: embedding API (outputDirectory, extraTools)
Pre-release
Pre-release
Pre-release. Same dependency pins as v1.37.1-beta.1 and beta.2: OCCTSwift 4.0.0-beta.4 exactly, plus the betas of Interaction, IO, Mesh and Scripts. A consumer only gets this by naming it; the stable line stays at v1.37.0.
Two additions for hosts that embed OCCTMCPCore in-process.
Added
makeOCCTMCPServer(outputDirectory: URL? = nil)(#195). The host chooses the directory the server reads and writes its scene in, without touching the process environment.nilkeeps today's resolution (OCCTMCP_OUTPUT_DIR, then iCloud Drive, then~/.occtswift-scripts/output); an explicit directory beats the environment variable. Two servers with different directories can run in one process: each sees only its own scene and keeps its own selection, zone, history and scene-snapshot state. Implemented as a task-local override set around each tool call, with the process-global registries scoped per directory.makeOCCTMCPServer(extraTools: [ExtraTool] = [])(#196). A host can register tools of its own beside the built-in ones. They are listed after the built-ins, andget_api_referencewithcategory: "mcp_tools"includes them. An extra tool whose name matches a built-in wins and the built-in is dropped from the catalog; among extras, the last duplicate wins. A throwing handler becomes an error result.
With neither parameter, behaviour is unchanged.
Notes for embedders
- The
outputDirectoryoverride is a task-local: code on a tool path that usesTask.detachedwould drop it. Nothing in this package does. - Per-directory state is kept for the life of the process, which suits a few long-lived servers; a server per request with a fresh directory each time would grow it without bound.
execute_scriptstill shares one SwiftPM cache workspace per process, so concurrent script runs from two servers collide just as two concurrent calls on one server do today.
serverVersion reports 1.37.1-beta.3. Full suite: 262 tests pass locally; CI passes on the release commit.