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
65 changes: 22 additions & 43 deletions .claude/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,22 @@
"version": "0.0.1",
"configurations": [
{
"name": "backend-migrated",
"runtimeExecutable": "C:\\Users\\EFESTWIN\\miniconda3\\envs\\csc\\python.exe",
"name": "backend-local",
"runtimeExecutable": "cmd",
"runtimeArgs": [
"-m",
"invoke",
"dev-migrated"
"/c",
"set CSC_PUBLIC_API_URL=http://127.0.0.1:8791&& scripts\\dev\\run_csc_python.cmd -u scripts/dev/serve_dump.py --dump latest --assets .dev/assets-261012 --port 8791 --mongo-port 27791"
],
"port": 8000
"port": 8791
},
{
"name": "frontend-local",
"runtimeExecutable": "cmd",
"runtimeArgs": [
"/c",
"set FASTAPI_URL=http://127.0.0.1:8791&& set NEXTAUTH_URL=http://localhost:3000&& npm --prefix src/frontend run dev"
],
"port": 3000
},
{
"name": "frontend",
Expand All @@ -23,58 +31,29 @@
"port": 3000
},
{
"name": "frontend-migrated",
"runtimeExecutable": "cmd",
"runtimeArgs": [
"/c",
"set FASTAPI_URL=http://127.0.0.1:8000&& npm --prefix src/frontend run dev"
],
"port": 3000
},
{
"name": "frontend-migrated-3100",
"name": "backend-migrated",
"runtimeExecutable": "cmd",
"runtimeArgs": [
"/c",
"set FASTAPI_URL=http://127.0.0.1:8000&& set NEXTAUTH_URL=http://127.0.0.1:3100&& npm --prefix src/frontend run dev -- -p 3100"
"scripts\\dev\\run_csc_python.cmd -m invoke dev-local --migrate --dump 261001"
],
"port": 3100,
"url": "http://127.0.0.1:3100"
"port": 8000
},
{
"name": "frontend-migrated-8010",
"name": "frontend-migrated",
"runtimeExecutable": "cmd",
"runtimeArgs": [
"/c",
"set FASTAPI_URL=http://127.0.0.1:8010&& set NEXTAUTH_URL=http://127.0.0.1:3100&& set NEXT_DIST_DIR=.next-3100&& npm --prefix src/frontend run dev -- -p 3100"
],
"port": 3100,
"url": "http://127.0.0.1:3100"
},
{
"name": "backend-261012",
"runtimeExecutable": "C:/Users/EFESTWIN/miniconda3/envs/csc/python.exe",
"runtimeArgs": [
"-u",
"scripts/dev/serve_migrated.py",
"--dump",
"261012",
"--no-migrate",
"--assets",
".dev/assets-261012",
"--port",
"8791",
"--mongo-port",
"27791"
"set FASTAPI_URL=http://127.0.0.1:8000&& npm --prefix src/frontend run dev"
],
"port": 8791
"port": 3000
},
{
"name": "frontend-261012",
"name": "frontend-migrated-3100",
"runtimeExecutable": "cmd",
"runtimeArgs": [
"/c",
"set FASTAPI_URL=http://127.0.0.1:8791&& set NEXTAUTH_URL=http://127.0.0.1:3100&& set NEXT_DIST_DIR=.next-3100&& npm --prefix src/frontend run dev -- -p 3100"
"set FASTAPI_URL=http://127.0.0.1:8000&& set NEXTAUTH_URL=http://127.0.0.1:3100&& npm --prefix src/frontend run dev -- -p 3100"
],
"port": 3100,
"url": "http://127.0.0.1:3100"
Expand Down
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
*.sh text eol=lf
uberspaceconfig/crontab/crontab.example text eol=lf
uberspaceconfig/html/** text eol=lf
*.cmd text eol=crlf
6 changes: 3 additions & 3 deletions .zenodo.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"title": "Catalog of Second Chances (CSC) - Digital Database and Corresponding Interfaces for ReUse of Architectural Components (v0.6.3.0)",
"version": "0.6.3.0",
"title": "Catalog of Second Chances (CSC) - Digital Database and Corresponding Interfaces for ReUse of Architectural Components (v0.6.3.1)",
"version": "0.6.3.1",
"upload_type": "software",
"description": "<p>The <em>Catalog of Second Chances (CSC)</em> is a prototypical digital component database. It catalogs digital representations of uniquely identifiable architectural components for reuse. Furthermore, it provides corresponding interfaces and tools to leverage them via a backend REST-API, a web-frontend as well as a interface for direct interaction within Rhino Grasshopper.</p><h2>Changes in v0.6.3.0 (2026-10-21)</h2><h3>Added</h3><ul><li><strong>Access tokens</strong> (decision 8.167): admins create personal access tokens in Settings (30 days, 90 days or one year; shown once, stored only as a hash, at most 10 active), renew and revoke them; admins see and revoke every token on a new admin page. A token reads the catalog only where its scope allows; <code>GET /auth/token-check</code> tests one. The ground for the MCP layer and the Grasshopper device sign-in of this release.</li><li><strong>Using CSC from Claude</strong> (decision 8.168): an MCP endpoint at <code>https://&lt;api host&gt;/mcp</code> with nine read-only tools (search, components, versions, evidence, datasets, timeline, similar components). Add it as a custom connector in Claude; a browser window opens the consent page on the website, where an admin allows read access to the catalog as they see it in the web app. The connection renews itself for up to 90 days and can be revoked in the token list. Answers carry no e-mail addresses and mark everything that is not public.</li><li><strong>Grasshopper signs in without a password</strong> (decision 8.168): the Session component has a <code>SignIn</code> button (Windows). It opens the browser, you allow \"Grasshopper on this computer\" on the website, and the sign-in is stored for your Windows user (encrypted with DPAPI, one per server), outside every Grasshopper file. Later runs sign in by themselves and renew their token; <code>SignOut</code> ends the sign-in on the computer and the server. Each sign-in appears in the token list in Settings, where it can be revoked.</li></ul><h3>Changed</h3><ul><li><strong>Session component:</strong> new inputs <code>SignIn</code> and <code>SignOut</code>; <code>Refresh</code> is gone, because the sign-in renews itself. Connected <code>Username</code> and <code>Password</code> still win and stay the way to sign in on macOS; with them the component signs in again by itself when its 6-hour token runs out. Update the components with <code>CSC_Update</code>.</li><li><strong>Viewer:</strong> a \"Piece opacity\" slider in the Overlay panel fades the mesh, proxy or point cloud so reinforcement and other overlays show through. The Mesh and Point cloud switches are labelled and have an \"Off\" choice instead of the \"Show mesh\" and \"Show point cloud\" checkboxes; \"Show edges\" moved to the overlays.</li></ul><h3>Security</h3><ul><li><strong>A password change or reset ends every access token of the account</strong>: personal access tokens, Claude connections and Grasshopper sign-ins. Afterwards create a new token, allow Claude again and press <code>SignIn</code> again.</li></ul><h3>Server notes</h3><ul><li><code>CSC_PAT_ROLES</code> (optional, default <code>admin</code>) names the roles that may create access tokens.</li><li>The new collections <code>access_tokens</code>, <code>oauth_clients</code>, <code>oauth_requests</code>, <code>oauth_codes</code> and <code>oauth_used_refresh</code> need the same database rights as the others; their indexes are created at the start.</li><li>Set <code>CSC_PUBLIC_API_URL=https://&lt;api host&gt;</code> (no path) in the backend environment: it turns on <code>/mcp</code> and the OAuth server and is the address the connector is given. It also becomes the base of the links in the JSON-LD export (if it was unset so far, those links took the request's own address). After the restart, check that <code>https://&lt;api host&gt;/.well-known/oauth-protected-resource/mcp</code> answers, then add the connector once in claude.ai.</li><li>The deploy installs the MCP Python SDK (<code>mcp</code>) and its dependencies (<code>cryptography</code> among them).</li><li>In read-only mode <code>/mcp</code> and the token renewal keep working; a code issued just before the switch can still be exchanged once. New consents are refused until the flag is gone.</li></ul><p>Full history: <a href=\"https://github.com/digitaldesignunit/csc/blob/v0.6.3.0/CHANGELOG.md\">CHANGELOG.md</a></p>",
"description": "<p>The <em>Catalog of Second Chances (CSC)</em> is a prototypical digital component database. It catalogs digital representations of uniquely identifiable architectural components for reuse. Furthermore, it provides corresponding interfaces and tools to leverage them via a backend REST-API, a web-frontend as well as a interface for direct interaction within Rhino Grasshopper.</p><h2>Changes in v0.6.3.1 (2026-10-21)</h2><p>A hardening release after 0.6.3.0.</p><h3>Changed</h3><ul><li><strong>Viewer:</strong> mesh edges stay crisp over the faces instead of breaking up at some angles; close zooms no longer cut a piece open, and small pieces open filling the view. A version switch while the mesh or the point cloud is Off loads nothing hidden.</li><li><strong>Evidence:</strong> a core record links to its paired rebound record; a piece with several reinforcement layouts shows all of them.</li><li><strong>Geometry:</strong> replacing the meshes or clouds of a draft also removes the files and markers of the dropped ones; a frame-only cache entry no longer carries descriptor data; the outline vertex limit counts holes.</li><li><strong>Release tooling:</strong> <code>invoke release-prep</code> sets the CHANGELOG date, writes <code>.zenodo.json</code> and runs the version checks in one step; <code>bump-version --gh</code> leaves the Session component alone when its client version already matches. The local launch entries and the old scripts work without a user path; the local server script is now <code>scripts/dev/serve_dump.py</code> (<code>invoke dev-local</code>; <code>invoke dev-migrated</code> still works and says so), migrating an old 0.5 dump only with <code>--migrate</code>; it writes <code>.dev/dev-local-credentials-&lt;port&gt;.txt</code> and <code>.dev/local-&lt;port&gt;.json</code>.</li></ul><h3>Security</h3><ul><li><strong>Failed access-token lookups are limited per address</strong> (429 with <code>Retry-After</code>); valid tokens are never counted.</li><li><strong>Token clean-up:</strong> the tokens and connections of a deleted account are removed with it; revoked and expired tokens are deleted 90 days later.</li></ul><h3>Server notes</h3><ul><li>Existing token rows get their clean-up date from the daily user maintenance run (not while the read-only flag is set); no step needed.</li></ul><p>Full history: <a href=\"https://github.com/digitaldesignunit/csc/blob/v0.6.3.1/CHANGELOG.md\">CHANGELOG.md</a></p>",
"creators": [
{
"name": "Eschenbach, Max Benjamin",
Expand Down
33 changes: 33 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,39 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.6.3.1] - 2026-10-21

A hardening release after 0.6.3.0.

### Changed

- **Viewer:** mesh edges stay crisp over the faces instead of breaking up at some angles; close
zooms no longer cut a piece open, and small pieces open filling the view. A version switch
while the mesh or the point cloud is Off loads nothing hidden.
- **Evidence:** a core record links to its paired rebound record; a piece with several
reinforcement layouts shows all of them.
- **Geometry:** replacing the meshes or clouds of a draft also removes the files and markers
of the dropped ones; a frame-only cache entry no longer carries descriptor data; the outline
vertex limit counts holes.
- **Release tooling:** `invoke release-prep` sets the CHANGELOG date, writes `.zenodo.json` and
runs the version checks in one step; `bump-version --gh` leaves the Session component alone
when its client version already matches. The local launch entries and the old scripts work
without a user path; the local server script is now `scripts/dev/serve_dump.py` (`invoke
dev-local`; `invoke dev-migrated` still works and says so), migrating an old 0.5 dump only
with `--migrate`; it writes `.dev/dev-local-credentials-<port>.txt` and `.dev/local-<port>.json`.

### Security

- **Failed access-token lookups are limited per address** (429 with `Retry-After`); valid tokens
are never counted.
- **Token clean-up:** the tokens and connections of a deleted account are removed with it;
revoked and expired tokens are deleted 90 days later.

### Server notes

- Existing token rows get their clean-up date from the daily user maintenance run (not while the
read-only flag is set); no step needed.

## [0.6.3.0] - 2026-10-21

### Added
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Thank you for helping with the Catalog of Second Chances (CSC). Everyone taking
Releases are made by the maintainers only; tags `v*` are protected.

- `VERSION` and the changelog section are set with `invoke bump-version <version>`; `.zenodo.json` follows with
`invoke zenodo`.
`invoke release-prep`, which also dates the section and runs the release checks.
- Pushing the tag `v<version>` on `main` runs CI, builds the three bundles (backend, frontend, Grasshopper
interface), publishes the GitHub release and asks for approval before the deploy.
- The Grasshopper bundle takes its files from `grasshopper_release/`:
Expand Down
46 changes: 35 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ framework

## Current Versions

- **CSC**: 0.6.3.0 --- backend, web frontend and Grasshopper interface are released together
under one version (tag `v0.6.3.0`); the single source is the `VERSION` file.
- **CSC**: 0.6.3.1 --- backend, web frontend and Grasshopper interface are released together
under one version (tag `v0.6.3.1`); the single source is the `VERSION` file.

See `CHANGELOG.md` for release notes.

Expand Down Expand Up @@ -105,10 +105,25 @@ UserObjects talk to production by default; to use a local backend, set the `Serv

For browser checks open the web app as `http://127.0.0.1:<port>`, not
`localhost`: cookies do not separate by port, so a second dev server on another
port (a throwaway `invoke dev-migrated` with `NEXT_DIST_DIR` and
port (a throwaway `invoke dev-local` with `NEXT_DIST_DIR` and
`NEXTAUTH_URL=http://127.0.0.1:<port>`) would otherwise share its NextAuth
session with the first.

**A local copy of the newest dump** (for checking the web app against real
data) starts from `.claude/launch.json`: `backend-local` (the newest
`mongodb_collections_local/<yymmdd>` folder, a throwaway `mongod` on 27791, the
backend on http://127.0.0.1:8791, assets copied to `.dev/assets-261012`) and
`frontend-local` (http://localhost:3000). Both run through
`scripts/dev/run_csc_python.cmd`, which finds the conda environment `csc`
without a path of your account: `CSC_PYTHON` (a `python.exe` you name), the
active environment when it is `csc`, the conda base from `CONDA_EXE`, the usual
install folders under `%USERPROFILE%` and `%ProgramData%`, then `conda run -n
csc`. The sign-in `dev-admin` has a new password at every start, written to
`.dev/dev-local-credentials-8791.txt`. The script is `scripts/dev/serve_dump.py`
(`invoke dev-local` runs it too); it loads a dump as it is, and `--migrate`
runs the 0.6 cutover steps on an old 0.5 dump. A collection with no export file in
the dump is not loaded, and an export file of 0 bytes holds no documents.

### Tests

```
Expand Down Expand Up @@ -198,10 +213,10 @@ two places you need to set them:
**1. `~/.bash_profile`** - for the cron jobs and the deploy script: copy the
template `uberspaceconfig/.bash_profile.example` and fill it in (MongoDB, JWT,
SMTP with the optional `SMTP_REPLY_TO`, the support address that replies to the
verification and password-reset mails go to, asset folders, CORS origins; optionally `GITHUB_CSC_GH_TOKEN` for higher
GitHub rate limits in `CSC_Update`). Optional: `CSC_MAX_DATASETS_PER_USER`
(default 3), how many datasets a non-admin account may create; admins are
not limited.
verification and password-reset mails go to, asset folders, CORS origins;
optionally `GITHUB_CSC_GH_TOKEN` for higher GitHub rate limits in
`CSC_Update`). Optional: `CSC_MAX_DATASETS_PER_USER` (default 3), how many
datasets a non-admin account may create; admins are not limited.

Apply immediately by running: `source ~/.bash_profile`

Expand Down Expand Up @@ -273,10 +288,19 @@ push is automated.

**Cutting a release**

1. On your working branch: `invoke bump-version --version 0.5.1.1` (add `--gh`
if the Grasshopper UserObjects changed --- then re-export the changed
`.ghuser` / XML in Rhino). Fill in the new `CHANGELOG.md` section: it becomes
the release notes.
1. On your working branch, in this order:
1. `invoke bump-version --version 0.5.1.1` writes the version everywhere and
opens a `## [0.5.1.1] - unreleased` section in `CHANGELOG.md`. Add `--gh`
if the Grasshopper UserObjects changed --- then re-export the changed
`.ghuser` / XML in Rhino. With `--gh`, a client version that already is
the new version leaves `DDU_CSC_Session.py` as it is (the `Version:`
header keeps matching the exported `.ghuser`).
2. Fill in that `CHANGELOG.md` section: it becomes the release notes.
3. `invoke release-prep` (`--date YYYY-MM-DD`, default today) dates the
section, writes `.zenodo.json`, runs the version check for the tag and
the Zenodo check, and runs `tests/ci`. It stops with an error if the
section is missing or empty or a check fails, and prints the next steps;
a second run only checks.
2. Run the whole suite once locally, including the slow tests:
`invoke test-release` (set `CSC_TEST_RHINO=1` for the headless Rhino tests and
`CSC_DUMP_DIR` for the migration on a dump). CI no longer runs `tests/catalog`,
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.6.3.0
0.6.3.1
Loading
Loading