@animalabs/agent-framework 0.22.4 → 0.23.1

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.
Files changed (234) hide show
  1. package/README.md +105 -3
  2. package/dist/src/agent.d.ts +36 -10
  3. package/dist/src/agent.d.ts.map +1 -1
  4. package/dist/src/agent.js +76 -32
  5. package/dist/src/agent.js.map +1 -1
  6. package/dist/src/code-execution/index.d.ts +1 -1
  7. package/dist/src/code-execution/index.d.ts.map +1 -1
  8. package/dist/src/code-execution/index.js.map +1 -1
  9. package/dist/src/code-execution/py-runner.d.ts +34 -2
  10. package/dist/src/code-execution/py-runner.d.ts.map +1 -1
  11. package/dist/src/code-execution/py-runner.js +72 -16
  12. package/dist/src/code-execution/py-runner.js.map +1 -1
  13. package/dist/src/code-execution/runtime-py.d.ts +3 -2
  14. package/dist/src/code-execution/runtime-py.d.ts.map +1 -1
  15. package/dist/src/code-execution/runtime-py.js +47 -7
  16. package/dist/src/code-execution/runtime-py.js.map +1 -1
  17. package/dist/src/code-execution/tool-definition.d.ts +12 -7
  18. package/dist/src/code-execution/tool-definition.d.ts.map +1 -1
  19. package/dist/src/code-execution/tool-definition.js +59 -11
  20. package/dist/src/code-execution/tool-definition.js.map +1 -1
  21. package/dist/src/config-checks.d.ts +2 -2
  22. package/dist/src/config-checks.d.ts.map +1 -1
  23. package/dist/src/config-checks.js +6 -2
  24. package/dist/src/config-checks.js.map +1 -1
  25. package/dist/src/framework.d.ts +744 -120
  26. package/dist/src/framework.d.ts.map +1 -1
  27. package/dist/src/framework.js +3546 -906
  28. package/dist/src/framework.js.map +1 -1
  29. package/dist/src/gate/event-gate.d.ts.map +1 -1
  30. package/dist/src/gate/event-gate.js +13 -6
  31. package/dist/src/gate/event-gate.js.map +1 -1
  32. package/dist/src/held-writes.d.ts +16 -0
  33. package/dist/src/held-writes.d.ts.map +1 -0
  34. package/dist/src/held-writes.js +56 -0
  35. package/dist/src/held-writes.js.map +1 -0
  36. package/dist/src/index.d.ts +7 -3
  37. package/dist/src/index.d.ts.map +1 -1
  38. package/dist/src/index.js +8 -4
  39. package/dist/src/index.js.map +1 -1
  40. package/dist/src/mcpl/capability-grant.d.ts +4 -0
  41. package/dist/src/mcpl/capability-grant.d.ts.map +1 -1
  42. package/dist/src/mcpl/capability-grant.js +1 -1
  43. package/dist/src/mcpl/capability-grant.js.map +1 -1
  44. package/dist/src/mcpl/channel-registry.d.ts +95 -18
  45. package/dist/src/mcpl/channel-registry.d.ts.map +1 -1
  46. package/dist/src/mcpl/channel-registry.js +578 -150
  47. package/dist/src/mcpl/channel-registry.js.map +1 -1
  48. package/dist/src/mcpl/convert-block.d.ts +2 -2
  49. package/dist/src/mcpl/convert-block.d.ts.map +1 -1
  50. package/dist/src/mcpl/convert-block.js +6 -7
  51. package/dist/src/mcpl/convert-block.js.map +1 -1
  52. package/dist/src/mcpl/index.d.ts +5 -1
  53. package/dist/src/mcpl/index.d.ts.map +1 -1
  54. package/dist/src/mcpl/index.js +3 -1
  55. package/dist/src/mcpl/index.js.map +1 -1
  56. package/dist/src/mcpl/inference-router.d.ts +4 -2
  57. package/dist/src/mcpl/inference-router.d.ts.map +1 -1
  58. package/dist/src/mcpl/inference-router.js +6 -7
  59. package/dist/src/mcpl/inference-router.js.map +1 -1
  60. package/dist/src/mcpl/log-value.d.ts +7 -0
  61. package/dist/src/mcpl/log-value.d.ts.map +1 -1
  62. package/dist/src/mcpl/log-value.js +9 -0
  63. package/dist/src/mcpl/log-value.js.map +1 -1
  64. package/dist/src/mcpl/modern-connection.d.ts +227 -0
  65. package/dist/src/mcpl/modern-connection.d.ts.map +1 -0
  66. package/dist/src/mcpl/modern-connection.js +1088 -0
  67. package/dist/src/mcpl/modern-connection.js.map +1 -0
  68. package/dist/src/mcpl/prefix-rule.d.ts +18 -0
  69. package/dist/src/mcpl/prefix-rule.d.ts.map +1 -0
  70. package/dist/src/mcpl/prefix-rule.js +25 -0
  71. package/dist/src/mcpl/prefix-rule.js.map +1 -0
  72. package/dist/src/mcpl/protocol-family.d.ts +179 -0
  73. package/dist/src/mcpl/protocol-family.d.ts.map +1 -0
  74. package/dist/src/mcpl/protocol-family.js +697 -0
  75. package/dist/src/mcpl/protocol-family.js.map +1 -0
  76. package/dist/src/mcpl/push-coalescer.d.ts +38 -19
  77. package/dist/src/mcpl/push-coalescer.d.ts.map +1 -1
  78. package/dist/src/mcpl/push-coalescer.js +52 -23
  79. package/dist/src/mcpl/push-coalescer.js.map +1 -1
  80. package/dist/src/mcpl/reference-fetcher.d.ts +66 -15
  81. package/dist/src/mcpl/reference-fetcher.d.ts.map +1 -1
  82. package/dist/src/mcpl/reference-fetcher.js +243 -76
  83. package/dist/src/mcpl/reference-fetcher.js.map +1 -1
  84. package/dist/src/mcpl/references.d.ts +63 -18
  85. package/dist/src/mcpl/references.d.ts.map +1 -1
  86. package/dist/src/mcpl/references.js +117 -32
  87. package/dist/src/mcpl/references.js.map +1 -1
  88. package/dist/src/mcpl/server-connection.d.ts +326 -30
  89. package/dist/src/mcpl/server-connection.d.ts.map +1 -1
  90. package/dist/src/mcpl/server-connection.js +995 -212
  91. package/dist/src/mcpl/server-connection.js.map +1 -1
  92. package/dist/src/mcpl/server-registry.d.ts +25 -5
  93. package/dist/src/mcpl/server-registry.d.ts.map +1 -1
  94. package/dist/src/mcpl/server-registry.js +51 -12
  95. package/dist/src/mcpl/server-registry.js.map +1 -1
  96. package/dist/src/mcpl/tool-result-normalize.d.ts +54 -0
  97. package/dist/src/mcpl/tool-result-normalize.d.ts.map +1 -0
  98. package/dist/src/mcpl/tool-result-normalize.js +232 -0
  99. package/dist/src/mcpl/tool-result-normalize.js.map +1 -0
  100. package/dist/src/mcpl/transport.d.ts +56 -13
  101. package/dist/src/mcpl/transport.d.ts.map +1 -1
  102. package/dist/src/mcpl/transport.js +206 -70
  103. package/dist/src/mcpl/transport.js.map +1 -1
  104. package/dist/src/mcpl/types.d.ts +66 -20
  105. package/dist/src/mcpl/types.d.ts.map +1 -1
  106. package/dist/src/mcpl/types.js.map +1 -1
  107. package/dist/src/mcpl/visible-content.d.ts +2 -1
  108. package/dist/src/mcpl/visible-content.d.ts.map +1 -1
  109. package/dist/src/mcpl/visible-content.js +2 -1
  110. package/dist/src/mcpl/visible-content.js.map +1 -1
  111. package/dist/src/module-registry.d.ts +16 -6
  112. package/dist/src/module-registry.d.ts.map +1 -1
  113. package/dist/src/module-registry.js +65 -6
  114. package/dist/src/module-registry.js.map +1 -1
  115. package/dist/src/modules/api/index.d.ts +1 -1
  116. package/dist/src/modules/api/index.d.ts.map +1 -1
  117. package/dist/src/modules/api/index.js +3 -2
  118. package/dist/src/modules/api/index.js.map +1 -1
  119. package/dist/src/modules/discord/discord-js-client.d.ts +42 -2
  120. package/dist/src/modules/discord/discord-js-client.d.ts.map +1 -1
  121. package/dist/src/modules/discord/discord-js-client.js +268 -65
  122. package/dist/src/modules/discord/discord-js-client.js.map +1 -1
  123. package/dist/src/modules/discord/index.d.ts +27 -5
  124. package/dist/src/modules/discord/index.d.ts.map +1 -1
  125. package/dist/src/modules/discord/index.js +366 -76
  126. package/dist/src/modules/discord/index.js.map +1 -1
  127. package/dist/src/modules/discord/refusal.d.ts +14 -0
  128. package/dist/src/modules/discord/refusal.d.ts.map +1 -0
  129. package/dist/src/modules/discord/refusal.js +14 -0
  130. package/dist/src/modules/discord/refusal.js.map +1 -0
  131. package/dist/src/modules/discord/types.d.ts +17 -7
  132. package/dist/src/modules/discord/types.d.ts.map +1 -1
  133. package/dist/src/modules/health/index.d.ts.map +1 -1
  134. package/dist/src/modules/health/index.js +6 -2
  135. package/dist/src/modules/health/index.js.map +1 -1
  136. package/dist/src/modules/index.d.ts +1 -1
  137. package/dist/src/modules/index.d.ts.map +1 -1
  138. package/dist/src/modules/index.js +1 -1
  139. package/dist/src/modules/index.js.map +1 -1
  140. package/dist/src/modules/workspace/disk-agreement.d.ts +25 -2
  141. package/dist/src/modules/workspace/disk-agreement.d.ts.map +1 -1
  142. package/dist/src/modules/workspace/disk-agreement.js +45 -5
  143. package/dist/src/modules/workspace/disk-agreement.js.map +1 -1
  144. package/dist/src/modules/workspace/effects.d.ts +2 -1
  145. package/dist/src/modules/workspace/effects.d.ts.map +1 -1
  146. package/dist/src/modules/workspace/effects.js +19 -9
  147. package/dist/src/modules/workspace/effects.js.map +1 -1
  148. package/dist/src/modules/workspace/index.d.ts +214 -42
  149. package/dist/src/modules/workspace/index.d.ts.map +1 -1
  150. package/dist/src/modules/workspace/index.js +667 -113
  151. package/dist/src/modules/workspace/index.js.map +1 -1
  152. package/dist/src/modules/workspace/observe.d.ts +240 -8
  153. package/dist/src/modules/workspace/observe.d.ts.map +1 -1
  154. package/dist/src/modules/workspace/observe.js +554 -24
  155. package/dist/src/modules/workspace/observe.js.map +1 -1
  156. package/dist/src/modules/workspace/types.d.ts +10 -1
  157. package/dist/src/modules/workspace/types.d.ts.map +1 -1
  158. package/dist/src/modules/workspace/types.js.map +1 -1
  159. package/dist/src/modules/workspace/watcher.d.ts +42 -0
  160. package/dist/src/modules/workspace/watcher.d.ts.map +1 -1
  161. package/dist/src/modules/workspace/watcher.js +130 -25
  162. package/dist/src/modules/workspace/watcher.js.map +1 -1
  163. package/dist/src/silent-heartbeat.d.ts +112 -39
  164. package/dist/src/silent-heartbeat.d.ts.map +1 -1
  165. package/dist/src/silent-heartbeat.js +100 -29
  166. package/dist/src/silent-heartbeat.js.map +1 -1
  167. package/dist/src/tool-args.d.ts +40 -0
  168. package/dist/src/tool-args.d.ts.map +1 -0
  169. package/dist/src/tool-args.js +207 -0
  170. package/dist/src/tool-args.js.map +1 -0
  171. package/dist/src/tool-presentation.d.ts.map +1 -1
  172. package/dist/src/tool-presentation.js +9 -2
  173. package/dist/src/tool-presentation.js.map +1 -1
  174. package/dist/src/types/agent.d.ts +27 -17
  175. package/dist/src/types/agent.d.ts.map +1 -1
  176. package/dist/src/types/events.d.ts +8 -0
  177. package/dist/src/types/events.d.ts.map +1 -1
  178. package/dist/src/types/framework.d.ts +17 -2
  179. package/dist/src/types/framework.d.ts.map +1 -1
  180. package/dist/src/types/module.d.ts +54 -10
  181. package/dist/src/types/module.d.ts.map +1 -1
  182. package/dist/src/types/trace.d.ts +2 -2
  183. package/dist/src/types/trace.d.ts.map +1 -1
  184. package/package.json +3 -4
  185. package/src/agent.ts +99 -36
  186. package/src/code-execution/index.ts +1 -0
  187. package/src/code-execution/py-runner.ts +104 -17
  188. package/src/code-execution/runtime-py.ts +47 -7
  189. package/src/code-execution/tool-definition.ts +65 -11
  190. package/src/config-checks.ts +4 -2
  191. package/src/framework.ts +3633 -956
  192. package/src/gate/event-gate.ts +14 -6
  193. package/src/held-writes.ts +59 -0
  194. package/src/index.ts +19 -4
  195. package/src/mcpl/capability-grant.ts +1 -1
  196. package/src/mcpl/channel-registry.ts +613 -160
  197. package/src/mcpl/convert-block.ts +15 -7
  198. package/src/mcpl/index.ts +14 -1
  199. package/src/mcpl/inference-router.ts +8 -7
  200. package/src/mcpl/log-value.ts +10 -0
  201. package/src/mcpl/modern-connection.ts +1182 -0
  202. package/src/mcpl/prefix-rule.ts +32 -0
  203. package/src/mcpl/protocol-family.ts +691 -0
  204. package/src/mcpl/push-coalescer.ts +67 -29
  205. package/src/mcpl/reference-fetcher.ts +288 -82
  206. package/src/mcpl/references.ts +123 -33
  207. package/src/mcpl/server-connection.ts +1050 -221
  208. package/src/mcpl/server-registry.ts +50 -12
  209. package/src/mcpl/tool-result-normalize.ts +294 -0
  210. package/src/mcpl/transport.ts +204 -62
  211. package/src/mcpl/types.ts +67 -20
  212. package/src/mcpl/visible-content.ts +2 -1
  213. package/src/module-registry.ts +68 -13
  214. package/src/modules/api/index.ts +3 -2
  215. package/src/modules/discord/discord-js-client.ts +288 -72
  216. package/src/modules/discord/index.ts +380 -77
  217. package/src/modules/discord/refusal.ts +13 -0
  218. package/src/modules/discord/types.ts +17 -9
  219. package/src/modules/health/index.ts +6 -2
  220. package/src/modules/index.ts +1 -1
  221. package/src/modules/workspace/disk-agreement.ts +46 -5
  222. package/src/modules/workspace/effects.ts +18 -7
  223. package/src/modules/workspace/index.ts +722 -124
  224. package/src/modules/workspace/observe.ts +591 -22
  225. package/src/modules/workspace/types.ts +10 -1
  226. package/src/modules/workspace/watcher.ts +126 -25
  227. package/src/silent-heartbeat.ts +184 -59
  228. package/src/tool-args.ts +213 -0
  229. package/src/tool-presentation.ts +9 -2
  230. package/src/types/agent.ts +27 -17
  231. package/src/types/events.ts +8 -0
  232. package/src/types/framework.ts +17 -2
  233. package/src/types/module.ts +55 -10
  234. package/src/types/trace.ts +2 -2
