Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Regeneration and migration reports

Generate an SDK once, change the input specification or target options, then review the proposed regeneration before writing it:

tungsten diff --migration
tungsten diff --migration --json > migration.json

--migration implies --semver. It compares the stored .tungsten/surface.json with the newly compiled API and emitted package manifests. Each target's semver.migration.actions contains a stable rule, subject and recommended action. Human output includes the same guidance for renamed or removed methods, required inputs, changed types, agent tool names, deprecations and runtime requirements. Changes remain sorted deterministically.

diff runs emitters in memory and writes no generated files. Files beneath a directory named custom are excluded from regeneration diffs and preserved by generate; reports expose preserves_custom_files: true. Review changes and run consumer tests before running tungsten generate.

Snapshot format 3 records the generated package name, version and dependency requirements from npm, Python and Rust SDK manifests. A package rename can break imports and is classified major. A package version change is release metadata and does not imply a breaking API change. Dependency requirement changes carry runtime_dependency_changed and an action to inspect runtime compatibility, update installation declarations and lockfiles, and run integration tests. They do not invent an API major bump or claim that the installed runtime is compatible.

Format 2 snapshots remain readable. Their missing package/dependency metadata is unknown, rather than an empty dependency list: runtime_requirements_known is false, and migration guidance requests manual inspection of the previous package manifest. Existing API signature classification still works. A missing or unreadable snapshot leaves the semantic level null with a diagnostic; a future unsupported snapshot format is not silently interpreted.