Skip to content

Releases: moonrockz/smithy

v0.6.0

Choose a tag to compare

@github-actions github-actions released this 24 Oct 05:50
faa6d34

Install:

  • mise use github:moonrockz/smithy@0.6.0
  • moon add moonrockz/smithy-syntax@0.6.0

Wasm files:

  • Both wasm files export memory and _start and need a host supplying the MoonBit __moonbit_fs_unstable imports and WASI fd_write, path_open and fd_close. JSONL file output uses a working-directory preopen at descriptor 3; the pinned moonrun provides these imports and bounds file output to that directory.
  • smithy.wasm also imports WASI fd_read for stdin and proc_exit for exit status. smithy-gc.wasm additionally needs WebAssembly GC and spectest.print_char.
  • wasmtime alone cannot instantiate either file because it lacks the MoonBit host imports.

This release adds JSON-RPC support. smithy validate rpc checks requests, responses, batches and whole transcripts against a Smithy model, smithy validate value checks JSON and native Ion values, and the OpenRPC transform exports Smithy JSON-RPC services. Model validation time is now linear in the shape count: a model of 4,000 shapes validates in less than a second, not in minutes. The new project site has docs, examples and an in-browser playground that validates, transforms and checks transcripts with no server. Two changes break existing use: replace smithy validate-value with smithy validate value, and add kind to code that builds a SourceLocation with a struct literal, or use SourceLocation::new.

