Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,26 @@ user-facing notes live in [`docs/updates/`](docs/updates/) (English and

## Unreleased

## 2.2.6 — 2026-10-19

### Added

- Editor: `sca cell open NOTEBOOK` switches the running editor to another notebook of the
workspace and waits for its kernel, so the following `sca cell` writes go through instead
of refusing. The write commands take `--open` to switch and write in one step
(`--wait`, or `SCA_EDITOR_OPEN_WAIT`, raises the boot wait; default 120s). `/api/cells`
reports `kernel` so a caller can tell a booted notebook from one still opening.
- Editor: `sca viewport [WORKSPACE] [--out PATH]` reports where the viewport image lives
(path, age, size) and copies it out, instead of reading `.sca-editor/viewport.png` by hand.

### Changed

- Cache: `cryptography` ships as a dependency, so the notebook cache keeps marimo's
manifest signing and verification on instead of silently degrading to unsigned,
unverified entries (the "LazyLoader verification='on' degraded to 'off'" warning).
- Editor: a refused write now names `sca cell open NOTEBOOK` (or `--open`) as the way out,
and the bundled skill's editor-collaboration reference says so.

## 2.2.5 — 2026-10-15

### Fixed
Expand Down
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,21 +149,20 @@ the full crank cycle sweeps clean in the same sim ·

---

## Update Notes (2.2.5)
## Update Notes (2.2.6)

> Validate generated definitions, assembly constraints, and manufacturing
> geometry before production use.

- **`sca cell` works behind container proxies.** The editor's discovery record is loopback and
proxy-proof, an unreachable record is reported instead of silently ignored, and file
fallbacks say so on stderr.
- **Cell feedback carries the chain.** put/insert/run return console output and every cell
left unhealthy, stale dependents are run, and a failing cell names its upstream.
- **Validate a stage headlessly.** `sca run --through N / --no-product / --timeout`.
- **Quieter output, shorter prints.** Cache and VTK chatter is gone; a printed
`BRepInspection` is a one-line summary.
- **Switch notebooks without leaving the CLI.** `sca cell open NOTEBOOK` moves the editor
and waits for its kernel; the write commands take `--open` to switch and write in one
step, and a refused write names the way out.
- **`sca viewport` answers what the person sees.** The image's path, age and size, copied
out with `--out`, instead of reading `.sca-editor/viewport.png` by hand.
- **Cache entries are signed and verified again.** `cryptography` ships as a dependency,
so marimo's cache verification no longer silently degrades to off.

Full notes for this version: [`docs/updates/2.2.5.md`](docs/updates/2.2.5.md).
Full notes for this version: [`docs/updates/2.2.6.md`](docs/updates/2.2.6.md).
Earlier versions: the [changelog](CHANGELOG.md) and [`docs/updates/`](docs/updates/).

---
Expand All @@ -184,7 +183,7 @@ in a compact public API for creating solids, applying features, tagging semantic
intent, querying topology, exporting manufacturing files, and translating recorded
models into FreeCAD workflows.

Current release: `simplecadapi==2.2.5`.
Current release: `simplecadapi==2.2.6`.

## What It Provides

Expand Down Expand Up @@ -699,6 +698,7 @@ and the [STEP reconstruction workflow](docs/skill/references/workflows/step-reco

## Documentation

- 2.2.6 update notes: [`docs/updates/2.2.6.md`](docs/updates/2.2.6.md)
- 2.2.5 update notes: [`docs/updates/2.2.5.md`](docs/updates/2.2.5.md)
- 2.2.4 update notes: [`docs/updates/2.2.4.md`](docs/updates/2.2.4.md)
- 2.2.3 update notes: [`docs/updates/2.2.3.md`](docs/updates/2.2.3.md)
Expand Down
18 changes: 9 additions & 9 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,18 +133,17 @@ CalculiX 静力 FEM(边界面按保真的 `interface.*` 标签选取,仿真

---

## 更新日志(2.2.5)
## 更新日志(2.2.6)

> 投入生产前请验证生成的定义、装配约束和制造几何。

- **`sca cell` 在容器代理后面也能用。** 编辑器发现记录钉在回环地址并绕过代理,应答不了的记录会报出来
而不是被静默忽略,降级读文件会在 stderr 上说明。
- **cell 反馈带着整条链。** put/insert/run 返回 console 输出和每个不健康的 cell,stale 依赖会被运行,
出错 cell 会列出上游。
- **按阶段做无头校验。** `sca run --through N / --no-product / --timeout`。
- **更安静的输出、更短的打印。** 缓存与 VTK 噪声消失,打印 `BRepInspection` 是一行摘要。
- **不离开 CLI 就能切换 notebook。** `sca cell open NOTEBOOK` 切换编辑器并等 kernel 就绪;
写命令加 `--open` 切换 + 写入一步完成,被拒绝的写入会直接指路。
- **`sca viewport` 直接回答"用户看到什么"。** 图片的路径、age、大小,`--out` 复制出去,
不用手读 `.sca-editor/viewport.png`。
- **缓存条目重新有了签名验证。** `cryptography` 随包安装,marimo 缓存验证不再静默降级。

本版本的完整说明:[`docs/updates/2.2.5.zh-CN.md`](docs/updates/2.2.5.zh-CN.md)。
本版本的完整说明:[`docs/updates/2.2.6.zh-CN.md`](docs/updates/2.2.6.zh-CN.md)。
更早的版本:见[更新日志](CHANGELOG.md)和 [`docs/updates/`](docs/updates/)。

---
Expand All @@ -162,7 +161,7 @@ CalculiX 静力 FEM(边界面按保真的 `interface.*` 标签选取,仿真

SimpleCADAPI 是一个基于 OCP 的 Python CAD SDK,提供清晰的函数式建模操作和可重放的模型图。它在 OpenCascade 几何内核之上提供精简的公共 API,可用于创建实体、应用特征、添加语义标签、查询拓扑、导出制造文件,以及将记录的模型转换为 FreeCAD 工作流。

当前版本:`simplecadapi==2.2.5`。
当前版本:`simplecadapi==2.2.6`。

## 核心能力

Expand Down Expand Up @@ -588,6 +587,7 @@ uv run --extra fem python examples/ap242_gmsh_volume_mesh/run_calculix.py

## 文档

- 2.2.6 更新说明:[`docs/updates/2.2.6.zh-CN.md`](docs/updates/2.2.6.zh-CN.md)
- 2.2.5 更新说明:[`docs/updates/2.2.5.zh-CN.md`](docs/updates/2.2.5.zh-CN.md)
- 2.2.4 更新说明:[`docs/updates/2.2.4.zh-CN.md`](docs/updates/2.2.4.zh-CN.md)
- 2.2.3 更新说明:[`docs/updates/2.2.3.zh-CN.md`](docs/updates/2.2.3.zh-CN.md)
Expand Down
4 changes: 2 additions & 2 deletions docs/skill/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ description: Build, assemble, inspect, reconstruct, and export parametric CAD mo
license: Apache-2.0
metadata:
project: simplecadapi
version: 2.2.5
version: 2.2.6
package-name: simplecadapi
package-version: 2.2.5
package-version: 2.2.6
---

# SimpleCAD SDK Skill
Expand Down
6 changes: 4 additions & 2 deletions docs/skill/references/domains/editor-collaboration.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ echo 'L = 90' | sca cell put 3 # replace the code of cell 3 and run it (--
sca cell insert --after 3 -f new.py # add a cell (--after start|end|CELL, --name fn_name)
sca cell rm 4
sca cell run [CELL ...] # run cells (default all) and what they feed
sca cell open other.py # have the editor open another notebook (waits for its kernel)
sca new bracket --kind part # a new notebook; the open editor lists it, the person's view stays
```

Expand All @@ -74,7 +75,8 @@ sca new bracket --kind part # a new notebook; the open editor lists it,
replaces the cell, so `get` first when the person may have changed it.
- The commands find the running editor through `<workspace>/.sca-editor/server.json`. With no
editor running, or with another notebook open, `ls` and `get` read the file and the write
commands refuse: then edit the file directly, nothing else holds it.
commands refuse: run `sca cell open NOTEBOOK` (or pass `--open` to switch and write in one
step), or edit the file directly, nothing else holds it.
- `@app.function` cells cannot be changed this way; edit them in the file.

## Read what the person is doing
Expand All @@ -83,7 +85,7 @@ sca new bracket --kind part # a new notebook; the open editor lists it,
| --- | --- |
| What is selected | the cell headed `# ---- selection ----` in the notebook file |
| Everything at once (selection, cell states, errors, parameter values) | `sca snapshot [WORKSPACE]`, or `<workspace>/.sca-editor/snapshot.json` |
| What the viewport looks like | `<workspace>/.sca-editor/viewport.png` (a PNG; look at it) |
| What the viewport looks like | `sca viewport [WORKSPACE] [--out PATH]` — the PNG's path, age and size, copied out with `--out` (the file is `<workspace>/.sca-editor/viewport.png`) |
| Which notebook is open | `notebook` in the snapshot |

`sca snapshot` only has an answer while the editor runs; it reports the last
Expand Down
44 changes: 44 additions & 0 deletions docs/updates/2.2.6.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# 2.2.6 Update Notes

From the same field report as 2.2.5, the follow-up: an agent working a
multi-notebook workspace no longer has to leave the CLI to keep working — and the
cache it relies on is verified again.

## Switch notebooks without leaving the CLI

An agent editing `l_link.py`, `l_link_shell.py`, and an assembly had exactly one way
to move the editor between them: a raw `curl` to `/api/workspace/open`, an endpoint
found by reading the installed server's source — because a write refuses while
another notebook is open, and no command could switch. Now:

```bash
sca cell open other.py # the editor switches; waits for the kernel to boot
echo '...' | sca cell put 3 --open # switch and write in one step
```

`sca cell open` waits until the switched notebook's kernel is up
(`SCA_EDITOR_OPEN_WAIT` or `--wait`, default 120s), so the following write does not
race the boot. Re-asking for the notebook that is already open and ready does not
restart the kernel. A refused write names the command as the remedy, and
`/api/cells` reports `kernel` so a caller can tell a booted notebook from one whose
name has flipped while the kernel still boots.

## See the viewport as a command

```bash
sca viewport --out /tmp/seen.png # path, age in seconds, size; copied out
```

The image of what the person sees is now `sca viewport`'s answer instead of a
`.sca-editor/viewport.png` file agents had to know about and read by hand. The age
says how fresh the view is; there is no image until the page showed a model at
least once.

## Cache entries are signed and verified again

The notebook cache is marimo's `LazyLoader`, whose verification is on by default:
without the `cryptography` package it degraded to off and every run warned that
cache entries were neither signed nor verified. `cryptography` ships as a
dependency now, so verification stays on everywhere the cache works.

See the [changelog](../../CHANGELOG.md) for the complete list.
39 changes: 39 additions & 0 deletions docs/updates/2.2.6.zh-CN.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# 2.2.6 更新说明

和 2.2.5 来自同一份实地报告的续篇:agent 在多 notebook 工作区里干活,不用再绕开 CLI
才能继续——它依赖的缓存也重新有了签名验证。

## 不离开 CLI 就能切换 notebook

一个 agent 要同时编辑 `l_link.py`、`l_link_shell.py` 和一个装配体,把编辑器在它们之间
切换的办法只有一个:对着 `/api/workspace/open` 发裸 `curl`——这个端点是它读了安装包里
server 的源码才找到的,因为编辑器开着别的 notebook 时写入会被拒绝,而没有任何命令能切换。
现在:

```bash
sca cell open other.py # 编辑器切换过去;等 kernel 启动完成
echo '...' | sca cell put 3 --open # 切换 + 写入一步完成
```

`sca cell open` 会等到切换后的 notebook kernel 就绪(`SCA_EDITOR_OPEN_WAIT` 或
`--wait`,默认 120s),后续写入不会和启动赛跑。对已经打开且就绪的 notebook 再次执行
不会重启 kernel。写入被拒绝时报错会直接给出这条命令,`/api/cells` 也会报告 `kernel`,
让调用方分得清"名字已切换"和"kernel 还在启动"。

## 像命令一样拿视口图

```bash
sca viewport --out /tmp/seen.png # 路径、age(秒)、大小;复制出来
```

"用户现在看到什么"的图,现在是 `sca viewport` 的输出,而不是一个要 agent 自己知道、
自己读的 `.sca-editor/viewport.png` 文件。age 说明画面有多新鲜;页面从未显示过模型时
没有图。

## 缓存条目重新有了签名验证

notebook 缓存是 marimo 的 `LazyLoader`,默认开着验证:缺 `cryptography` 包时会降级关
闭,每次运行都警告"cache entries are neither signed nor verified"。现在 `cryptography`
作为依赖随包安装,缓存能工作的地方验证就开着。

完整清单见[更新日志](../../CHANGELOG.md)。
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "simplecadapi"
version = "2.2.5"
version = "2.2.6"
description = "A simplified OCP-native CAD modeling Python API"
readme = "README.md"
license = { file = "LICENSE" }
Expand Down Expand Up @@ -35,6 +35,7 @@ dependencies = [
"ezdxf>=1.4.4",
"marimo>=0.25.0",
"plotly>=7.1.0",
"cryptography>=42.0.0",
]

[project.optional-dependencies]
Expand Down
1 change: 1 addition & 0 deletions src/simplecadapi/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
sca edit [WORKSPACE] # the web editor (needs the 'editor' extra)
sca example [NAME] [DIR] # copy a bundled example workspace out
sca snapshot [WORKSPACE] # what the editor user has selected / sees
sca viewport [WORKSPACE] # the image of what the editor user sees

Shared contract: group handlers return ``(report, exit_code)`` and are
followed by the group's own printer (human-readable for init/addon, JSON
Expand Down
Loading
Loading