@xandreed/runtime 0.13.0 → 0.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,5 +1,5 @@
1
1
  # @xandreed/runtime
2
2
 
3
- Efferent composable agent framework, 0.13.0. Node 24 or Bun.
3
+ Efferent composable agent framework, 0.14.0. Node 24 or Bun.
4
4
 
5
5
  Documentation: https://github.com/xandreeddev/efferent
@@ -1,8 +1,8 @@
1
1
  import { Context, Effect, Exit, Ref, Scope, Semaphore } from "effect";
2
2
  import * as Layers from "effect/Layer";
3
- import { HarnessError } from "@xandreed/core";
3
+ import { HarnessError, replayableContext } from "@xandreed/core";
4
4
  export const makeLiveLayer = (initial) => Effect.gen(function* () {
5
- const dependencies = yield* Effect.context(), gate = yield* Semaphore.make(1), generations = yield* Ref.make(new Map), current = yield* Ref.make(0), closed = yield* Ref.make(!1), unavailable = () => new HarnessError({ code: "module.closed", message: "Module registry is closed" }), stage = (layer, id) => Effect.uninterruptibleMask((restore) => Effect.gen(function* () {
5
+ const dependencies = replayableContext(yield* Effect.context()), gate = yield* Semaphore.make(1), generations = yield* Ref.make(new Map), current = yield* Ref.make(0), closed = yield* Ref.make(!1), unavailable = () => new HarnessError({ code: "module.closed", message: "Module registry is closed" }), stage = (layer, id) => Effect.uninterruptibleMask((restore) => Effect.gen(function* () {
6
6
  const scope = yield* Scope.make(), memoMap = yield* Layers.makeMemoMap, services = yield* restore(Layers.buildWithMemoMap(layer, memoMap, scope).pipe(Effect.provide(dependencies))).pipe(Effect.onExit((exit) => Exit.isFailure(exit) ? Scope.close(scope, exit) : Effect.void));
7
7
  return { id, services, scope, leases: 0, retired: !1 };
8
8
  })), first = yield* stage(initial, 0);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xandreed/runtime",
3
- "version": "0.13.0",
3
+ "version": "0.14.0",
4
4
  "engines": {
5
5
  "node": ">=24",
6
6
  "bun": ">=1.3.0"
@@ -14,7 +14,7 @@
14
14
  }
15
15
  },
16
16
  "dependencies": {
17
- "@xandreed/core": "0.13.0",
17
+ "@xandreed/core": "0.14.0",
18
18
  "effect": "4.0.7"
19
19
  },
20
20
  "private": false,