⚠️ Breaking changes

  • (validation) Use smithy validate value instead of smithy validate-value. Model inputs and options follow the nested subcommand. No legacy alias is provided. (#44)
  • (cli) SourceLocation has a new field kind : SourceKind. Code that builds a SourceLocation with a struct literal must add kind, or use SourceLocation::new(file, path~, span?, kind~ = User). Code that only reads a location needs no change. (#57)

🚀 Features

🐛 Bug fixes

  • (validation) Support recorded RFC 3339 leap seconds (#43) by @DamianReeves
  • (validation) Make unreadable transcript input and refused entries consistent (#52) by @DamianReeves
  • (cli) Report an unreadable stdin on js instead of crashing (#53) by @DamianReeves
  • (cli) [breaking] Resolve the smithy.rpc traits in every model command (#57) by @DamianReeves
  • (site) Link the other version to a page it has (#59) by @DamianReeves

⚡ Performance

  • (smithy) Make model validation linear in the shape count (#61) by @DamianReeves

🏗️ Build and CI

Full changelog: v0.5.0...v0.6.0

v0.5.0

Choose a tag to compare

@github-actions github-actions released this 21 Oct 15:41
882977d

Install:

  • mise use github:moonrockz/smithy@0.5.0
  • moon add moonrockz/smithy-syntax@0.5.0

Wasm files:

  • Both wasm files export memory and _start and need a host supplying the MoonBit __moonbit_fs_unstable imports and WASI fd_write, path_open and fd_close. JSONL file output uses a working-directory preopen at descriptor 3; the pinned moonrun provides these imports and bounds file output to that directory.
  • smithy.wasm also imports WASI fd_read for stdin and proc_exit for exit status. smithy-gc.wasm additionally needs WebAssembly GC and spectest.print_char.
  • wasmtime alone cannot instantiate either file because it lacks the MoonBit host imports.

Validate JSON files against Smithy shapes with smithy validate-value or reuse prepared contracts from the new moonrockz/smithy-validation package. Structured findings identify exact instance paths, preserve numeric precision and enforce bounded traversal and pattern work across supported targets. This release also adds OpenAPI export and model compatibility diffs with JSONL event output. The shared JSON-RPC/OpenRPC design is documented for the next protocol-validation slices; date-time value validation currently excludes leap-second notation.

🚀 Features

🐛 Bug fixes

  • (release) Update every package pin in standalone consumers (#41) by @DamianReeves

Full changelog: v0.4.0...v0.5.0

v0.4.0

Choose a tag to compare

@github-actions github-actions released this 21 Oct 03:01
5f496d6

Install:

  • mise use github:moonrockz/smithy@0.4.0
  • moon add moonrockz/smithy-syntax@0.4.0

Wasm files:

  • smithy.wasm needs a host that supplies the __moonbit_fs_unstable imports and wasi_snapshot_preview1.fd_write. wasmtime alone fails with unknown import: __moonbit_fs_unstable::….
  • smithy-gc.wasm needs a host with WebAssembly GC that supplies the __moonbit_fs_unstable imports and spectest.print_char. wasmtime alone fails with unknown import: __moonbit_fs_unstable::….

The new moonrockz/artifact-resources package loads selected resource trees from directories, ZIP/JAR, tar/gzip and npm archives, with validated paths, logical aliases and structured provenance. Smithy build sources, global imports and projection imports can now acquire public archive URLs, pinned GitHub release assets, exact npm versions and pinned Maven JARs with integrity verification, shared caching and explicit offline builds. Private repositories accept supplied Bearer or Basic credentials bound to exact origins through environment references; redirects strip authorization across origins and authenticated cache entries are isolated. Existing JSON string inputs and JAR manifest discovery remain compatible. Library callers must migrate resource metadata to domain types, wrap path inputs with BuildInput::from_path, initialize the added cache/offline/credential configuration fields, handle the new input/provenance/diagnostic variants, and update custom HTTP transports to receive HttpRequest as detailed below.

⚠️ Breaking changes

  • (resources) Resource metadata uses validated domain types; BuildConfig.sources, BuildConfig.imports and ProjectionConfig.imports contain BuildInput values. Use BuildInput::from_path for legacy library inputs. JSON string configuration remains compatible. API migration and selection rules are documented. (#28)
  • (resources) BuildInput adds Remote(PublicArchive, Selection), and with_location can raise BuildError for invalid remote replacement URLs. Exhaustive ResourceCode and ProvenanceStep matches need acquisition cases. (#30)
  • (resources) Direct BuildConfig constructors must initialize cache_directory: CacheDirectory and offline. Parsed configuration supplies defaults. Exhaustive Location matches must handle FilesystemDirectory. (#31)
  • (resources) Exhaustive matches must handle BuildInput::GitHub, GitHubRequestStep/GitHubStep provenance, and MissingRelease, AmbiguousAsset and RateLimited resource codes. (#32)
  • (resources) Exhaustive BuildInput matches must handle Npm(NpmArchive, Selection) and Maven(MavenArchive, Selection?); None selects Maven manifest discovery. Exhaustive ProvenanceStep matches must handle NpmRequestStep, NpmStep, MavenRequestStep and MavenStep; ResourceCode matches must handle MissingPackageVersion, MissingArtifact and UnsupportedIntegrity. Repository input location() values are registry/repository bases and with_location() validates replacements. (#33)
  • (resources) HttpTransport receives HttpRequest instead of HttpUrl. Use request.url inside callbacks and HttpRequest::anonymous(url) for public host calls. Direct BuildConfig constructors must initialize credentials: Array[CredentialBinding]; use [] for anonymous acquisition. Parsed configuration supplies the default. (#34)

🚀 Features

Full changelog: v0.3.0...v0.4.0

v0.3.0

Choose a tag to compare

@github-actions github-actions released this 19 Oct 17:12
079015f

Install:

  • mise use github:moonrockz/smithy@0.3.0
  • moon add moonrockz/smithy-syntax@0.3.0

Wasm files:

  • smithy.wasm needs a host that supplies the __moonbit_fs_unstable imports and wasi_snapshot_preview1.fd_write. wasmtime alone fails with unknown import: __moonbit_fs_unstable::….
  • smithy-gc.wasm needs a host with WebAssembly GC that supplies the __moonbit_fs_unstable imports and spectest.print_char. wasmtime alone fails with unknown import: __moonbit_fs_unstable::….

Smithy now converts assembled models to JSON Schema through the new moonrockz/smithy-jsonschema package and the jsonSchema build plugin. The new moonrockz/smithy-build package and smithy build and smithy clean commands support projections, all 28 built-in transforms, local JAR imports and environment substitutions. smithy select evaluates selectors, and validation now runs configured and default validators with reference event IDs, severities, shape IDs and suppressions. Build outputs require a dedicated directory separate from sources and imports, with an ownership marker protecting existing files. Code that constructs Shape, ModelDiagnostic or LoadResult records directly must supply the added provenance, event_id and validation_findings fields respectively; loader callers need no record changes.

🚀 Features

Full changelog: v0.2.0...v0.3.0

v0.2.0

Choose a tag to compare

@github-actions github-actions released this 18 Oct 05:22
c29a8ea

Install:

  • mise use github:moonrockz/smithy@0.2.0
  • moon add moonrockz/smithy-syntax@0.2.0

Wasm files:

  • smithy.wasm needs a host that supplies the __moonbit_fs_unstable imports and wasi_snapshot_preview1.fd_write. wasmtime alone fails with unknown import: __moonbit_fs_unstable::….
  • smithy-gc.wasm needs a host with WebAssembly GC that supplies the __moonbit_fs_unstable imports and spectest.print_char. wasmtime alone fails with unknown import: __moonbit_fs_unstable::….

Smithy now loads smithy.contracts#conditions and validates JMESPath syntax, modeled member references, function arguments, and boolean results during assembly. The new moonrockz/jmespath package exposes standalone parsing, an inspectable AST with source spans, JSON evaluation, and diagnostics with source locations. IDL/JSON conversion preserves contract expressions and documentation. Serialization does not evaluate contracts. Existing models without contract traits need no changes.

🚀 Features

🏗️ Build and CI

Full changelog: v0.1.1...v0.2.0

v0.1.1

Choose a tag to compare

@github-actions github-actions released this 17 Oct 04:19
1ee3f0d

Install:

  • mise use github:moonrockz/smithy@0.1.1
  • moon add moonrockz/smithy-syntax@0.1.1
  • moonx moonrockz/zig-cross@0.1.1 --help

Wasm files:

  • smithy.wasm needs a host that supplies the __moonbit_fs_unstable imports and wasi_snapshot_preview1.fd_write. wasmtime alone fails with unknown import: __moonbit_fs_unstable::….
  • smithy-gc.wasm needs a host with WebAssembly GC that supplies the __moonbit_fs_unstable imports and spectest.print_char. wasmtime alone fails with unknown import: __moonbit_fs_unstable::….

The Smithy CLI now uses moonbitlang/core/argparse for command-specific help and standard option syntax. Use smithy help convert, smithy convert --help or -h to see a command's options; inline forms such as --to=json and -omodel.json are supported. Release publishing now retries temporary moonx asset availability failures, and generated migration notes preserve wrapped text.

🐛 Bug fixes

Full changelog: v0.1.0...v0.1.1

v0.1.0

Choose a tag to compare

@github-actions github-actions released this 17 Oct 03:35
35e1c12

Install:

  • mise use github:moonrockz/smithy@0.1.0
  • moon add moonrockz/smithy-syntax@0.1.0
  • moonx moonrockz/zig-cross@0.1.0 --help

Wasm files:

  • smithy.wasm needs a host that supplies the __moonbit_fs_unstable imports and wasi_snapshot_preview1.fd_write. wasmtime alone fails with unknown import: __moonbit_fs_unstable::….
  • smithy-gc.wasm needs a host with WebAssembly GC that supplies the __moonbit_fs_unstable imports and spectest.print_char. wasmtime alone fails with unknown import: __moonbit_fs_unstable::….

Smithy now assembles mixed IDL and JSON files into a semantic model and converts models in either direction. The CLI adds ast, validate, format and convert, and runs through moonx moonrockz/smithy-cli@0.1.0. Formatting preserves IDL comments; conversion emits flattened Smithy 2 models with exact numbers and one file per namespace. Parsing now rejects adjacent object and trait entries and reports corrected recovery locations. When upgrading from 0.0.1, import Piece and Step from scanner, and Depth and ParseError from parser; ShapeKind display now uses IDL keywords, and test helpers moved from lawkit to internal/lawkit.

⚠️ Breaking changes

  • (syntax) Import Piece and Step from scanner, and Depth and ParseError from parser. ShapeKind display uses IDL keywords. Test helpers moved from lawkit to internal/lawkit. (#11)

🚀 Features

🐛 Bug fixes

📚 Documentation

  • (zig-cross) Link the upstream issues for the wrapper workarounds (#9) by @DamianReeves

🏗️ Build and CI

Full changelog: v0.0.1...v0.1.0

v0.0.1

Choose a tag to compare

@github-actions github-actions released this 16 Oct 19:16
60d791e

Install:

  • mise use github:moonrockz/smithy@0.0.1
  • moon add moonrockz/smithy-syntax@0.0.1
  • moonx moonrockz/zig-cross@0.0.1 --help

Wasm files:

  • smithy.wasm needs a host that supplies the __moonbit_fs_unstable imports and wasi_snapshot_preview1.fd_write. wasmtime alone fails with unknown import: __moonbit_fs_unstable::….
  • smithy-gc.wasm needs a host with WebAssembly GC that supplies the __moonbit_fs_unstable imports and spectest.print_char. wasmtime alone fails with unknown import: __moonbit_fs_unstable::….

This is the first release of moonrockz/smithy. The moonrockz/smithy-syntax library parses Smithy IDL 1.0 and 2.0 into a lossless syntax tree and an AST, reports diagnostics with source carets, and gives several ways to walk the AST. The smithy command is available for Linux, macOS and Windows: install it with mise use github:moonrockz/smithy@0.0.1. In this release the command only prints its version. The new moonrockz/zig-cross tool cross-compiles MoonBit native programs with zig: run it with moonx moonrockz/zig-cross@0.0.1.

🚀 Features

📚 Documentation

  • Add the mise trust step to the agent setup instructions by @DamianReeves

🏗️ Build and CI