refactor: align vocabulary with iso4 (prepare/execute/globals/scope) - #11
Merged
Conversation
…cope` Align durable-isolates/durable-workflows vocabulary with iso4. - Host callables the caller mounts are now `globals` (iso4's term for host-provided callables), replacing "handlers": ModuleDefinition/ExecuteOptions `.handlers` -> `.globals`; types HostHandler->HostGlobal, HandlerMap->GlobalMap, PerExecuteHandlers->PerExecuteGlobals; workflow layer DurableHandler->DurableGlobal, DurableHandlerInput->DurableGlobalInput, plugin/execute `handlers`->`globals`. - The in-sandbox ambient boundary-key prefix (ALS-backed) is renamed to `scope`, freeing "prefix" for iso4's own Prefix (the precompiled snapshot) and removing the cross-package name collision. tsnapi snapshots regenerated; incidental iso4 re-export snapshot drift fixed. Changeset: durable-isolates minor; held changeset prose updated for durable-workflows.
…te() Completes the iso4 vocabulary alignment (was PR3 of the sequence, folded in): - `DurableIsolates.hydrate` -> `.prepare`, `HydrateOptions` -> `PrepareOptions`; `DurableWorkflowHost.hydrate` -> `.prepare`, `WorkflowHydrateOptions` -> `WorkflowPrepareOptions`. `execute` is unchanged and now matches iso4's `prefix.execute()`. - The kernel now calls iso4's canonical `sandbox.prepare()` / `prefix.execute()` instead of the deprecated `precompile()` / `run()`. - Bump `@iso4/sandbox` catalog to ^0.4.1 (adds prepare()/execute()). tsnapi snapshots regenerated; changeset + held changeset prose updated.
schplitt
force-pushed
the
refactor/rename-scope-and-globals
branch
from
July 31, 2026 17:55
947864b to
fbd84df
Compare
globals and ALS key-prefix to scope
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.
What
Aligns
durable-isolates/durable-workflowsvocabulary with iso4 (combined renaming effort; rebased on top of the TS-6 pin in #12).1.
hydrate→prepareMirrors iso4's
sandbox.prepare()(0.4.1) — the operation this wraps.DurableIsolates.hydrate→.prepare,HydrateOptions→PrepareOptionsDurableWorkflowHost.hydrate→.prepare,WorkflowHydrateOptions→WorkflowPrepareOptionsexecuteis unchanged and now matches iso4'sprefix.execute(). The kernel calls iso4's canonicalprepare()/execute()instead of the deprecatedprecompile()/run().2. Host callables →
globalsMatches iso4's term for host-provided callables (replaces "handlers"):
ModuleDefinition.handlers→.globals,ExecuteOptions.handlers→.globalsHostHandler→HostGlobal,HandlerMap→GlobalMap,PerExecuteHandlers→PerExecuteGlobalsDurableHandler→DurableGlobal,DurableHandlerInput→DurableGlobalInput, plugin.handlers→.globals,WorkflowExecuteOptions.handlers→.globals3. ALS ambient key-
prefix→scopeFrees "prefix" for iso4's own
Prefix(the precompiled snapshot) — the two previously collided across the two stacked packages. Internal only.Dependency
Bumps
@iso4/sandboxcatalog^0.4.0→^0.4.1(addsprepare()/execute(), released via schplitt/iso4#45).Not renamed (deliberate)
modules(kernel) vsplugins(workflows) — same shape, different role per layer.input" idea was dropped: iso4 data globals are precompile-time constants that can't be rebound per run, but our prefix is reused across instances, so bakinginputas a JSON literal stays correct/optimal.Validation
pnpm build(tsnapi snapshots regenerated)pnpm test:run— durable-isolates 27, durable-workflows 19pnpm typecheckpnpm lint— clean (runs now that main is on TS 6 via build: pin typescript to ^6.0.3 so eslint can run #12)Changesets
durable-isolates: patch.durable-workflowsis held (unreleased); its held changeset prose updated to the new names.