Repository navigation
chore: release Forma packages - #14
Open
github-actions[bot] wants to merge 1 commit into
Open
github-actions[bot] wants to merge 1 commit into
github-actions[bot] wants to merge 1 commit into
Conversation
github-actions
Bot
force-pushed
the
changeset-release/main
branch
12 times, most recently
from
October 9, 2026 18:35
1388cba to
a7149c0
Compare
github-actions
Bot
force-pushed
the
changeset-release/main
branch
4 times, most recently
from
October 16, 2026 23:46
f840219 to
3a2185b
Compare
github-actions
Bot
force-pushed
the
changeset-release/main
branch
4 times, most recently
from
October 29, 2026 17:32
9752b1f to
93c3e29
Compare
github-actions
Bot
force-pushed
the
changeset-release/main
branch
9 times, most recently
from
November 4, 2026 03:10
43614b1 to
05913ae
Compare
github-actions
Bot
force-pushed
the
changeset-release/main
branch
2 times, most recently
from
November 4, 2026 05:02
3409133 to
7d6bc93
Compare
github-actions
Bot
force-pushed
the
changeset-release/main
branch
from
November 4, 2026 05:35
7d6bc93 to
b4dcba6
Compare
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.
Releases
@formalang/editor@0.4.0
Minor Changes
Consumers should install the same Effect version. Validate the Foldkit generator
and structural workbench with Foldkit and @foldkit/ui 0.170.0 and
@foldkit/vite-plugin 0.29.0.
HTTP API builders reject stream and protocol upgrade schemas in endpoint errors,
including schemas wrapped with response headers, matching Effect 4.1's contract.
for CodeMirror and LispEditor. Appearance changes preserve the document and undo
history. Export showMechanicsType to render the Effect checker's inferred types
in live authoring tools.
effect@4.0.0-rc.112to the stableeffect@4.0.3. Consumers must install thesame exact version for Forma's public Effect types.
Generated config readers use
Config.String/Int/Number/Boolean, and HTTPmodules import
effect/http-apiandeffect/http.Patch Changes
^4.1.1peer dependency so applications can share onecompatible runtime across Forma libraries. Keep repository tests pinned to
Effect 4.1.1.
for types, declarations, patterns, Effects, and forms (RFC 0001). Older source
must be rewritten; no compatibility layer or automated migration is provided.
typereplacesdefine-typeanddefine-schema, with records written{:field T},(Union :a :b),(Tagged ...), and(Option T)for optionalfields. Types use canonical names such as
String,Bool,Unit,List, and(Map String V); lowercase aliases and the{a b}set literal are removed.error,class,service,layer,macro, andformreplace theirdefine-forms,(Effect A)replaces(Effect A [] []),do!binds with[x e]and:letinstead of<-, andSome,None,Ok, andErrreplacesome,none,success, andfailure. Ontology declarations useentity,seed,attribute,query, andworkspace. Typedformdefinitions derivevalidation, bindings, projections, artifact contracts, completion, and
formatting. Canonical artifact payloads change shape, and tagged wire values use
the constructor name.
bootstrapFromFilesmoves from@formalang/ts/descriptorto the Node-only
@formalang/ts/nodeentry point so browser entry points do notimport the filesystem.
@formalang/host@0.4.0
Minor Changes
0b72bb2: Add RFC 0002 stage 2 compile-time modules. Files can import and export forms and
macros with private helpers kept in their defining scope, select an isolated
project prelude, and export declaration identity, schema metadata, and pure
compile-time data with provenance through portable interfaces. Core forms such
as
type,service, anddo!stay built in.48e95b6: Validate descriptor hooks, slot references, artifact validators, and payload contracts before committing a prelude load. Expose artifact emission, summaries, backend discovery, and typed stateful REPL submission through the JSON CLI and daemon. Support inline session emission without changing stored sources.
cc3a74f: Breaking: Distinguish Int and Float literals, inferred types, arithmetic, VM and evaluator
values, descriptors, host projections, and Effect schemas. Integral Float results
retain their kind. Int uses checked JavaScript safe integers; Number/Num are
rejected immediately in favor of Int or Float. Tagged JSON preserves nonfinite Floats and signed zero.
09642e5: Type host builtins in editor analysis and keep types around a type error.
analyzeEditoraccepts thehostBuiltinsandtypePolicythattypecheckdoes, or takes them fromsessionId's session, so a call to a host builtin is typed by itstypeSchemeinstead of failing as unbound. Editor analysis now reports every top-level form that does not type, and still types the other forms: a definition that fails is anything to its users, and one failing definition no longer leaves the definitions next to it untyped. Typed spans are resolved with everything inference learned, so a lambda's parameters show their types instead of type variables.Lsp.analyzeLspgainsinferOptions,inferProgramgains an opt-inonFormError, andEngine.typeInferOptionsis exported.6d3ea9c: Breaking: Use Effect 4.1.1 in Forma's public types and generated TypeScript.
Consumers should install the same Effect version. Validate the Foldkit generator
and structural workbench with Foldkit and @foldkit/ui 0.170.0 and
@foldkit/vite-plugin 0.29.0.
HTTP API builders reject stream and protocol upgrade schemas in endpoint errors,
including schemas wrapped with response headers, matching Effect 4.1's contract.
73cabb2: Add the TypeScript forma JSON CLI and daemon, filesystem module commands, optional load timings, core debug operations, and structural form digests. Validate host type configuration and report specific inference diagnostic codes with source spans.
bdc817d: Breaking: Add isolated file modules, host-owned relative resolution, explicit imports and exports, portable checked interfaces, and linked Effect TypeScript. Source loading no longer publishes bindings to other files. Re-exports preserve owning type and binding identities; generated files use real imports and exports.
535cd41: Add
forma add <name> <spec>,forma update [name], offlineforma verify,and
forma vendorto restore exact locked commits. Fetch arbitrary git serversthrough git and known forges through commit-pinned archives with git fallback.
Select transitive semver tags using highest-minimum selection, reject conflicting
refs or source locations, and stage complete results before updating project
files.
@formalang/ts/nodealso exposes these commands and a fetcher interface.535cd41: Add package imports (RFC 0020).
(import "@acme/flows/ir" [FlowIR])resolvesthrough the
exportsfield of a dependency'sforma.json.Modules may import only packages their own package declares, and package
modules get location-independent
pkg:<name>/<path>identities. The compilertakes a host package table (
ModuleCoreOptions.packages,configureSession({ packages }));@formalang/ts/nodebuilds one fromforma.json, verifiedforma.lock, and committedvendor/or relative sources. Theforma filecommands use it. Packages may declare a prelude for their own modules. Session
loading no longer bootstraps a file module's own forms as session descriptors,
so a module's form can use an imported
:irtype in sessions and the CLI.923ef53: Breaking: Remove the OCaml language hosts.
NodeOcamlLanguageHost,JsOcamlLanguageHost,parseOcamlJson, and the./ocaml-hostand./js-ocaml-hostentry points are gone, along with theFORMA_OCAML_CLIandFORMA_OCAML_JSsettings. UseTsLanguageHost,createDefaultLanguageHost, or theformaJSON CLI and daemon instead.83bbb56: Breaking: Upgrade the Effect runtime and generated TypeScript target from
effect@4.0.0-rc.112to the stableeffect@4.0.3. Consumers must install thesame exact version for Forma's public Effect types.
Generated config readers use
Config.String/Int/Number/Boolean, and HTTPmodules import
effect/http-apiandeffect/http.22c549f: Add id-addressed structural edit scripts.
@formalang/ts/editorexports theEditScriptEffect Schema,decodeEditScript,editScriptJsonSchemafor structured model output,describeNodesfor the context a model or preview needs, andapplyEditScript, which appliesreplace,insert,delete,wrap,splice,unwrap,raise,move, scope-awarerename, andextractoperations atomically, keeps the author's layout, and returns the new source with a reconciled identity, a change list, and before and after text for each affected form.TsLanguageHostimplements the optionalapplyEditScript,describeNodes, andeditScriptSchemahost methods.1e93832: Add slot affordances for editors.
formSlotsin@formalang/ts/editorfinds the innermost descriptor-registered form at a position or node and reports its identifiers and slots: which are present (with their values' node ids and spans), empty, missing, or repeatable, the slot the position is in, keyword lists that name no slot, and an edit-script insertion with template text such as(:trigger )for each, so an editor can render placeholders such as+ trigger.TsLanguageHostimplements the optionalformSlotshost method, usingdefine-forms from the session's sources.d950a22: Add opt-in per-expression observation.
evaluateandevaluateInSessionacceptobserveand returnobservations: for each author-written expression that ran, its node id and span, evaluation count, last value, and any failure raised there, also when the evaluation fails. The VM gains anOBSERVEinstruction emitted only for observed evaluations, the expander records the author-written origin of every rebuilt node (sourceOriginsOf) so values computed inside macro expansions map back to the call and its arguments, and the host bounds records, collection items, depth, and string length. In a session,retainValues: "all"gives each observed value avalueRef.d47da26: Add an outline codec for structural editors.
sourceToOutlinein@formalang/ts/syntaxreads source as rows in the style of indentation-sensitive Lisp (SRFI 119): a row's text holds the leading elements of its list and its children hold the rest, comments are rows, multi-line literals stay whole, and broken text becomes rows with errors instead of failing.outlineToSourceprints rows line for line, reuses the base document's layout for unchanged rows so reading and printing a source with itself as base is exact, gives every printed row's node the row's id, and can comment out rows that do not read.TsLanguageHostimplements the optionalsourceToOutlineandoutlineToSourcehost methods.4662c76: Add a symbol index for editors.
indexSymbolsin@formalang/ts/editorreturns definitions and references with node ids and spans for one or more documents. It resolves programs after macro expansion, so definitions made by macros are found and macro temporaries are not, handlesdefine,fn,let,do!,match,catch, types, typeclasses, services, and operations, and uses descriptors (includingdefine-forms in the indexed documents) for domain forms.findReferencesreturns a symbol's definition and references.TsLanguageHostimplements the optionalsymbolIndexandfindReferenceshost methods, including a session's loaded sources.e10e2b5: Add stable node identity for structural editors.
@formalang/ts/syntaxexportsidentifySyntax, which gives every syntax node and line comment an id, andreconcileSyntax, which carries ids to a new version of a document: nodes keep their ids when edits happen elsewhere, when they are retyped in place, and when they move with identical tokens. The trivia-preserving lexer now turns unterminated strings and unexpected characters into error nodes instead of throwing, soparsealways returns a tree.TsLanguageHostimplements the new optionalidentifySyntaxhost method.8f8e14b: Validate source structure and module directives at load time, and commit prelude
values and inferred types atomically. Add an optional typed
replSubmithostoperation that retains values, schemes, type registries, and sources only after
successful evaluation. Session typechecks use retained schemes; loading reports
validate-and-storethrough the version capability.Descriptor hooks and hosted helper type contracts remain pending the descriptor
metacheck port; bootstrap continues to validate their structure.
f5b3a0f: Validate declaration payloads and contracts before packaging artifacts.
@formalang/ts/artifactexportsemit,emitMany,emitBackends,artifactSummary,validateDeclarations, a namedArtifactValidatorRegistry,and descriptor payload-contract checks. Invalid declarations return
source-located diagnostics instead of being packaged, and packages hash
sorted-key canonical payload JSON with SHA-256.
LanguageHostgains optionalemit,emitMany,emitBackends, andartifactSummarymethods taking anEmitRequest.535cd41: Replace npm-based Forma package discovery with offline
forma.jsonmanifests,forma.lockverification, and committedvendor/<name>sources or relativepackages. Check the full dependency closure and report stale manifests, identity
mismatches, and missing, extra, or edited package files before compiling.
Patch Changes
a62797e: Make expansion and identity reproducible.
gensymnumbers names per expansionpass and per top-level evaluation instead of from a process-wide counter, so
the same program expands to the same names regardless of earlier work.
GensymScopeandwithGensymScopeare exported fromEvaluator. Source hashesand the session prelude fingerprint are now SHA-256 (previously 32-bit FNV-1a),
and the fingerprint no longer depends on locale or separator characters in
source ids. Source hashes are computed on first use.
The TypeScript host keeps keyword, symbol, and string map-key kinds when it
projects values, including bounded observations, and when it decodes host-call
results and arguments. A function or opaque projection whose
valueRefisretained in the session decodes to the retained value instead of its display
text.
1317204: Declare Effect as a
^4.1.1peer dependency so applications can share onecompatible runtime across Forma libraries. Keep repository tests pinned to
Effect 4.1.1.
646c433: Check
:pattern,:min-length,:max-length,:min,:max, and:finiterefinementsin form hole and IR types instead of rejecting refined fields, and generate the
matching Effect schema filters. Add
Null, JSONnull, as a schema type. Generate recursive Effect schemas withSchema.suspendunless the recursion passes through a brand or a class. Holetypes and scoped expressions accept enum aliases by member,
=reports aliteral outside an enum, generic
:scopefunctions are instantiated per use,and child form diagnostics point at the child.
Form hooks expand their programs once per descriptor rather than on every use,
which makes re-checking a document with many forms several times faster.
:checkdiagnostics accept:atto point inside aSyntaxhole. Edit scriptsinsert record entries laid out like their siblings, and slot affordances name
the concrete forms a category of children accepts.
535cd41: Keep a host's diagnostics when it resumes a host call with
{ok: false}. Thefailed evaluation's diagnostic now has the host's first code instead of
KernelTypeError, anddetails.hostDiagnosticscarries every diagnostic thehost returned.
KernelTypeErrorgains an optionaldetailsfield thatsurvives source tracing and VM stack traces.
5903e62: Share the mechanics checked-declaration result across Effect generation, canonical artifact validation, host/CLI checking, and workspace analysis. Invalid Effect bodies, undeclared typed errors, and undeclared requirements cannot become validated canonical declarations. Module checks retain lexical identities and dependency diagnostics before emission selection; validated snapshots become stale when a checked dependency changes.
Route explicit Effect declarations and signed helpers through mechanics checking in language services, preserving author spans, partial document analysis, and recorded expression types for hover. Add compiler diagnostic identities to host editor errors. Kernel and descriptor checks remain in place; low-level HM inference, language-server file import resolution, and full mechanics completion parity remain separate work.
30d7db4: Add
elaborateProgramto@formalang/ts/descriptor. It elaborates a whole DSL source against a bootstrapped prelude and returns JSON payloads shaped as packageable declarations, with spans that include end lines and columns, plus structured diagnostics for parse errors, unknown or unsupported forms, duplicate declarations, missing identifiers and required slots, and construct failures. Also addselaborateProgramOrThrow,ElaborationFailure,formatDiagnostic,declarationDiagnostic,sourceLocator,toJsonValue, andisJsonRuntimeStringLiteral. Engine and host diagnostics accept the new"elaborate"phase.bb9ad6a: Analyze imported modules with caller-located types, retain partial editor types,
and resolve definitions through named imports, namespaces, and re-exports while
keeping private globals lexical. Imported VM closures now retain their defining
compilation's global and builtin tables across calls.
Updated dependencies [4735260]
Updated dependencies [0b72bb2]
Updated dependencies [48e95b6]
Updated dependencies [22d2060]
Updated dependencies [a62797e]
Updated dependencies [cc3a74f]
Updated dependencies [09642e5]
Updated dependencies [6d3ea9c]
Updated dependencies [f5b3a0f]
Updated dependencies [1317204]
Updated dependencies [3a18c39]
Updated dependencies [a117963]
Updated dependencies [61a546a]
Updated dependencies [646c433]
Updated dependencies [535cd41]
Updated dependencies [73cabb2]
Updated dependencies [61a546a]
Updated dependencies [535cd41]
Updated dependencies [bdc817d]
Updated dependencies [4453f84]
Updated dependencies [535cd41]
Updated dependencies [535cd41]
Updated dependencies [535cd41]
Updated dependencies [1739e4c]
Updated dependencies [535cd41]
Updated dependencies [5903e62]
Updated dependencies [83bbb56]
Updated dependencies [1beb252]
Updated dependencies [30d7db4]
Updated dependencies [30d7db4]
Updated dependencies [30d7db4]
Updated dependencies [22c549f]
Updated dependencies [5709d16]
Updated dependencies [30d7db4]
Updated dependencies [1e93832]
Updated dependencies [dd124ba]
Updated dependencies [09642e5]
Updated dependencies [bb9ad6a]
Updated dependencies [d950a22]
Updated dependencies [30d7db4]
Updated dependencies [d47da26]
Updated dependencies [33bb758]
Updated dependencies [30d7db4]
Updated dependencies [1beb252]
Updated dependencies [4662c76]
Updated dependencies [e10e2b5]
Updated dependencies [8f8e14b]
Updated dependencies [f5b3a0f]
Updated dependencies [f5b3a0f]
Updated dependencies [535cd41]
Updated dependencies [7d1a3ab]
@formalang/language-server@0.3.0
Minor Changes
@formalang/hostacross open documents and configured preludes.dist/runtime/jsoo_entry.cjs. It adds rename, document symbols, and semantic tokens, offers slot completion inside descriptor forms, and types documents with the macros, definitions, and forms of their preludes.FormaWorkspacereplacesOcamlWorkspaceSession;OcamlAbiClientandcreateOcamlEditorAnalysisHostare removed, andFORMA_LANGUAGE_SERVER_ARTIFACTis no longer read.AnalysisWorkspace.search, which finds forms and global definitions acrosspreludes and documents by name, documentation (docstrings, slot docs, and the
comments above a definition or its signature), produced
:irtype, andinferred type. The language server answers
workspace/symbolwith it andaccepts
produces:IRTypeandtype:TypeNamefilters in the query.Patch Changes
6d3ea9c: Breaking: Use Effect 4.1.1 in Forma's public types and generated TypeScript.
Consumers should install the same Effect version. Validate the Foldkit generator
and structural workbench with Foldkit and @foldkit/ui 0.170.0 and
@foldkit/vite-plugin 0.29.0.
HTTP API builders reject stream and protocol upgrade schemas in endpoint errors,
including schemas wrapped with response headers, matching Effect 4.1's contract.
5903e62: Share the mechanics checked-declaration result across Effect generation, canonical artifact validation, host/CLI checking, and workspace analysis. Invalid Effect bodies, undeclared typed errors, and undeclared requirements cannot become validated canonical declarations. Module checks retain lexical identities and dependency diagnostics before emission selection; validated snapshots become stale when a checked dependency changes.
Route explicit Effect declarations and signed helpers through mechanics checking in language services, preserving author spans, partial document analysis, and recorded expression types for hover. Add compiler diagnostic identities to host editor errors. Kernel and descriptor checks remain in place; low-level HM inference, language-server file import resolution, and full mechanics completion parity remain separate work.
Updated dependencies [4735260]
Updated dependencies [0b72bb2]
Updated dependencies [48e95b6]
Updated dependencies [22d2060]
Updated dependencies [a62797e]
Updated dependencies [cc3a74f]
Updated dependencies [09642e5]
Updated dependencies [6d3ea9c]
Updated dependencies [f5b3a0f]
Updated dependencies [1317204]
Updated dependencies [3a18c39]
Updated dependencies [a117963]
Updated dependencies [61a546a]
Updated dependencies [646c433]
Updated dependencies [535cd41]
Updated dependencies [73cabb2]
Updated dependencies [61a546a]
Updated dependencies [535cd41]
Updated dependencies [bdc817d]
Updated dependencies [4453f84]
Updated dependencies [535cd41]
Updated dependencies [535cd41]
Updated dependencies [535cd41]
Updated dependencies [1739e4c]
Updated dependencies [535cd41]
Updated dependencies [5903e62]
Updated dependencies [83bbb56]
Updated dependencies [1beb252]
Updated dependencies [30d7db4]
Updated dependencies [30d7db4]
Updated dependencies [30d7db4]
Updated dependencies [22c549f]
Updated dependencies [5709d16]
Updated dependencies [30d7db4]
Updated dependencies [1e93832]
Updated dependencies [dd124ba]
Updated dependencies [09642e5]
Updated dependencies [bb9ad6a]
Updated dependencies [d950a22]
Updated dependencies [30d7db4]
Updated dependencies [d47da26]
Updated dependencies [33bb758]
Updated dependencies [30d7db4]
Updated dependencies [1beb252]
Updated dependencies [4662c76]
Updated dependencies [e10e2b5]
Updated dependencies [8f8e14b]
Updated dependencies [f5b3a0f]
Updated dependencies [f5b3a0f]
Updated dependencies [535cd41]
Updated dependencies [7d1a3ab]
@formalang/ts@0.4.0
Minor Changes
4735260: Add closed-record type operations
Pick,Omit, and disjointMergeto theHM checkers, preserving polymorphic field types and reporting located errors
for unresolved or open shapes. Reject inline
Taggedrecord payloads thatdeclare their discriminator or have an unknown row tail.
0b72bb2: Add RFC 0002 stage 2 compile-time modules. Files can import and export forms and
macros with private helpers kept in their defining scope, select an isolated
project prelude, and export declaration identity, schema metadata, and pure
compile-time data with provenance through portable interfaces. Core forms such
as
type,service, anddo!stay built in.48e95b6: Validate descriptor hooks, slot references, artifact validators, and payload contracts before committing a prelude load. Expose artifact emission, summaries, backend discovery, and typed stateful REPL submission through the JSON CLI and daemon. Support inline session emission without changing stored sources.
22d2060: Run descriptor infer, check, bindings, and result-type hooks in the active
Hindley–Milner context, including source-local hooks and prelude hooks in editor
analysis. Add their meta helper vocabulary and preserve diagnostic codes and
authored expression spans. Export the plain
checkDescriptorsstage fordescriptor definition and application validation, with a callback for artifact
contract checks. Host prelude-loading integration remains separate.
a62797e: Make expansion and identity reproducible.
gensymnumbers names per expansionpass and per top-level evaluation instead of from a process-wide counter, so
the same program expands to the same names regardless of earlier work.
GensymScopeandwithGensymScopeare exported fromEvaluator. Source hashesand the session prelude fingerprint are now SHA-256 (previously 32-bit FNV-1a),
and the fingerprint no longer depends on locale or separator characters in
source ids. Source hashes are computed on first use.
The TypeScript host keeps keyword, symbol, and string map-key kinds when it
projects values, including bounded observations, and when it decodes host-call
results and arguments. A function or opaque projection whose
valueRefisretained in the session decodes to the retained value instead of its display
text.
cc3a74f: Breaking: Distinguish Int and Float literals, inferred types, arithmetic, VM and evaluator
values, descriptors, host projections, and Effect schemas. Integral Float results
retain their kind. Int uses checked JavaScript safe integers; Number/Num are
rejected immediately in favor of Int or Float. Tagged JSON preserves nonfinite Floats and signed zero.
09642e5: Type host builtins in editor analysis and keep types around a type error.
analyzeEditoraccepts thehostBuiltinsandtypePolicythattypecheckdoes, or takes them fromsessionId's session, so a call to a host builtin is typed by itstypeSchemeinstead of failing as unbound. Editor analysis now reports every top-level form that does not type, and still types the other forms: a definition that fails is anything to its users, and one failing definition no longer leaves the definitions next to it untyped. Typed spans are resolved with everything inference learned, so a lambda's parameters show their types instead of type variables.Lsp.analyzeLspgainsinferOptions,inferProgramgains an opt-inonFormError, andEngine.typeInferOptionsis exported.6d3ea9c: Breaking: Use Effect 4.1.1 in Forma's public types and generated TypeScript.
Consumers should install the same Effect version. Validate the Foldkit generator
and structural workbench with Foldkit and @foldkit/ui 0.170.0 and
@foldkit/vite-plugin 0.29.0.
HTTP API builders reject stream and protocol upgrade schemas in endpoint errors,
including schemas wrapped with response headers, matching Effect 4.1's contract.
3a18c39: Add the isolated
@formalang/ts/elmprototype generator and bundled Elm-style app prelude. Generate Foldkit / Effect TypeScript with exhaustive message updates, typed command recovery, checked payloads, and pure views. Experimental: its API and prelude may change in any minor release.a117963: Add the isolated
@formalang/ts/emailprototype generator and bundled email rule prelude. Aruledeclares sending lanes and first-matchsend,defer, andskipdecisions over a prelude-defined contact; the linker checks it through the Effect checker and generates Effect TypeScript. Experimental: its API and prelude may change in any minor release.646c433: Check
:pattern,:min-length,:max-length,:min,:max, and:finiterefinementsin form hole and IR types instead of rejecting refined fields, and generate the
matching Effect schema filters. Add
Null, JSONnull, as a schema type. Generate recursive Effect schemas withSchema.suspendunless the recursion passes through a brand or a class. Holetypes and scoped expressions accept enum aliases by member,
=reports aliteral outside an enum, generic
:scopefunctions are instantiated per use,and child form diagnostics point at the child.
Form hooks expand their programs once per descriptor rather than on every use,
which makes re-checking a document with many forms several times faster.
:checkdiagnostics accept:atto point inside aSyntaxhole. Edit scriptsinsert record entries laid out like their siblings, and slot affordances name
the concrete forms a category of children accepts.
73cabb2: Add the TypeScript forma JSON CLI and daemon, filesystem module commands, optional load timings, core debug operations, and structural form digests. Validate host type configuration and report specific inference diagnostic codes with source spans.
61a546a: Help host preludes report precise diagnostics. A
:checkdiagnostic may carry:at, a path into the form's authored syntax, and is reported at that node.Preserve existing Syntax-value locations and child diagnostic codes and spans.
Add the
declarations-ofandtype-definitionreflection builtins, and let an optional positionalStringhole (a docstring) be omitted before other positional arguments. Cover the
existing quantification of
:scopesignatures with host-prelude regressions.535cd41: Let a file module's
formproduce an:irtype that another module exports.Discovery, compile-time elaboration, and type checking see the imported type
and the definitions it reaches, and payloads are checked against them.
Declaration data in module interfaces gains
contractId, a SHA-256 identity ofthe
:irtype closure, shared by declarations from different forms that producethe same type.
bdc817d: Breaking: Add isolated file modules, host-owned relative resolution, explicit imports and exports, portable checked interfaces, and linked Effect TypeScript. Source loading no longer publishes bindings to other files. Re-exports preserve owning type and binding identities; generated files use real imports and exports.
4453f84: Add independent light/dark appearance and Forma, Ocean, and Orchid syntax palettes
for CodeMirror and LispEditor. Appearance changes preserve the document and undo
history. Export showMechanicsType to render the Effect checker's inferred types
in live authoring tools.
535cd41: Add
forma add <name> <spec>,forma update [name], offlineforma verify,and
forma vendorto restore exact locked commits. Fetch arbitrary git serversthrough git and known forges through commit-pinned archives with git fallback.
Select transitive semver tags using highest-minimum selection, reject conflicting
refs or source locations, and stage complete results before updating project
files.
@formalang/ts/nodealso exposes these commands and a fetcher interface.535cd41: Add package imports (RFC 0020).
(import "@acme/flows/ir" [FlowIR])resolvesthrough the
exportsfield of a dependency'sforma.json.Modules may import only packages their own package declares, and package
modules get location-independent
pkg:<name>/<path>identities. The compilertakes a host package table (
ModuleCoreOptions.packages,configureSession({ packages }));@formalang/ts/nodebuilds one fromforma.json, verifiedforma.lock, and committedvendor/or relative sources. Theforma filecommands use it. Packages may declare a prelude for their own modules. Session
loading no longer bootstraps a file module's own forms as session descriptors,
so a module's form can use an imported
:irtype in sessions and the CLI.535cd41: Record a content identity for each declaration's payload contract. Artifact
declarations gain
payloadContractId: SHA-256 over an:irtype's definitionand every type it reaches (layout and record field order ignored), or over the
resolved descriptor payload constraints. Forms with different surface syntax
that produce the same IR type share an identity.
535cd41: Add
AnalysisWorkspace.search, which finds forms and global definitions acrosspreludes and documents by name, documentation (docstrings, slot docs, and the
comments above a definition or its signature), produced
:irtype, andinferred type. The language server answers
workspace/symbolwith it andaccepts
produces:IRTypeandtype:TypeNamefilters in the query.5903e62: Share the mechanics checked-declaration result across Effect generation, canonical artifact validation, host/CLI checking, and workspace analysis. Invalid Effect bodies, undeclared typed errors, and undeclared requirements cannot become validated canonical declarations. Module checks retain lexical identities and dependency diagnostics before emission selection; validated snapshots become stale when a checked dependency changes.
Route explicit Effect declarations and signed helpers through mechanics checking in language services, preserving author spans, partial document analysis, and recorded expression types for hover. Add compiler diagnostic identities to host editor errors. Kernel and descriptor checks remain in place; low-level HM inference, language-server file import resolution, and full mechanics completion parity remain separate work.
83bbb56: Breaking: Upgrade the Effect runtime and generated TypeScript target from
effect@4.0.0-rc.112to the stableeffect@4.0.3. Consumers must install thesame exact version for Forma's public Effect types.
Generated config readers use
Config.String/Int/Number/Boolean, and HTTPmodules import
effect/http-apiandeffect/http.1beb252: Add
@formalang/ts/analysis, a workspace of preludes and documents whose language services are memoized queries: diagnostics, typed spans, hover, completion (with descriptor slots), definitions, references, rename, document symbols, semantic tokens, and formatting. Documents are typed in the scope of their preludes: prelude macros expand, prelude definitions keep their inferred types, and descriptor forms are typed.analyzeLspaccepts that scope (initialEnv,macroEnv,captureEnv), types source-localformdeclarations, and keeps typing the forms around one that does not lower. The symbol index now records macro call heads as references to their macro.DiagnosticandSpanlive in@formalang/ts/diagnostic.indexSymbolsaccepts acachefromcreateSymbolIndexCache(). Documents whose text is unchanged are not read again, and the expansion of an unchanged leading run of documents is reused, so re-indexing after an edit to one document no longer re-reads and re-expands its preludes.30d7db4: Elaborated declarations now record provenance. Top-level calls to macros defined with
define-macroin the same source are expanded before elaboration; each declaration carries anorigin(authored, orexpandedwith the macro calls that produced it) and asourceMapfrom payload JSON pointers to authored spans, including one entry per child form such as/fields/0. Both fields are part ofPackageableDeclarationand pass throughpackageArtifact. Declarations also report the descriptor's:artifactpayload contract. Ontology declarations exposeoriginand per-field and per-input spans.30d7db4: Add
@formalang/ts/preludes, which embeds Forma's Lisp preludes as source strings and providesbootstrapPreludesandbootstrapOntologyPreludes. Consumers no longer need to vendor prelude files or read them from disk.30d7db4: Register
construct/queryandconstruct/declarationmeta builtins so the bundled ontology preludes elaborate queries without patching. Runtime string literals in construct output are now marked with the Forma-owned$forma.runtimeExprkey, exported asRUNTIME_STRING_LITERAL_KEYtogether with anisRuntimeStringLiteralguard from@formalang/ts/descriptor.22c549f: Add id-addressed structural edit scripts.
@formalang/ts/editorexports theEditScriptEffect Schema,decodeEditScript,editScriptJsonSchemafor structured model output,describeNodesfor the context a model or preview needs, andapplyEditScript, which appliesreplace,insert,delete,wrap,splice,unwrap,raise,move, scope-awarerename, andextractoperations atomically, keeps the author's layout, and returns the new source with a reconciled identity, a change list, and before and after text for each affected form.TsLanguageHostimplements the optionalapplyEditScript,describeNodes, andeditScriptSchemahost methods.5709d16: Make Forma an authoring language for Effect TypeScript programs.
@formalang/ts/mechanicsaddselaborateEffectProgramandgenerateEffectProgram, which read, project, check, and generate an Effect 4 module and report line and column diagnostics. It also addscheckMechanicsDeclarations, a checker over the portable mechanics IR. The checker verifies schemas, declared errors and requirements, exhaustivematch, possiblecatch, non-failing finalizers, and layer completeness.The mechanics surface gains:
define-layerwith:provides/:setup/:methods,layer-merge,layer-provide,layer-provide-merge,provide);define-class) and typed functions and constants ((: f T) (define f ...));catch;acquire-release,scoped,ensuring,all,for-each,race,fork/join,timeout,retry,map-error,option,result,config,decode,log, andRefoperations;match;Option,Result,Ref,Fiber,Stream, and function types.The generated module now uses Schema-backed data,
Schema.TaggedErrorandSchema.Classclasses, camelCase operation names,undefinedforUnit, and Effect 4 call shapes.generateMechanicsEffectSchemaModulenow emits Effect 4 call shapes:Schema.Union([...]),Schema.Tuple([...]),Schema.Literals([...]), andSchema.optionalKey. This changes the generated code: operation exports are camelCase (always_failbecomesalwaysFail), errors are classes, and conditions must beBool.30d7db4: Add
elaborateProgramto@formalang/ts/descriptor. It elaborates a whole DSL source against a bootstrapped prelude and returns JSON payloads shaped as packageable declarations, with spans that include end lines and columns, plus structured diagnostics for parse errors, unknown or unsupported forms, duplicate declarations, missing identifiers and required slots, and construct failures. Also addselaborateProgramOrThrow,ElaborationFailure,formatDiagnostic,declarationDiagnostic,sourceLocator,toJsonValue, andisJsonRuntimeStringLiteral. Engine and host diagnostics accept the new"elaborate"phase.1e93832: Add slot affordances for editors.
formSlotsin@formalang/ts/editorfinds the innermost descriptor-registered form at a position or node and reports its identifiers and slots: which are present (with their values' node ids and spans), empty, missing, or repeatable, the slot the position is in, keyword lists that name no slot, and an edit-script insertion with template text such as(:trigger )for each, so an editor can render placeholders such as+ trigger.TsLanguageHostimplements the optionalformSlotshost method, usingdefine-forms from the session's sources.d950a22: Add opt-in per-expression observation.
evaluateandevaluateInSessionacceptobserveand returnobservations: for each author-written expression that ran, its node id and span, evaluation count, last value, and any failure raised there, also when the evaluation fails. The VM gains anOBSERVEinstruction emitted only for observed evaluations, the expander records the author-written origin of every rebuilt node (sourceOriginsOf) so values computed inside macro expansions map back to the call and its arguments, and the host bounds records, collection items, depth, and string length. In a session,retainValues: "all"gives each observed value avalueRef.30d7db4: Add
@formalang/ts/ontologywithelaborateOntology, which turns the bundled ontology DSL into typed entity, relation, action, and query declarations (mirroringpreludes/ontology-ir.lisp), parses field types, resolves entity references across sources, and reports unknown entities, unknown types, and duplicate fields at the referring declaration.elaborateSourceselaborates several files as one program, andtoJsonValuelowers reader nodes passed through by construct hooks, such as(Ref Customer)field types, to canonical runtime values instead of serializing raw syntax nodes.d47da26: Add an outline codec for structural editors.
sourceToOutlinein@formalang/ts/syntaxreads source as rows in the style of indentation-sensitive Lisp (SRFI 119): a row's text holds the leading elements of its list and its children hold the rest, comments are rows, multi-line literals stay whole, and broken text becomes rows with errors instead of failing.outlineToSourceprints rows line for line, reuses the base document's layout for unchanged rows so reading and printing a source with itself as base is exact, gives every printed row's node the row's id, and can comment out rows that do not read.TsLanguageHostimplements the optionalsourceToOutlineandoutlineToSourcehost methods.33bb758: Add prelude-defined TypeScript emit hooks and a restricted typed form builder
generator. Introduce the independent
http-apiprelude and public API forEffect 4 endpoints, groups, and checked handler operations, with generated
TypeScript builders and HTTP conformance coverage.
1beb252: Breaking: Remove the superseded
@formalang/ts/elaboration(DSLRegistryhandlers) and@formalang/ts/form(red-tree form patterns) frameworks,createDSLTypeProviderFromRegistry, the unused reader combinators, and theform-registry semantic tokens. Descriptors are the one way to define forms; semantic tokens come from@formalang/ts/analysis.4662c76: Add a symbol index for editors.
indexSymbolsin@formalang/ts/editorreturns definitions and references with node ids and spans for one or more documents. It resolves programs after macro expansion, so definitions made by macros are found and macro temporaries are not, handlesdefine,fn,let,do!,match,catch, types, typeclasses, services, and operations, and uses descriptors (includingdefine-forms in the indexed documents) for domain forms.findReferencesreturns a symbol's definition and references.TsLanguageHostimplements the optionalsymbolIndexandfindReferenceshost methods, including a session's loaded sources.e10e2b5: Add stable node identity for structural editors.
@formalang/ts/syntaxexportsidentifySyntax, which gives every syntax node and line comment an id, andreconcileSyntax, which carries ids to a new version of a document: nodes keep their ids when edits happen elsewhere, when they are retyped in place, and when they move with identical tokens. The trivia-preserving lexer now turns unterminated strings and unexpected characters into error nodes instead of throwing, soparsealways returns a tree.TsLanguageHostimplements the new optionalidentifySyntaxhost method.8f8e14b: Validate source structure and module directives at load time, and commit prelude
values and inferred types atomically. Add an optional typed
replSubmithostoperation that retains values, schemes, type registries, and sources only after
successful evaluation. Session typechecks use retained schemes; loading reports
validate-and-storethrough the version capability.Descriptor hooks and hosted helper type contracts remain pending the descriptor
metacheck port; bootstrap continues to validate their structure.
f5b3a0f: Breaking: Replace the previous authoring grammars with one canonical syntax
for types, declarations, patterns, Effects, and forms (RFC 0001). Older source
must be rewritten; no compatibility layer or automated migration is provided.
typereplacesdefine-typeanddefine-schema, with records written{:field T},(Union :a :b),(Tagged ...), and(Option T)for optionalfields. Types use canonical names such as
String,Bool,Unit,List, and(Map String V); lowercase aliases and the{a b}set literal are removed.error,class,service,layer,macro, andformreplace theirdefine-forms,(Effect A)replaces(Effect A [] []),do!binds with[x e]and:letinstead of<-, andSome,None,Ok, andErrreplacesome,none,success, andfailure. Ontology declarations useentity,seed,attribute,query, andworkspace. Typedformdefinitions derivevalidation, bindings, projections, artifact contracts, completion, and
formatting. Canonical artifact payloads change shape, and tagged wire values use
the constructor name.
bootstrapFromFilesmoves from@formalang/ts/descriptorto the Node-only
@formalang/ts/nodeentry point so browser entry points do notimport the filesystem.
f5b3a0f: Validate declaration payloads and contracts before packaging artifacts.
@formalang/ts/artifactexportsemit,emitMany,emitBackends,artifactSummary,validateDeclarations, a namedArtifactValidatorRegistry,and descriptor payload-contract checks. Invalid declarations return
source-located diagnostics instead of being packaged, and packages hash
sorted-key canonical payload JSON with SHA-256.
LanguageHostgains optionalemit,emitMany,emitBackends, andartifactSummarymethods taking anEmitRequest.535cd41: Replace npm-based Forma package discovery with offline
forma.jsonmanifests,forma.lockverification, and committedvendor/<name>sources or relativepackages. Check the full dependency closure and report stale manifests, identity
mismatches, and missing, extra, or edited package files before compiling.
7d1a3ab: Expose UI-free authoring helpers for capability reachability, REPL declaration
merging and filtering, descriptor source spans, and outline source coordinates
as
@formalang/ts/authoring. The structural workbench moves to Foldworks;Forma keeps the language, host ABI, and source editor integrations.
Patch Changes
typed failures, service and operation calls, sequencing, and branching.
Unsupported nodes now fail generation with an explicit error instead of
producing incomplete output.
^4.1.1peer dependency so applications can share onecompatible runtime across Forma libraries. Keep repository tests pinned to
Effect 4.1.1.
program expansion continues to use the existing per-expression cache, including
helpers, constructors, scopes, checks, and projections.
{ok: false}. Thefailed evaluation's diagnostic now has the host's first code instead of
KernelTypeError, anddetails.hostDiagnosticscarries every diagnostic thehost returned.
KernelTypeErrorgains an optionaldetailsfield thatsurvives source tracing and VM stack traces.
outline whitespace and comment row identities, shared macro-template traces,
current type syntax and quasiquote reference indexing, and retired syntax anchors.
(when ready (+ 1 "x"))was reported on the whole call and expressions inside it were typed at the call's span. Arguments now keep their own source traces. A macro that expands into another macro call is located at the call the author wrote, instead of at an offset inside the prelude that defined the inner call.and resolve definitions through named imports, namespaces, and re-exports while
keeping private globals lexical. Imported VM closures now retain their defining
compilation's global and builtin tables across calls.
meta/query-select-fields,meta/validate-query-select-fields, andview/compile-expr-recordmeta builtins soquerydeclarations and views with named queries construct from the bundled ontology preludes.