Repository navigation
Version Packages - #11
Merged
Merged
Conversation
github-actions
Bot
force-pushed
the
tegami/version-packages
branch
5 times, most recently
from
November 21, 2026 22:07
a7657a6 to
641ba97
Compare
github-actions
Bot
force-pushed
the
tegami/version-packages
branch
from
November 22, 2026 00:52
641ba97 to
6357a96
Compare
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.
Summary
All bumped packages.
@streamsy/projection0.12.00.13.0@streamsy/core0.12.00.13.0@streamsy/serve0.12.00.13.0@streamsy/storage0.12.00.13.0@streamsy/views0.12.00.13.0durable-response0.0.10.0.2command-stream0.0.100.0.11durable-response-atom0.0.10.0.2durable-response-aisdk0.0.10.0.2durable-response-foldkit0.0.10.0.2durable-response-tanstack0.0.10.0.2hex-domination0.0.10.0.2timer-stream0.0.100.0.11Changelogs
non-retryable-handler-errors.mdShow Bumped Packages (1)
npm:@streamsy/projectionStop a binding on a permanent handler error
Mark a typed handler error as permanent with
readonly [NonRetryable] = true, usingNonRetryablefrom@streamsy/projection. When an attached binding fails with that error, the runner stops the binding at once. It does not step the retry schedule or callonExhausted.registry.failedreports the binding as stopped withexhausted: falseand failure reasonnon-retryable-handler. Other handler errors and defects still retry under the declaration'sretrypolicy. Binding retryprojection-generations.mdShow Bumped Packages (1)
npm:@streamsy/projectionRebuild a projection into a new generation
You can now change a projection's handler and replay its inputs into fresh output streams, while readers stay on the old streams until you move them. The steps are:
Projection.perGeneration, so each generation writes to its own streams.generationand attach. The runner replays the existing bindings in the background.Projection.caughtUp, then move readers to the new streams.Projection.retireto close or remove the old generation.The next four sections describe each step. Rebuild a projection is the full guide, with an in-place procedure and a side-by-side procedure.
Put the generation in an output's address
Wrap a projection output, or the wake class in
accepted, withProjection.perGeneration(route, param). The named route parameter takes the declaration'sgeneration. The binding's params fill the other parameters.Commit.transactionandCommit.producercreate a wrapped stream on its first write and check that it starts empty. A failed check fails the unit with the non-retryable reasoninvalid-output. Pass{ shared: true }as the third argument to skip the check for a stream that several writers share. CallProjection.createOutputs(bound)when readers need the streams before the first unit commits.Projection.isPerGenerationrecognizes a wrapped output, andProjection.generationBindingreads its route, generation parameter,sharedflag androuteBynames. Generation-addressed outputsReplay existing bindings when you attach a new generation
When you raise
generationand attach the declaration,Projection.attachandProjectionWakeup.attachlist the live checkpoints for the projection id. Each binding with no checkpoint at the declared generation gets its generation-addressed outputs created and is queued for replay. A projection with no params queues its{}binding.Pass
bindingsto either attach form to choose the replayed bindings yourself. It is an Effect that returns decoded params. Use it when you run a new projection id beside the old one, on MySQL, or when bindings that never committed a unit must replay.Projection.bindings(declaration, { generation })lists the decoded params of the bindings with live checkpoints for a projection id. Withoutgenerationit lists every generation. It fails withInvalidBindingwhen stored params no longer decode, and withunsupported-compositionon MySQL and on checkpoint stores that cannot list.When startup cannot list bindings, or the
bindingsEffect fails, attach logs the cause and skips startup replay. Live commits and triggers still run. Choose the binding inventoryCheck replay progress
Capture
Projection.tails(binding)once, then wait withProjection.caughtUp(binding, tails)until the binding's checkpoint reaches those input offsets and closes. Producers can keep writing while you wait.caughtUphas no timeout, so add your own.Projection.lag(binding, tails)returns the committed and target offset of each input and acaughtUpflag.Tailsis a Schema, so you can store the captured value and check it later. Check replay progressRetire the old generation
Call
Projection.retire(declaration, params, { generation })to fence the generation's checkpoint and remove its exclusively owned generation-addressed outputs. Passstreams: "close"to keep their data and let readers reach the end. The returnedRetiredvalue reports aRetiredOutputfor each output. A later run of the retired generation fails with the non-retryable reasonretired-generation. Retire a generationTwo more calls remove what a retired binding leaves in SQL:
Commit.transactionWithCleanup(cleanup)runs your cleanup in the same transaction asProjection.forgetorProjection.retire. Run the cleanup SQL with the supplied client, so a failure rolls back the lifecycle call and the cleanup together. Commit referenceStateTable.clear(table)deletes a retired stream's cached rows and applied offset. Clear a retired stream's rowsRoute one binding's output to many streams
Pass
routeBytoProjection.perGeneration(route, generationParam, { routeBy: ["workspace", "date"] })when one binding writes to several stream addresses. Each name inrouteBymust be a distinct route parameter. The handler supplies those values, the generation fills the generation parameter, and the binding's params fill the rest. A routed output cannot beshared.Projection.perGenerationDeclare routed outputs in
Projection.processwithCommit.transactionorCommit.transactionWithCleanup. Inprocess,outputs[name]is aRoutedHandle. Itsopen(routeParams)returns the stream address and creates the stream on first use, which must find the stream empty and open. The stream creation, the appends and the checkpoint commit in one transaction.Projection.retirecloses or removes the streams that a routed output opened and reports them inRetired.routed, an array ofRetiredOutputfor each output name.Projection.forgetclears the binding's record of those streams. On MySQL, which cannot list owner records, routed retirement fails withunsupported-composition.Check these changes when you upgrade
triggersafter the upgrade also reads them from the start. Expect that pass to schedule every member named in the retained trigger history once.ProjectionFault.reasongainsretired-generation. Add it to exhaustive switches overreason.CheckpointStoreApigains two optional members,listandroutes.CheckpointStore.layerandCheckpointStore.layerMemoryimplement both. A custom store without them keeps working, but attach skips startup replay,Projection.bindingsfails, and opening a routed output fails withunsupported-composition. For a store built withCheckpointStore.fromStore, implementEncodedStore.list(prefix)to get both.CheckpointStoreApiowner-records-list.mdShow Bumped Packages (2)
npm:@streamsy/corenpm:@streamsy/storageList owner records by key prefix
Breaking change: the
OwnerRecordsservice from@streamsy/core/internalnow requireslist(prefix). It returns the owner's[key, encoded]entries whose keys start with the prefix.@streamsy/projectionuses it to find the bindings to replay when you rebuild a projection.The memory storage and the SQLite and PostgreSQL storage in
@streamsy/storageimplementlist. MySQL storage fails it with aStorageFaultwhoseoperationisOWNER_RECORDS_LIST_UNSUPPORTED, because MySQL may have shortened long keys.You need to act only if you provide
OwnerRecordsfrom your own storage host. Addlist, or fail with that operation when your store cannot list. Memory storage internal servicesrelease-views.mdShow Bumped Packages (1)
npm:@streamsy/viewsMaintain incremental SQL views with
@streamsy/views@streamsy/viewsis now published. Install it withbun add @streamsy/views @streamsy/projection @streamsy/core effect.Build relations over
Streamsy.statecollections withView.from, then join, filter, select, group withView.count,View.sum,View.minandView.max, and take a boundedtop.View.circuitcompiles the relations into one projection. Each unit updates only the affected keys in SQLite operator tables, appends the changed rows to generation-addressed State output streams, and commits the input checkpoint in the same transaction. Wrap the output withProjection.perGenerationand create the tables withView.migrate.Views supports SQLite only: Bun SQLite and Cloudflare Durable Object SQLite.
View.migratefails on Postgres and MySQL.The package is pre-1.0. When you change a circuit's plan, raise its
generationso the binding rebuilds into a fresh namespace and output stream. A circuit whose stored plan hash differs fails withPlanChanged. A later release that changes the operator-table layout will mark it as a breaking change, and you raisegenerationon every affected circuit when you upgrade. ViewsPublish
The following packages will be published if merged:
@streamsy/projection0.13.0npm@streamsy/core0.13.0npm@streamsy/serve0.13.0npm@streamsy/storage0.13.0npm@streamsy/views0.13.0npm