Upgrade to Hedron 1.1¶
This guide starts with the current 1.1 migration boundary, then retains historical notes for
older release trains. The published release is 1.1.2 on the 1.1.x line. Read
Current release and support for the published PyPI status before changing
an application requirement.
1.0 → 1.1¶
Hedron 1.1 extends the stable 1.x application model without changing the core page, view, and action authoring roles. Upgrade the coordinated packages together and review the new contracts only where the application needs them:
| 1.1 area | What to review |
|---|---|
| Identity and resources | Add presentation hooks where views need identity or resource context |
| Collections | Normalize paginated responses with bounded page and cursor state |
| Navigation | Use request-aware navigation decisions for links, redirects, and prefetch |
| Secure forms | Use write-only secret fields and explicit keep, replace, or clear operations |
| Application builds | Adopt the application-aware build contract for reproducible release artifacts |
| Presentation | Review native shell refinements and computed-style browser evidence |
Upgrade the stable packages from PyPI:
Read What’s new in 1.1 and the 1.1.2 release notes for the complete feature and evidence boundary. Keep the application’s existing integration tests and add coverage for any newly adopted collection, navigation, or secure-form behavior.
Historical: 0.67 → 1.0¶
Hedron 1.0 is a subtractive, canonicalization release. Migrate the ordinary route surface to the three function roles below; each old spelling has a structured warning and a static finding.
| 0.67 path | 1.0 path | Notes |
|---|---|---|
@app.screen |
@app.page |
Return one document tree; keep explicit Page when needed |
@app.refreshable / @app.fragment |
@app.view |
View handlers return one tree and produce a view handle |
@app.command / @app.form_command |
@app.action |
Unsafe requests default to POST and produce an action handle |
app.include_feature(...) |
app.include(...) |
Feature ownership remains explicit |
@router.component |
@router.view |
Advanced router integration; unsafe routes use @router.action |
Run the non-executing check first, review the proposed diff, and only then write an output tree:
python -m hedron --app app:app check --target 1.0 --project .
python -m hedron migrate api --target 1.0 . --out migrated-app
The migrator is intentionally conservative: region-specific, dynamic, direct-import, and unsafe-component forms remain manual-review findings. It never imports the application, executes source, or overwrites an existing output. Run the checker again on the reviewed result and keep the original tree for rollback until the application passes its own 1.0 checks.
The canonical source fixture is exercised by the repository bridge:
The bridge currently proves the baseline/current HTTP and HDJ probe only; it does not authorize publication while retained 1.0 artifacts and full release evidence are unavailable.
Historical release notes¶
The sections below document older upgrades and are not the 1.1 authoring path.
This guide covers upgrading an application to the stable 0.66.x train
(v0.66.2) from PyPI or a source checkout. The v0.67.0 train is Beta preview.
Public-index notes: Installation. New applications
should use Build your first app.
0.58 → 0.62¶
The 1.0.x checkout tip uses uv sync. See What's new in 0.62,
Hedron API, and Presentation.
- Upgrade the application pin to
hedron>=1.0.0. - Keep existing viewport responsive maps unchanged; opt into component-width behavior with
Container(query="inline-size")and addname=only for nested query targeting. - Use
StyleScope(variant=...)for explicit theme variants and retain the default theme marker for existing pages. - Replace app-owned button sizing/forwarding selectors with
Button/LinkButtonsize,width, and validatedattrs. - Run the compiler, browser, consumer, performance, and package checks after the upgrade.
0.57 → 0.58¶
The 1.0.x checkout tip uses uv sync. From the public index, install
hedron>=1.0.0. See What's new in 0.58,
Hedron API, and Presentation.
- Upgrade the application pin to
hedron>=1.0.0. - Prefer progressive facades for new golden paths:
@app.page,@app.view, and@app.action,DataWorkspace.with_screen,TaskFlow,DashboardWorkspace,SessionAuthFlow,UploadFlow, plusDesignSystem/StyleRecipe/StyleScopewhere styling applies. - Keep labeled Advanced
@app.page/ explicit handle spellings when graduating or ejecting; Flask/Django hosts remain Supported but are not decorator-parity Supported for these facades. - Use
hedron explain/hedron stylefor static redacted inspection of features and designs.
0.56 → 0.57¶
The 1.0.x checkout tip uses uv sync. From PyPI, install
hedron>=1.0.0. See
What's new in 0.57 and
Presentation.
- Upgrade the application pin to
hedron>=1.0.0. - Prefer named gap tokens (
sm/md/lg) over ambiguous CSS lengths. - Adopt Surface / chrome / ResourceList presentation markers instead of application CSS.
0.55 → 0.56¶
The 1.0.x checkout tip uses uv sync. From PyPI, install
hedron>=1.0.0. See
What's new in 0.56 and
Security control plane.
- Upgrade the application pin to
hedron>=1.0.0. - Adopt
SecurityPolicypresets andhedron security-checkfor posture baselines. - Prefer shared egress / sensitivity / intent helpers over package-local copies.
0.52 → 0.53¶
The published v0.64.0 train supersedes the older 0.52/0.53 pins. Keep
hedron>=1.0.0. See
What's new in 0.53 and
Application DX API.
- Application DX Stage 1 (RFC-0080 / D-091 / D-092). Prefer Stage 1 symbols
(
ApplicationAssetSpec/compile_application_asset_plan,ApplicabilityInterval/RemediationAction/normalize_severity_alias,export_routes_document/export_effect_graph,OperationWorkflow/is_terminal_job_state,generate_interaction_tests,run_visual_conformance,discover_public_api,diagnose_installed_fleet) over ad-hoc forks of the shipped 0.52 seams. - 0.52 conformance and Posit contracts remain. No rollback is required for apps upgrading from those historical pins.
# From the published PyPI train:
python -m pip install -U "hedron>=1.0.0"
# In-tree / source checkout tip:
# python -m pip install -U "hedron>=1.0.0"
0.51 → 0.52¶
Require hedron>=1.0.0 from PyPI (v0.52.0 LANDED). See
What's new in 0.52.
- Conformance authority (RFC-0079 / D-089 / D-090).
hedron-conformanceis the portable-subset authority extendinghedron-portable-1. Node/Java evaluators are independently installable reference consumers — not full Hedron ports. - Posit lifecycle (#508–#513). Prefer
CookieRegistry,PositContext/posit_for(request), opt-inhands_off, andhedron-posit check --matrixover app-owned cookie path math and redirect adaptation. - 0.51 extras contracts remain. No rollback required for apps that never adopted Posit lifecycle helpers; add them when deploying under Workbench/Connect mounts.
0.50 → 0.51¶
Require hedron>=1.0.0 from PyPI (or the in-tree 0.53 tip when developing Hedron
itself). See What's new in 0.51.
- Curated extras depth (RFC-0078 / D-087 / D-088).
ExtrasFeatureis thehedron-extrasinventory authority; shared extras HTMX hosts reconnect after swaps. JSON/Data/Chart workbenches stay cancelable and revision-aware. - Sandbox stays opt-in. Default plugin registration requires
hedron_extras_sandbox/HEDRON_EXTRAS_SANDBOX=1;BrowserPythonSandboxstays Experimental. - Companion flagship authoring (#504–#506). Password show/hide, opt-in
SwapReveal, and generic HTMX busy viaBusyRegion/Hx(busy=...). - 0.50 Explorer and HTMX contracts remain. No rollback required for apps that never
adopted
hedron[extras]; add the extra when you want the new widgets.
Summary¶
Hedron 0.64.x ships responsive navigation, bounded optimism, and localized failure isolation
on top of the progressive feature and styling authoring train. Install hedron>=1.0.0
from PyPI.
Hedron 0.60.x shipped progressive feature and styling authoring on top of the 0.57
presentation train. Install hedron>=1.0.0 from PyPI.
- Screens, form commands, workspaces, TaskFlow, DashboardWorkspace, SessionAuthFlow, UploadFlow, DesignSystem / StyleRecipe / StyleScope, explain/style CLI (Hedron API · Presentation)
Hedron 0.57.x ships unified presentation / zero-application-CSS on top of the 0.56 security control plane.
- Shared appearance vocabulary, Surface/chrome/ResourceList, zero-app-CSS evidence (Presentation)
Hedron 0.53.x tip ships Application DX Stage 1 contracts on top of the 0.52
conformance/Posit train. From PyPI, keep using hedron>=1.0.0 until the
0.53 wheel lands.
- Application assets, diagnostics, routes, workflows, testgen, theming, discovery, and fleet doctor (Application DX API)
Hedron 0.52.x ships cross-language conformance authority and Posit lifecycle
companions on top of the 0.51 extras train (v0.52.0 on PyPI).
- Portable-subset conformance authority + Node/Java evaluators
CookieRegistry,PositContext,hands_off, matrix check, diagnostics (#508–#513)
Hedron 0.51.x ships curated extras and companion HTMX authoring on top of the 0.50 Explorer architecture cut:
ExtrasFeature, shared extras HTMX lifecycle, workbench/image/input depth, sandbox opt-in- Accessible password toggle, swap reveal, and generic HTMX busy (#504–#506)
Hedron 0.50.x ships Explorer architecture and companion HTMX authoring on top of the 0.49 FastAPI/Pydantic convergence:
- Thin
explorer_router,ExplorerProviderisolation, cursor pagination, catalog diffs, and CLI/HTML/JSON agreement whenhedron-exploreris installed - Production still force-offs
explorer="development"afterRISK_EXPLORER_DEVELOPMENT(accept the risk, Explorer still does not mount) ActionHandle.effect/after(load=),Lazyerror templates,Select.depends_on, and dangerToastdismiss compile to HTMX- 0.49 handle, TypeSchema, and catalog contracts remain:
Hedron 0.49.x compiles existing handle, TypeSchema, and catalog plans onto FastAPI:
DependsOn/DependencyLifetimecompile to FastAPIDepends(scope="function"|"request")BoundaryBindingPlanchooses native-model or expanded-fields;BindingPlanstays URL identity- Additive TypeSchema v2 input/output projections; v1 readers remain
- Tagged public-wire
kindunions and cached TypeAdapter on non-FormBody candidates - Router provenance, OpenAPI projection, and non-granting
RequiresScopes - Workbench/Posit keep custom loaders. FailFast / Pydantic
MISSINGstay research-only
0.48 HTMX extensions remain:
- Closed
Page.htmx_extensions/HtmxExtension/ExtensionSetwith demand-driven pinned localsse,head-support, andpreloadassets - Unset pages keep the 0.47
sse+head-supportcompatibility default;htmx_extensions=()loads zero extension bytes SseRegion/SseTriggerover experimental SSE helpers; polling remains the Supported fallback- Idiomorph / morph swap is Deferred and is not a Supported capability
Maps from 0.47 remain:
MapSpec/MapPlan/compile_mapcompile a closed, redacted map grammarhedron_maps.Mapdefaults to attributedOpenStreetMap.standard(); corehedron.Mapis unchanged- Custom XYZ / TileJSON / vector sources, static images, PMTiles, bounded MBTiles, and blank maps
- Pinned strict-CSP MapLibre behind
hedron-map;MapInteractionbinds declared events - Semantic table alternatives survive no JavaScript / WebGL / CSP / network failure
Apps that never install hedron-maps stay request-path identical to 0.46. Direct
hedron.Map and explicit chart map adapters remain. Prior trains remain in force:
package-native workflows (0.46), interaction catalog (0.45), type-driven authoring (0.44),
refreshable views and commands (0.43), production-grade
Web Component inventory (0.42), browser composition / draft transfer / navigation (0.41),
authoring kit (0.40), rich data / OptimisticMutation (0.39), high-fidelity charts
(hedron-charts 0.2.x, 0.38), MCP (hedron-mcp 0.2.x), Workbench ASGI
(fastapi-workbench 1.x), and Posit (hedron[posit] / HedronPosit). Polling remains
the production recommendation for live status. SSE, WebSocket, streaming, and navigation
preload remain experimental.
Before upgrading¶
- Commit or back up your lockfile.
- Confirm you are on a recent pin (
hedron>=0.29.0,<0.30through>=1.0.0, or the tip pin already). Public-index notes: Installation. - Existing 0.42–0.46 handlers and unused
include_featurekeep working. - Adopt maps only via
hedron[maps]/from hedron_maps import …. - If you use editable grids or charts, keep
hedron[data]/hedron[charts]on the tip pin (orhedron-charts>=0.2.3,<0.3). - If you use Posit Workbench or Connect, prefer
hedron[posit]/HedronPosit.
Install¶
python -m pip install -U "hedron>=1.0.0"
python -m pip install -U "hedron[data]>=1.0.0"
python -m pip install -U "hedron[charts]>=1.0.0"
python -m pip install -U "hedron[maps]>=1.0.0"
# optional production-grade elements inventory:
python -m pip install -U "hedron[elements]>=1.0.0"
Public-index notes: Installation.
Behavioral notes (0.46 → 0.47)¶
- Core Map stays core.
from hedron import Mapdoes not gain an OSM default or MapLibre host. - OSM default is
hedron_maps.Maponly.basemap=Noneis a blank map, not OSM. - Charts map adapters stay explicit. MapLibre/Folium/PyDeck on
hedron-chartsdo not silently switch tohedron-maps. - Rollback: uninstall
hedron-mapsand reverthedron_mapsimports; pinhedron>=0.46.0,<0.47from the registry. - Map origin policy. Custom
OpenStreetMap(tile_url=...)andMap(tiles=)require exact-origin allowlists; empty prefixes fail closed. - Generated list views page.
DataWorkspacelist routes honoroffset/limit/sort/qand allowlisted field filters. - MCP authorize isolation. Pin
hedron-mcp>=0.2.4,<0.3with coordinated 1.0 artifacts (or use the publichedron[mcp]>=1.0.0pin) so a secondMcpExposure.applycannot overwrite the first tool's authorize hook.
Behavioral notes (0.45 → 0.46)¶
Hedron 0.46.x added opt-in package-native features that compile onto existing 0.43–0.45 seams:
FeatureBundle/Hedron.include_featureatomically register ordinary handles, components, scenarios, and stacked projections; they are not executorsDataWorkspaceproduces a beginnerapp.include(orders)bundle over an explicitDataEditorSourceandDataWorkspacePolicyChartInteractionmaps Supportedselect/inspect/focus/resetontoActionHandleeffects;legend_filter/brush/drill_intentstay Experimental- Schema-aware elements are opt-in (
ActionHandle.form(enhance="elements")); native forms remain canonical -
McpExposureandRemoteWorkflowwrap live MCP/Gradio registration; catalog presence never grants exposure -
Bundles are not executors.
include_featureregisters ordinary 0.43–0.45 handles, components, scenarios, and stacked projections. Authz stays explicit; catalog presence is not a capability. - Unused include is request-path identical. Apps that never call
include_featurekeep the 0.45 request path. - MCP/Gradio stay opt-in.
McpExposure/RemoteWorkflowwrap live registration; consuming the catalog never grants exposure. - Rollback: pin
hedron>=0.45.0,<0.46. Eject or removeinclude_featurefirst; explicit handlers stay.
Behavioral notes (0.44 → 0.45)¶
- Catalog is not authority. Routes, validation, authorization, and execution still come from
0.43 descriptors and optional 0.44
TypeSchema. Catalog ids/fingerprints are not capabilities. - Unused catalog is request-path neutral. Apps that never inspect
app.interactionskeep the 0.44 request path. - Production
interactions.jsonis required only when the live sealed catalog has entries. - Rollback: pin
hedron>=0.44.0,<0.45. Remove catalog consumers first; handlers stay.
Behavioral notes (0.43 → 0.44)¶
- Opt-in only. Unmodeled handlers keep structural
bind, explicit forms, and dynamic/observed effects.schemastaysNoneuntil a Hedron marker is present. - One compiled validator.
bind(model)andbind(**fields)share the Pydantic adapter. A bareBaseModelargument is not inferred as a boundary. - Forms are inventory-backed.
ActionHandle.form()exists only for a supportedFormBody. Nested models, unions, and lists of models need explicitFormoverrides. - Declared effects do not execute. Actual
refresh()/PatchSettargets must be a subset of declared same-app handles. - Rollback: pin
hedron>=0.43.0,<0.44. Generated form ids follow the 0.43 handle ids.
Behavioral notes (0.42 → 0.43)¶
- This historical 0.43 note predates the 1.0 boundary. In 1.0,
@app.viewand@app.actionare canonical handle-producing decorators; use the 0.67 → 1.0 section above for migration. - Refresh is not a full page reload. Top-level
refresh()compiles to boundedHX-Triggerevents; it does not setHX-Refresh. - Generated ids are not rollback-stable. Explicit
path=/key=are the compatibility hatches. Rollback: pinhedron>=0.42.0,<0.43. - Mixed refresh + patch in one return fails closed. Toast + refresh is allowed.
After upgrading¶
- Keep existing pages and 0.46 map-free routes running unchanged, then add one
hedron_maps.Mapat a time. - Smoke OSM, custom XYZ, and one offline path (static image or blank map) with and without JavaScript.
- Confirm Explorer
/hedron-explorer/mapsandhedron inspectwithout treating catalog presence as exposure.