@@ -130,14 +130,19 @@ interface Rendering<E> {
130
130
  /** What an assembly did, per subject, for the turn being assembled. */
131
131
  export interface AssemblyResult {
132
132
  /** Subjects this assembly finished with: it waited on their render to
133
- * completion, or freeze() declined them for this agent. */
133
+ * completion, freeze() declined them for this agent, or they were among
134
+ * the turn's causes and their batch was gone or another assembly's. */
134
135
  settled: Set<string>;
135
- /** Of those, the subjects whose render or fallback was delivered as content.
136
- * A settled subject that is not here gave the turn nothing to read: empty
137
- * or blank render (§5.2), cancelled, revoked before the render or at its
138
- * response, a render-start that could not be made durable (the batch then
139
- * waits for its recovery wake), or a batch whose audience doesn't include
140
- * the agent. */
136
+ /** Of those, the subjects whose render or fallback this assembly delivered
137
+ * where its compile reads it, as content the turn reads as its own. A
138
+ * settled subject that is not here gave the turn nothing new of its own to
139
+ * read: empty or blank render (§5.2), cancelled, revoked before the render
140
+ * or at its response, a render-start that could not be made durable (the
141
+ * batch then waits for its recovery wake), a batch whose audience doesn't
142
+ * include the agent, a render placed in another agent's deferred queue, a
143
+ * render another assembly froze (its compile may show it, as that
144
+ * request's), or a cause whose batch was withdrawn, displaced or consumed
145
+ * by another request. */
141
146
  materialized: Set<string>;
142
147
  }
143
148
 
@@ -193,6 +198,11 @@ export interface CoalescerHost<E> {
193
198
  deliver(occurrence: CoalescedOccurrence<E>, materialized?: McplContentBlock[], assemblingFor?: string): Promise<CoalescingPlacement | undefined>;
194
199
  /** Queue a wake for a batch that has no model-visible content yet. */
195
200
  wakeForBatch(occurrence: CoalescedOccurrence<E>): Promise<void>;
201
+ /** Queue an ordinary push wake for `agent`, under the batch's own wake
202
+ * policy, to read a render of the batch placed in its deferred queue that
203
+ * no request consumed. It carries no subject, so the subject's other wakes,
204
+ * and later withdrawals of them, leave it. */
205
+ wakeToRead(occurrence: CoalescedOccurrence<E>, agent: string): Promise<void>;
196
206
  /** Withdraw unstarted wakes whose sole cause is this subject. */
197
207
  cancelWake(subject: string): void;
198
208
  /** The batch's audience still holds the authority it was admitted under. */
@@ -675,23 +685,32 @@ export class PushCoalescer<E = unknown> {
675
685
  * `agentName`. Called by the host at a turn's assembly boundary, before the
676
686
  * compile. Bounded by the host's render timeout; a failed or late render
677
687
  * materializes the admitted fallback (§5.3). Reports which subjects
678
- * settled and which of them produced content, so the host can tell a turn
679
- * whose only cause rendered nothing.
688
+ * settled and which of them gave the turn content, so the host can tell a
689
+ * turn whose only causes gave it nothing to read.
690
+ *
691
+ * `causes` are the subjects whose batch wakes started the turn. A batch has
692
+ * one consumer, the request it was frozen for (§5.2: the materialized
693
+ * occurrence is consumed by that request). So a cause whose batch is gone
694
+ * by now settles and gives the turn nothing, and an assembly that joins
695
+ * another's render waits for it, so its compile shows the content, without
696
+ * taking it as its own.
680
697
  */
681
- async assemble(agentName: string): Promise<AssemblyResult> {
698
+ async assemble(agentName: string, causes: readonly string[] = []): Promise<AssemblyResult> {
682
699
  const result: AssemblyResult = { settled: new Set(), materialized: new Set() };
683
700
  if (this.suspended) return result;
684
701
  const work: Promise<void>[] = [];
685
- for (const subject of [...this.subjects.keys()]) {
702
+ const wanted = new Set(causes);
703
+ for (const subject of new Set([...this.subjects.keys(), ...causes])) {
686
704
  // The handle is wrapped: a bare promise returned through `locked` would
687
705
  // be flattened by `then`, holding the lock until the render settled —
688
706
  // and the settlement itself needs the lock.
689
- const started = await this.locked(() => this.freeze(subject, agentName));
707
+ const started = await this.locked(() => this.freeze(subject, agentName, wanted.has(subject)));
690
708
  if (started === 'declined') result.settled.add(subject);
691
709
  else if (started) {
692
710
  work.push(started.done.then(() => {
693
711
  result.settled.add(subject);
694
- if (started.rendering.materialized) result.materialized.add(subject);
712
+ // A render another assembly froze is that request's to read.
713
+ if (started.rendering.materialized && !started.joined) result.materialized.add(subject);
695
714
  }));
696
715
  }
697
716
  }
@@ -703,27 +722,40 @@ export class PushCoalescer<E = unknown> {
703
722
  /**
704
723
  * Under the lock: decide whether `subject`'s batch renders for `agentName`,
705
724
  * freeze it, make the render-start durable, re-check authority, and start
706
- * the RPC. Returns the render's completion (shared by every assembly that
707
- * waits on this batch, vector 25). Returns 'declined' when the turn being
708
- * assembled gets nothing of the batch: the agent isn't in its audience,
709
- * whether or not another assembly is rendering it (the batch is left as it
710
- * is); authority was revoked before the render could start (the batch is
711
- * dropped); or the render-start could not be made durable (the batch is
712
- * kept for its recovery wake). Returns undefined when the batch was not
713
- * this assembly's to decide on: there is none, the subject moved on during
714
- * the audience lookup, or the host is stopping.
725
+ * the RPC. Returns the render's completion, which an assembly that joins
726
+ * the render waits for too (`joined`: vector 25, one render). Returns
727
+ * 'declined' when the turn being assembled gets nothing of the batch: the
728
+ * agent isn't in its audience, whether or not another assembly is
729
+ * rendering it (the batch is left as it is); authority was revoked before
730
+ * the render could start (the batch is dropped); the render-start could not
731
+ * be made durable (the batch is kept for its recovery wake); or, for one of
732
+ * the turn's causes (`cause`), the batch is gone. Returns undefined when
733
+ * the batch was not this assembly's to decide on: there is none and it
734
+ * wasn't a cause, the subject moved on during the audience lookup, or the
735
+ * host is stopping.
715
736
  */
716
- private async freeze(subject: string, agentName: string): Promise<{ done: Promise<void>; rendering: Rendering<E> } | 'declined' | undefined> {
737
+ private async freeze(subject: string, agentName: string, cause = false): Promise<{ done: Promise<void>; rendering: Rendering<E>; joined?: true } | 'declined' | undefined> {
738
+ if (this.suspended) return undefined;
717
739
  const state = this.subjects.get(subject);
718
- if (!state || this.suspended) return undefined;
740
+ // The batch whose wake started this turn is gone: a retraction or a
741
+ // displacement withdrew it after the wake was dispatched, or another
742
+ // request consumed it, the batch's one consumption, as the freeze's
743
+ // withdrawal of the other queued wakes already makes it. Whatever replaced
744
+ // it is read through its own delivery and wake. (A retry of a turn that
745
+ // read its batch comes back without the marks of a batch wake, so it
746
+ // never reaches here as a cause: beginAgentTurn.)
747
+ if (!state || (!state.batch && !state.rendering)) return cause ? 'declined' : undefined;
719
748
  if (state.rendering) {
720
- // Another assembly froze this batch; share its outcome (vector 25),
721
- // unless this agent isn't in its audience, as below.
749
+ // Another assembly froze this batch, and the request it assembles
750
+ // consumes it. An assembly in its audience waits for that render, so
751
+ // its compile shows the content (vector 25), but the content isn't its
752
+ // own to read, cause or not; unless this agent isn't in its audience,
753
+ // as below.
722
754
  const rendering = state.rendering;
723
755
  const audience = await this.host.audience(rendering.batch.latest);
724
756
  if (state.rendering !== rendering) return undefined;
725
757
  if (!audience.includes(agentName)) return 'declined';
726
- return { done: rendering.done, rendering };
758
+ return { done: rendering.done, rendering, joined: true };
727
759
  }
728
760
  const batch = state.batch;
729
761
  if (!batch) return undefined;
@@ -824,15 +856,21 @@ export class PushCoalescer<E = unknown> {
824
856
  this.host.audit({ kind: 'rendered', subject, eventId: occurrence.eventId, source, empty });
825
857
  if (empty) return; // §5.2: nothing happened (blank text included)
826
858
  const placement = await this.host.deliver({ ...occurrence, timestamp, content }, content, assemblingFor);
827
- rendering.materialized = true;
828
859
  if (placement?.deferredId) {
829
860
  // Landed in another agent's deferred queue (its turn is alive): still
830
- // unread there, so it stays replaceable and withdrawable.
861
+ // unread there, so it stays replaceable and withdrawable. The turn
862
+ // being assembled doesn't read it, so it isn't materialized for that
863
+ // turn, and no request has consumed it. The freeze withdrew the
864
+ // queue's agent's wake for this batch; give it an ordinary wake, as
865
+ // any delivery during its turn has, beside any wakes a newer batch
866
+ // has, so that its next turn reads the content.
831
867
  state.occupant = { eventId: occurrence.eventId, placement };
832
868
  state.audienceAgent = placement.agent;
869
+ await this.host.wakeToRead(occurrence, placement.agent);
833
870
  return;
834
871
  }
835
872
  // The materialized occurrence is consumed by the request being assembled.
873
+ rendering.materialized = true;
836
874
  state.history = 'some';
837
875
  state.consumedEventId = occurrence.eventId;
838
876
  state.occupant = undefined;