Materializr
開源參數式 3D CAD 給創客 — 受限草圖、實體建模、螺紋、SVG 與文字雕刻、STL/STEP 匯出。Android、iPad、Linux、Mac、Windows。Vibe 編碼。
AI 翻譯
Review and edit portable creative plans with execution preflight, semantic plan comparison, transactional adapters, policies, rollback, and signed evidence.
翻譯準備中
取自儲存庫 README
正在載入完整 README。
檢視完整 README ↗Creative Capability Bridge (CCB) is a versioned protocol, adapter toolkit, and reference plan builder for expressing common creative operations once and translating them for different applications.
The current protocol supports text creation, text updates, and explicit transforms through Blender, Inkscape, and GIMP 3 adapters. It adds transactional execution, rollback backups, resumable and selective plans, semantic document diffs, coordinate normalization, policy profiles, dependency-aware multi-document pipelines, adapter conformance checks, and optional Ed25519 signatures for bundles and receipts. Version 1.6.1 tightens supported-adapter evidence and GIMP saved-document acceptance. The separate PNG export contract added in 1.6.0 uses Inkscape; it does not add universal export support.
Creative applications repeatedly implement text, transforms, colors, exports, asset browsers, and similar capabilities with different interaction models. CCB separates the user's intent from application-specific commands:
reference interface or JSON authoring
↓
CCB protocol v1 plan
↓
validate and negotiate support
↓
Blender adapter Inkscape adapter GIMP 3 adapter
background Python SVG + optional render Script-Fu batch
The protocol is the stable center. Applications remain installed separately, upstream code is not forked, and every output path is explicit.
Export restricted SVG to PNG through an installed Inkscape renderer, with explicit output and a structural receipt.
Separate exact measured application versions from target version ranges; see compatibility evidence.
Add ccb preflight for input hashes, output/receipt collisions, font-file availability, target lifecycles, and optional policy or document inspection.
Add ccb compare-plans for metadata fields, added/removed/changed operation fields, and operation order without printing raw parameter values or file paths.
Add validated local JSON plan import and operation editing/reordering/removal to the reference builder.
Add target-order review and bounded session Undo/Redo; preserve coordinate metadata through builder edits.
Keep execution explicit and preserve existing inputs and outputs during review.
| Capability | Blender | Inkscape | GIMP 3 |
|---|---|---|---|
| Create text | Yes | Yes | Yes |
| Update bridge-managed or identified text | Yes | Yes | Yes |
| Font family request | Recorded; native resolution is application-dependent | SVG font-family | Exact installed GIMP font resource name |
| Font size, alignment, fill | Yes | Yes | Yes |
| Position and Z rotation | Yes | Yes | Yes |
| X/Y scale | Yes | Yes | Yes |
| Z position and scale | Yes | Not applicable | Not applicable |
| Read-only structural inspection | Yes | Yes | Yes |
| Native conformance fixture | Yes | Yes | Dedicated GIMP 3 saved-XCF gate; see measured evidence |
Use ccb capabilities --json for the machine-readable manifests.
CCB adds reviewable stages around execution:
ccb inspect source.svg
ccb explain plan.json
ccb lint plan.json --document source.svg
ccb compatibility examples/portable-text.json
ccb retarget examples/portable-text.json --adapter inkscape --output inkscape-plan.json
ccb bundle create inkscape-plan.json project.ccb.zip --asset LICENSE.txt --fallback-font sans-serif
ccb bundle verify project.ccb.zip
ccb bundle extract project.ccb.zip unpacked-project
ccb execute inkscape-plan.json --receipt receipt.json
ccb verify-receipt receipt.json
ccb compare-receipts receipt-a.json receipt-b.json
ccb diff source.svg output.svg
ccb normalize plan.json
ccb conformance inkscape --native
inspect reads .svg metadata directly and uses Blender's background mode for .blend; it does not save the source.explain lists files read/created, replacement state, created/modified targets, requirements, and known approximations.lint checks operation order and target lifecycles; with --document, it confirms referenced targets through read-only inspection.plan.json, optional assets/, and a manifest with SHA-256 hashes, license notes, fallback fonts, and archive-relative paths.bundle extract verifies hashes and paths first, then writes only into a new destination directory.verify-receipt re-hashes the recorded input and output to detect missing or changed files.adapter: "auto" is valid for compatibility and retargeting only. Execution still requires a concrete, validated adapter plan.--only, --skip, and --from; --state plus --resume verifies the output hash before continuing from recorded checkpoints.depends_on relationships and reject missing or cyclic dependencies.GIMP text plans use the current GIMP context font when no font is specified. An explicit font_family must name an installed GIMP font resource exactly (for example, DejaVu Sans Book); missing resources fail rather than silently substituting a font. GIMP support is limited to identified top-level layers. Translation preserves omitted axes; scaling rounds dimensions to whole pixels and may rasterize text. Rotation uses the layer center and may lose raster detail. These are adapter-specific semantics, not interchangeable vector/object transforms. Native fixture success is not a guarantee for arbitrary XCF files.
Requires Python 3.10 or newer. Native execution requires the selected application on PATH; GIMP support targets GIMP 3's bundled Script-Fu batch interpreter. Inkscape is optional unless native rendering is requested because ordinary SVG editing is handled directly.
python -m venv .venv
# Windows: .venv\Scripts\activate
# macOS/Linux: source .venv/bin/activate
python -m pip install .
ccb validate examples/inkscape-text.json
ccb preview examples/inkscape-text.json
ccb execute examples/inkscape-text.json
The example writes examples/output/inkscape-text.svg. It does not change an input file.
For Blender:
ccb doctor
ccb preview examples/blender-text.json
ccb execute examples/blender-text.json
For GIMP 3:
ccb preview examples/gimp-text.json
ccb conformance gimp --native
ccb execute examples/gimp-text.json --receipt gimp-receipt.json
For guarded, resumable work:
ccb key generate ccb-private.pem ccb-public.pem
ccb bundle create plan.json project.ccb.zip --signing-key ccb-private.pem
ccb bundle verify project.ccb.zip --public-key ccb-public.pem --require-signature
ccb execute plan.json --only titles --state run.state.json --receipt run.json
ccb execute plan.json --state run.state.json --resume --receipt resumed.json
ccb policy check plan.json examples/safe-policy.json --receipt run.json
ccb pipeline validate examples/two-document-pipeline.json
The browser plan builder creates JSON locally. It does not upload documents or execute applications.
{
"version": 1,
"adapter": "inkscape",
"input": null,
"output": "output.svg",
"operations": [
{
"id": "create-title",
"tags": ["titles"],
"capability": "text.create",
"target": "title",
"parameters": {
"content": "A common interface",
"font_family": "Liberation Sans",
"font_size": 48,
"alignment": "center",
"fill": "#1D2522",
"x": 600,
"y": 300
}
}
],
"coordinate_space": {
"unit": "px",
"origin": "top-left",
"y_axis": "down",
"dpi": 96,
"width": 1200,
"height": 800
}
}
Paths are resolved relative to the plan file. Input and output must differ. Existing outputs are refused unless the user explicitly passes --replace; that flag never authorizes changing the input. Operation IDs and tags are optional, so existing version 1 plans remain valid.
See protocol details and adapter authoring.
Read the complete security model.
These are potential directions under investigation, not promised features or release dates:
Roadmap proposals belong in GitHub Discussions before implementation so the shared model does not grow by accident.
python -m pip install -e ".[dev]"
ruff format --check .
ruff check .
mypy src tests
pytest
npm test
npm run check
npm run build
python -m build
The ordinary suite tests schema rejection, transactions and rollback, resume drift, policies, pipelines, signatures, coordinate conversion, semantic diffs, adapter conformance, generated Blender/GIMP scripts, SVG semantics, CLI behavior, and the plan-builder core. GitHub CI also runs native Blender and Inkscape smoke tests on Ubuntu. GIMP native conformance is available through ccb conformance gimp --native on systems with GIMP 3 installed.
CCB runs locally on Windows, macOS, and Linux wherever Python and the selected application are available. The static plan builder runs in modern browsers and does not transmit or store content.
Contributions are welcome through reviewed pull requests. Start with CONTRIBUTING.md, the development guide, and the adapter contract. Compatibility reports should include the operating system, application version, plan, expected semantic result, and actual result using synthetic fixtures where possible.
Version 1.3.1 is feature-complete for its documented scope. Maintenance prioritizes transaction safety, compatibility evidence, explicit policy, and backward-compatible protocol changes over rapidly adding application-specific commands.
MIT © 2026 Logan Pendragon Multiverse.
This project is part of the Logan Pendragon Forge open-source collection. Browse the catalog for other released tools, source repositories, live demos, and downloads.
Add portable font mappings with missing-font diagnostics, transform/pivot fixture generation and version-scoped conformance evidence.
The fonts command maps requested families per adapter, reports missing/unmapped families, accepts an optional operator-supplied family inventory, and writes a new resolved plan only when no blocking findings remain. Blender mappings use validated local TTF/OTF files through font_file and actually load the font; file presence alone is not a rendering claim. The fixture generator writes 12 transform cases plus 12 round-trip plans with explicit adapter-specific pivot semantics. conformance-matrix records exact observed application versions, separates contract-only/native-smoke/document-adapter evidence, and verifies Blender transform round-trips when available. CI requires real Blender transforms/font loading and Inkscape rendering, then uploads the measured version matrix. GIMP native semantic acceptance remains unverified when unavailable. Sources are preserved and existing output files are refused.
ccb fonts plan.json --map font-map.json --inventory installed-families.json --output mapped-plan.json
ccb conformance-fixtures new-fixtures
ccb conformance-matrix --native --output new-version-matrix.json
Add read-only execution preflight and value-free semantic comparisons between two plans. The reference builder imports validated local JSON plans, retains coordinate metadata, reviews target order, edits/reorders/removes queued operations, and offers bounded session Undo/Redo. Existing output refusal, transactional execution, protocol version 1, and native adapter behavior are retained.
ccb preflight plan.json
ccb preflight plan.json --inspect --policy policy.json --receipt new-receipt.json
ccb compare-plans before.json after.json --output new-comparison.json
Preflight does not execute or reserve paths. Without --inspect, existing-document targets are not verified. Native inspection can launch the selected application in read-only mode. Signed-bundle requirements remain blocked in preflight; verify the bundle through the existing execution workflow. A blocked preflight or changed comparison exits 1; invalid input exits 2. Report destinations must be new files. Comparisons match explicit IDs, or position for operations without IDs; identifiers and field names still appear and should be reviewed before sharing.
The builder imports a local plan up to 1 MiB, validates before replacing the queue, and keeps Undo/Redo in the current browser session only. Queue editing produces a JSON plan; it does not launch a creative application. Inspect the saved plan before execution.
A separate strict export job supports static SVG → PNG through Inkscape with read-only preflight, requested canvas dimensions, collision refusal and hash receipts. It rejects external resources, scripts, CSS and unsupported SVG constructs before native execution. See the export contract for the exact schema and limits. Existing document-plan protocol and native editable outputs remain unchanged.