Skip to content

refactor: align vocabulary with iso4 (prepare/execute/globals/scope) - #11

Merged
schplitt merged 3 commits into
mainfrom
refactor/rename-scope-and-globals
Jul 31, 2026
Merged

refactor: align vocabulary with iso4 (prepare/execute/globals/scope)#11
schplitt merged 3 commits into
mainfrom
refactor/rename-scope-and-globals

Conversation

@schplitt

@schplitt schplitt commented Jul 31, 2026

Copy link
Copy Markdown
Owner

What

Aligns durable-isolates / durable-workflows vocabulary with iso4 (combined renaming effort; rebased on top of the TS-6 pin in #12).

1. hydrateprepare

Mirrors iso4's sandbox.prepare() (0.4.1) — the operation this wraps.

  • DurableIsolates.hydrate.prepare, HydrateOptionsPrepareOptions
  • DurableWorkflowHost.hydrate.prepare, WorkflowHydrateOptionsWorkflowPrepareOptions
  • execute is unchanged and now matches iso4's prefix.execute(). The kernel calls iso4's canonical prepare()/execute() instead of the deprecated precompile()/run().

2. Host callables → globals

Matches iso4's term for host-provided callables (replaces "handlers"):

  • ModuleDefinition.handlers.globals, ExecuteOptions.handlers.globals
  • HostHandlerHostGlobal, HandlerMapGlobalMap, PerExecuteHandlersPerExecuteGlobals
  • Workflow layer: DurableHandlerDurableGlobal, DurableHandlerInputDurableGlobalInput, plugin .handlers.globals, WorkflowExecuteOptions.handlers.globals

3. ALS ambient key-prefixscope

Frees "prefix" for iso4's own Prefix (the precompiled snapshot) — the two previously collided across the two stacked packages. Internal only.

Dependency

Bumps @iso4/sandbox catalog ^0.4.0^0.4.1 (adds prepare()/execute(), released via schplitt/iso4#45).

Not renamed (deliberate)

  • modules (kernel) vs plugins (workflows) — same shape, different role per layer.
  • The "data globals for 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 baking input as a JSON literal stays correct/optimal.

Validation

Changesets

  • durable-isolates: patch.
  • durable-workflows is held (unreleased); its held changeset prose updated to the new names.

schplitt added 2 commits July 31, 2026 19:54
…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
schplitt force-pushed the refactor/rename-scope-and-globals branch from 947864b to fbd84df Compare July 31, 2026 17:55
@schplitt schplitt changed the title refactor: rename host callables to globals and ALS key-prefix to scope refactor: align vocabulary with iso4 (prepare/execute/globals/scope) Jul 31, 2026
@schplitt
schplitt merged commit 00556af into main Jul 31, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant