@dxos/react-ui-trace 0.11.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 (148) hide show
  1. package/LICENSE +105 -0
  2. package/README.md +3 -0
  3. package/dist/lib/index.mjs +2868 -0
  4. package/dist/lib/index.mjs.map +1 -0
  5. package/dist/lib/testing.mjs +338 -0
  6. package/dist/lib/testing.mjs.map +1 -0
  7. package/dist/lib/translations.mjs +19 -0
  8. package/dist/lib/translations.mjs.map +1 -0
  9. package/dist/types/src/components/Gantt/Gantt.d.ts +68 -0
  10. package/dist/types/src/components/Gantt/Gantt.d.ts.map +1 -0
  11. package/dist/types/src/components/Gantt/Gantt.stories.d.ts +30 -0
  12. package/dist/types/src/components/Gantt/Gantt.stories.d.ts.map +1 -0
  13. package/dist/types/src/components/Gantt/index.d.ts +2 -0
  14. package/dist/types/src/components/Gantt/index.d.ts.map +1 -0
  15. package/dist/types/src/components/ProcessTree/ProcessTree.d.ts +32 -0
  16. package/dist/types/src/components/ProcessTree/ProcessTree.d.ts.map +1 -0
  17. package/dist/types/src/components/ProcessTree/ProcessTree.stories.d.ts +8 -0
  18. package/dist/types/src/components/ProcessTree/ProcessTree.stories.d.ts.map +1 -0
  19. package/dist/types/src/components/ProcessTree/index.d.ts +2 -0
  20. package/dist/types/src/components/ProcessTree/index.d.ts.map +1 -0
  21. package/dist/types/src/components/Timeline/Timeline.d.ts +50 -0
  22. package/dist/types/src/components/Timeline/Timeline.d.ts.map +1 -0
  23. package/dist/types/src/components/Timeline/Timeline.stories.d.ts +24 -0
  24. package/dist/types/src/components/Timeline/Timeline.stories.d.ts.map +1 -0
  25. package/dist/types/src/components/Timeline/index.d.ts +4 -0
  26. package/dist/types/src/components/Timeline/index.d.ts.map +1 -0
  27. package/dist/types/src/components/Timeline/timeline-options.d.ts +9 -0
  28. package/dist/types/src/components/Timeline/timeline-options.d.ts.map +1 -0
  29. package/dist/types/src/components/Timeline/timeline-printer.d.ts +7 -0
  30. package/dist/types/src/components/Timeline/timeline-printer.d.ts.map +1 -0
  31. package/dist/types/src/components/Timeline/timeline-printer.test.d.ts +2 -0
  32. package/dist/types/src/components/Timeline/timeline-printer.test.d.ts.map +1 -0
  33. package/dist/types/src/components/TracePanel/TracePanel.d.ts +28 -0
  34. package/dist/types/src/components/TracePanel/TracePanel.d.ts.map +1 -0
  35. package/dist/types/src/components/TracePanel/dxn-extractor.d.ts +19 -0
  36. package/dist/types/src/components/TracePanel/dxn-extractor.d.ts.map +1 -0
  37. package/dist/types/src/components/TracePanel/dxn-extractor.test.d.ts +2 -0
  38. package/dist/types/src/components/TracePanel/dxn-extractor.test.d.ts.map +1 -0
  39. package/dist/types/src/components/TracePanel/index.d.ts +4 -0
  40. package/dist/types/src/components/TracePanel/index.d.ts.map +1 -0
  41. package/dist/types/src/components/TracePanel/trace-filter.d.ts +39 -0
  42. package/dist/types/src/components/TracePanel/trace-filter.d.ts.map +1 -0
  43. package/dist/types/src/components/TracePanel/trace-filter.test.d.ts +2 -0
  44. package/dist/types/src/components/TracePanel/trace-filter.test.d.ts.map +1 -0
  45. package/dist/types/src/components/TracePanel/useTraceMenu.d.ts +15 -0
  46. package/dist/types/src/components/TracePanel/useTraceMenu.d.ts.map +1 -0
  47. package/dist/types/src/components/index.d.ts +5 -0
  48. package/dist/types/src/components/index.d.ts.map +1 -0
  49. package/dist/types/src/execution-graph/execution-graph.d.ts +139 -0
  50. package/dist/types/src/execution-graph/execution-graph.d.ts.map +1 -0
  51. package/dist/types/src/execution-graph/execution-graph.test.d.ts +2 -0
  52. package/dist/types/src/execution-graph/execution-graph.test.d.ts.map +1 -0
  53. package/dist/types/src/execution-graph/index.d.ts +4 -0
  54. package/dist/types/src/execution-graph/index.d.ts.map +1 -0
  55. package/dist/types/src/execution-graph/pending-block-status.d.ts +26 -0
  56. package/dist/types/src/execution-graph/pending-block-status.d.ts.map +1 -0
  57. package/dist/types/src/execution-graph/pending-block-status.test.d.ts +2 -0
  58. package/dist/types/src/execution-graph/pending-block-status.test.d.ts.map +1 -0
  59. package/dist/types/src/execution-graph/remote-snapshot.test.d.ts +2 -0
  60. package/dist/types/src/execution-graph/remote-snapshot.test.d.ts.map +1 -0
  61. package/dist/types/src/execution-graph/span-tree.d.ts +106 -0
  62. package/dist/types/src/execution-graph/span-tree.d.ts.map +1 -0
  63. package/dist/types/src/execution-graph/span-tree.test.d.ts +2 -0
  64. package/dist/types/src/execution-graph/span-tree.test.d.ts.map +1 -0
  65. package/dist/types/src/execution-graph/sub-agent-delegation.test.d.ts +2 -0
  66. package/dist/types/src/execution-graph/sub-agent-delegation.test.d.ts.map +1 -0
  67. package/dist/types/src/execution-graph/testing/collect-trace-events.d.ts +40 -0
  68. package/dist/types/src/execution-graph/testing/collect-trace-events.d.ts.map +1 -0
  69. package/dist/types/src/execution-graph/testing/index.d.ts +2 -0
  70. package/dist/types/src/execution-graph/testing/index.d.ts.map +1 -0
  71. package/dist/types/src/hooks/index.d.ts +4 -0
  72. package/dist/types/src/hooks/index.d.ts.map +1 -0
  73. package/dist/types/src/hooks/useExecutionGraph.d.ts +17 -0
  74. package/dist/types/src/hooks/useExecutionGraph.d.ts.map +1 -0
  75. package/dist/types/src/hooks/useSessionTimeline.d.ts +17 -0
  76. package/dist/types/src/hooks/useSessionTimeline.d.ts.map +1 -0
  77. package/dist/types/src/hooks/useTraceMessages.d.ts +17 -0
  78. package/dist/types/src/hooks/useTraceMessages.d.ts.map +1 -0
  79. package/dist/types/src/index.d.ts +5 -0
  80. package/dist/types/src/index.d.ts.map +1 -0
  81. package/dist/types/src/session-timeline/index.d.ts +3 -0
  82. package/dist/types/src/session-timeline/index.d.ts.map +1 -0
  83. package/dist/types/src/session-timeline/session-timeline.d.ts +19 -0
  84. package/dist/types/src/session-timeline/session-timeline.d.ts.map +1 -0
  85. package/dist/types/src/session-timeline/session-timeline.test.d.ts +2 -0
  86. package/dist/types/src/session-timeline/session-timeline.test.d.ts.map +1 -0
  87. package/dist/types/src/session-timeline/types.d.ts +129 -0
  88. package/dist/types/src/session-timeline/types.d.ts.map +1 -0
  89. package/dist/types/src/testing/index.d.ts +5 -0
  90. package/dist/types/src/testing/index.d.ts.map +1 -0
  91. package/dist/types/src/testing/simulated-agent.d.ts +63 -0
  92. package/dist/types/src/testing/simulated-agent.d.ts.map +1 -0
  93. package/dist/types/src/testing/snapshot-playback.d.ts +12 -0
  94. package/dist/types/src/testing/snapshot-playback.d.ts.map +1 -0
  95. package/dist/types/src/testing/test-trace.d.ts +5 -0
  96. package/dist/types/src/testing/test-trace.d.ts.map +1 -0
  97. package/dist/types/src/translations.d.ts +19 -0
  98. package/dist/types/src/translations.d.ts.map +1 -0
  99. package/dist/types/tsconfig.tsbuildinfo +1 -0
  100. package/package.json +77 -0
  101. package/src/components/Gantt/Gantt.stories.tsx +241 -0
  102. package/src/components/Gantt/Gantt.tsx +589 -0
  103. package/src/components/Gantt/index.ts +5 -0
  104. package/src/components/ProcessTree/ProcessTree.stories.tsx +95 -0
  105. package/src/components/ProcessTree/ProcessTree.tsx +265 -0
  106. package/src/components/ProcessTree/index.ts +5 -0
  107. package/src/components/Timeline/Timeline.stories.tsx +326 -0
  108. package/src/components/Timeline/Timeline.tsx +534 -0
  109. package/src/components/Timeline/git.drawio.svg +821 -0
  110. package/src/components/Timeline/index.ts +7 -0
  111. package/src/components/Timeline/timeline-options.ts +27 -0
  112. package/src/components/Timeline/timeline-printer.test.ts +76 -0
  113. package/src/components/Timeline/timeline-printer.ts +223 -0
  114. package/src/components/TracePanel/TracePanel.tsx +248 -0
  115. package/src/components/TracePanel/dxn-extractor.test.ts +153 -0
  116. package/src/components/TracePanel/dxn-extractor.ts +166 -0
  117. package/src/components/TracePanel/index.ts +7 -0
  118. package/src/components/TracePanel/trace-filter.test.ts +137 -0
  119. package/src/components/TracePanel/trace-filter.ts +120 -0
  120. package/src/components/TracePanel/useTraceMenu.ts +95 -0
  121. package/src/components/index.ts +8 -0
  122. package/src/execution-graph/SPEC.md +749 -0
  123. package/src/execution-graph/execution-graph.test.ts +1205 -0
  124. package/src/execution-graph/execution-graph.ts +1076 -0
  125. package/src/execution-graph/index.ts +35 -0
  126. package/src/execution-graph/pending-block-status.test.ts +118 -0
  127. package/src/execution-graph/pending-block-status.ts +88 -0
  128. package/src/execution-graph/remote-snapshot.test.ts +116 -0
  129. package/src/execution-graph/span-tree.test.ts +370 -0
  130. package/src/execution-graph/span-tree.ts +404 -0
  131. package/src/execution-graph/sub-agent-delegation.test.ts +65 -0
  132. package/src/execution-graph/testing/collect-trace-events.ts +76 -0
  133. package/src/execution-graph/testing/index.ts +5 -0
  134. package/src/execution-graph/testing/sub-agent-delegation.json +1285 -0
  135. package/src/hooks/index.ts +7 -0
  136. package/src/hooks/useExecutionGraph.ts +107 -0
  137. package/src/hooks/useSessionTimeline.ts +53 -0
  138. package/src/hooks/useTraceMessages.ts +58 -0
  139. package/src/index.ts +8 -0
  140. package/src/session-timeline/index.ts +6 -0
  141. package/src/session-timeline/session-timeline.test.ts +662 -0
  142. package/src/session-timeline/session-timeline.ts +605 -0
  143. package/src/session-timeline/types.ts +100 -0
  144. package/src/testing/index.ts +8 -0
  145. package/src/testing/simulated-agent.ts +293 -0
  146. package/src/testing/snapshot-playback.ts +45 -0
  147. package/src/testing/test-trace.ts +22 -0
  148. package/src/translations.ts +29 -0
@@ -0,0 +1,338 @@
1
+ import { useEffect, useRef, useState } from "react";
2
+ import * as Option from "effect/Option";
3
+ import * as Process from "@dxos/compute/Process";
4
+ import * as Schema from "effect/Schema";
5
+ import * as Trace from "@dxos/compute/Trace";
6
+ import { Annotation } from "@dxos/echo";
7
+ import { EntityId } from "@dxos/keys";
8
+ import * as Effect from "effect/Effect";
9
+ //#region src/testing/simulated-agent.ts
10
+ var agentScenarios = [
11
+ {
12
+ name: "Create organization",
13
+ prompt: "Create an organization called \"Cyberdyne Systems\"",
14
+ tools: [{
15
+ key: "list-schemas",
16
+ name: "List Schemas",
17
+ icon: "ph--list--regular",
18
+ durationMs: 800
19
+ }, {
20
+ key: "create-object",
21
+ name: "Create Object",
22
+ icon: "ph--plus-circle--regular",
23
+ durationMs: 1600,
24
+ children: [{
25
+ key: "validate",
26
+ name: "Validate",
27
+ icon: "ph--check--regular",
28
+ durationMs: 600
29
+ }]
30
+ }]
31
+ },
32
+ {
33
+ name: "Research",
34
+ prompt: "Search for all organizations and persons",
35
+ tools: [
36
+ {
37
+ key: "list-schemas",
38
+ name: "List Schemas",
39
+ icon: "ph--list--regular",
40
+ durationMs: 700
41
+ },
42
+ {
43
+ key: "delegate",
44
+ name: "Delegate Research",
45
+ icon: "ph--users-three--regular",
46
+ durationMs: 2400,
47
+ concurrent: true,
48
+ children: [{
49
+ key: "query",
50
+ name: "Query Organizations",
51
+ icon: "ph--magnifying-glass--regular",
52
+ durationMs: 1800
53
+ }, {
54
+ key: "query",
55
+ name: "Query Persons",
56
+ icon: "ph--magnifying-glass--regular",
57
+ durationMs: 1200
58
+ }]
59
+ },
60
+ {
61
+ key: "summarize",
62
+ name: "Summarize",
63
+ icon: "ph--article--regular",
64
+ durationMs: 900
65
+ }
66
+ ]
67
+ },
68
+ {
69
+ name: "Failing run",
70
+ prompt: "Create a person named \"John Connor\"",
71
+ tools: [{
72
+ key: "list-schemas",
73
+ name: "List Schemas",
74
+ icon: "ph--list--regular",
75
+ durationMs: 600
76
+ }, {
77
+ key: "create-object",
78
+ name: "Create Object",
79
+ icon: "ph--plus-circle--regular",
80
+ durationMs: 1200,
81
+ fail: true
82
+ }]
83
+ }
84
+ ];
85
+ var delay = (ms) => Effect.promise(() => new Promise((resolve) => setTimeout(resolve, ms)));
86
+ /**
87
+ * Write a trace event and yield to the event loop so FeedTraceSink flushes it to ECHO before continuing.
88
+ */
89
+ var writeAndFlush = (eventType, payload) => Effect.gen(function* () {
90
+ yield* Trace.write(eventType, payload);
91
+ yield* delay(100);
92
+ });
93
+ var AgentStep = Schema.Union([
94
+ Schema.Struct({
95
+ _tag: Schema.Literal("begin"),
96
+ prompt: Schema.String
97
+ }),
98
+ Schema.Struct({
99
+ _tag: Schema.Literal("toolCall"),
100
+ toolCallId: Schema.String,
101
+ name: Schema.String
102
+ }),
103
+ Schema.Struct({
104
+ _tag: Schema.Literal("toolResult"),
105
+ toolCallId: Schema.String,
106
+ name: Schema.String
107
+ }),
108
+ Schema.Struct({
109
+ _tag: Schema.Literal("end"),
110
+ status: Schema.Literals(["success", "error"])
111
+ })
112
+ ]);
113
+ /**
114
+ * Storybook fixture: a {@link Process} standing in for a conversational agent. Each input advances
115
+ * it one step, so the caller can interleave the agent's own trace events with the child operation
116
+ * processes that {@link runScenario} spawns beneath it.
117
+ */
118
+ var SimulatedAgent = Process.make({
119
+ key: "org.dxos.testing.process.agent",
120
+ input: AgentStep,
121
+ output: Schema.Void,
122
+ services: [Trace.TraceService]
123
+ }, (ctx) => Effect.gen(function* () {
124
+ const messageId = EntityId.random();
125
+ return {
126
+ onInput: (step) => Effect.gen(function* () {
127
+ switch (step._tag) {
128
+ case "begin":
129
+ yield* writeAndFlush(Trace.AgentRequestBegin, {});
130
+ yield* writeAndFlush(Trace.CompleteBlock, {
131
+ messageId,
132
+ role: "user",
133
+ block: {
134
+ _tag: "text",
135
+ text: step.prompt
136
+ }
137
+ });
138
+ break;
139
+ case "toolCall":
140
+ yield* writeAndFlush(Trace.CompleteBlock, {
141
+ messageId,
142
+ role: "assistant",
143
+ block: {
144
+ _tag: "toolCall",
145
+ toolCallId: step.toolCallId,
146
+ name: step.name,
147
+ input: "{}",
148
+ providerExecuted: false
149
+ }
150
+ });
151
+ break;
152
+ case "toolResult":
153
+ yield* writeAndFlush(Trace.CompleteBlock, {
154
+ messageId,
155
+ role: "assistant",
156
+ block: {
157
+ _tag: "toolResult",
158
+ toolCallId: step.toolCallId,
159
+ name: step.name,
160
+ providerExecuted: false
161
+ }
162
+ });
163
+ break;
164
+ case "end":
165
+ yield* writeAndFlush(Trace.AgentRequestEnd, { status: step.status });
166
+ if (step.status === "error") ctx.fail(/* @__PURE__ */ new Error("Simulated agent failure"));
167
+ else ctx.succeed();
168
+ }
169
+ }).pipe(Effect.orDie),
170
+ onAlarm: () => Effect.void,
171
+ onChildEvent: () => Effect.void
172
+ };
173
+ }));
174
+ var OperationInput = Schema.Struct({
175
+ key: Schema.String,
176
+ name: Schema.String,
177
+ icon: Schema.optional(Schema.String),
178
+ durationMs: Schema.Number,
179
+ fail: Schema.optional(Schema.Boolean)
180
+ });
181
+ /**
182
+ * Storybook fixture: a {@link Process} that emits the `operation.start`/`operation.end` pair a real
183
+ * operation process emits, with a simulated execution time in between.
184
+ */
185
+ var SimulatedOperation = Process.make({
186
+ key: "org.dxos.testing.process.operation",
187
+ input: OperationInput,
188
+ output: Schema.Void,
189
+ services: [Trace.TraceService]
190
+ }, (ctx) => Effect.succeed({
191
+ onInput: ({ key, name, icon, durationMs, fail }) => Effect.gen(function* () {
192
+ yield* writeAndFlush(Trace.OperationStart, {
193
+ key,
194
+ name,
195
+ icon
196
+ });
197
+ yield* delay(durationMs);
198
+ yield* writeAndFlush(Trace.OperationEnd, {
199
+ key,
200
+ name,
201
+ icon,
202
+ outcome: fail ? "failure" : "success",
203
+ error: fail ? `Simulated failure in '${name}'` : void 0
204
+ });
205
+ if (fail) ctx.fail(/* @__PURE__ */ new Error(`Simulated failure in '${name}'`));
206
+ else ctx.succeed();
207
+ }).pipe(Effect.orDie),
208
+ onAlarm: () => Effect.void,
209
+ onChildEvent: () => Effect.void
210
+ }));
211
+ /**
212
+ * Spawns one simulated operation (and its children) beneath `parentProcessId`.
213
+ * A process cannot spawn its own children, so the tree is assembled from the caller's side.
214
+ */
215
+ var runTool = (manager, tool, parentProcessId, environment) => Effect.gen(function* () {
216
+ const handle = yield* manager.spawn(SimulatedOperation, {
217
+ parentProcessId,
218
+ name: tool.name,
219
+ environment
220
+ });
221
+ yield* handle.submitInput({
222
+ key: tool.key,
223
+ name: tool.name,
224
+ icon: tool.icon,
225
+ durationMs: tool.durationMs,
226
+ fail: tool.fail
227
+ });
228
+ const children = tool.children ?? [];
229
+ if (children.length > 0) {
230
+ const effects = children.map((child) => runTool(manager, child, handle.pid, environment));
231
+ yield* tool.concurrent ? Effect.all(effects, { concurrency: "unbounded" }) : Effect.all(effects);
232
+ }
233
+ yield* Effect.exit(handle.runToCompletion());
234
+ }).pipe(Effect.orDie);
235
+ /**
236
+ * Runs one {@link agentScenarios} entry end to end: an agent process with a child operation process
237
+ * per tool, so the panel has both a populated process tree and a timeline with nested spans.
238
+ */
239
+ var runScenario = (manager, index, environment) => Effect.gen(function* () {
240
+ const scenario = agentScenarios[index % agentScenarios.length];
241
+ const agent = yield* manager.spawn(SimulatedAgent, {
242
+ name: `Agent (${scenario.name})`,
243
+ environment
244
+ });
245
+ yield* agent.submitInput({
246
+ _tag: "begin",
247
+ prompt: scenario.prompt
248
+ });
249
+ let failed = false;
250
+ for (const tool of scenario.tools) {
251
+ const toolCallId = EntityId.random();
252
+ yield* agent.submitInput({
253
+ _tag: "toolCall",
254
+ toolCallId,
255
+ name: tool.key
256
+ });
257
+ yield* runTool(manager, tool, agent.pid, environment);
258
+ if (tool.fail) {
259
+ failed = true;
260
+ break;
261
+ }
262
+ yield* agent.submitInput({
263
+ _tag: "toolResult",
264
+ toolCallId,
265
+ name: tool.key
266
+ });
267
+ }
268
+ yield* agent.submitInput({
269
+ _tag: "end",
270
+ status: failed ? "error" : "success"
271
+ });
272
+ }).pipe(Effect.orDie);
273
+ //#endregion
274
+ //#region src/testing/snapshot-playback.ts
275
+ /**
276
+ * Interval (ms) between auto-played trace messages in the snapshot playback story.
277
+ */
278
+ var PLAYBACK_INTERVAL_MS = 250;
279
+ var STEP_STORAGE_KEY = "plugin-assistant.trace-panel.snapshot.step";
280
+ /**
281
+ * `useState<number>` that hydrates from and persists to `localStorage`.
282
+ * The third tuple member is `true` iff a valid value was loaded on first render.
283
+ */
284
+ var useLocalStorageNumber = (key, initial) => {
285
+ const initRef = useRef(null);
286
+ if (initRef.current === null) {
287
+ let value = initial;
288
+ let hydrated = false;
289
+ if (typeof window !== "undefined") {
290
+ const stored = window.localStorage.getItem(key);
291
+ const parsed = stored === null ? NaN : Number(stored);
292
+ if (Number.isInteger(parsed) && parsed >= 0) {
293
+ value = parsed;
294
+ hydrated = true;
295
+ }
296
+ }
297
+ initRef.current = {
298
+ value,
299
+ hydrated
300
+ };
301
+ }
302
+ const [value, setValue] = useState(initRef.current.value);
303
+ useEffect(() => {
304
+ if (typeof window !== "undefined") window.localStorage.setItem(key, String(value));
305
+ }, [key, value]);
306
+ return [
307
+ value,
308
+ setValue,
309
+ initRef.current.hydrated
310
+ ];
311
+ };
312
+ //#endregion
313
+ //#region src/testing/test-trace.ts
314
+ var makeProcess = (overrides) => ({
315
+ parentPid: null,
316
+ key: `test.process.${overrides.name}`,
317
+ params: {
318
+ name: overrides.name,
319
+ annotations: Annotation.buildDictionary(() => {})
320
+ },
321
+ environment: {},
322
+ error: null,
323
+ startedAt: Date.now() - 1e4,
324
+ completedAt: Option.none(),
325
+ metrics: {
326
+ wallTime: 0,
327
+ inputCount: 0,
328
+ outputCount: 0
329
+ },
330
+ ...overrides
331
+ });
332
+ //#endregion
333
+ //#region src/execution-graph/testing/sub-agent-delegation.json
334
+ var sub_agent_delegation_default = /*#__PURE__*/ JSON.parse("[{\"meta\":{\"pid\":\"2433a0a1-7c09-46e6-bc6f-893f104d1691\",\"processName\":\"Agent\",\"space\":\"BIRSBKL52RS4PRK3IU2GHWTRLO5T6VOLN\",\"conversationId\":\"01KTFZZXTFTNVTK86WEJ6DKTFT\",\"runtimeName\":\"local\"},\"isEphemeral\":false,\"events\":[{\"timestamp\":1780800819470,\"type\":\"assistant.agentRequestBegin\",\"data\":{}}]},{\"meta\":{\"pid\":\"e200b1f7-30a5-4aa8-ba12-31c6d9ddf4aa\",\"parentPid\":\"2433a0a1-7c09-46e6-bc6f-893f104d1691\",\"processName\":\"Get Agent Context (dxn:org.dxos.operation.assistantToolkit.getContext)\",\"space\":\"BIRSBKL52RS4PRK3IU2GHWTRLO5T6VOLN\",\"runtimeName\":\"local\"},\"isEphemeral\":false,\"events\":[{\"timestamp\":1780800819779,\"type\":\"operation.start\",\"data\":{\"key\":\"dxn:org.dxos.operation.assistantToolkit.getContext\",\"name\":\"Get Agent Context\",\"icon\":\"ph--info--regular\"}}]},{\"meta\":{\"pid\":\"e200b1f7-30a5-4aa8-ba12-31c6d9ddf4aa\",\"parentPid\":\"2433a0a1-7c09-46e6-bc6f-893f104d1691\",\"processName\":\"Get Agent Context (dxn:org.dxos.operation.assistantToolkit.getContext)\",\"space\":\"BIRSBKL52RS4PRK3IU2GHWTRLO5T6VOLN\",\"runtimeName\":\"local\"},\"isEphemeral\":false,\"events\":[{\"timestamp\":1780800819796,\"type\":\"operation.end\",\"data\":{\"key\":\"dxn:org.dxos.operation.assistantToolkit.getContext\",\"name\":\"Get Agent Context\",\"icon\":\"ph--info--regular\",\"outcome\":\"success\"}}]},{\"meta\":{\"pid\":\"2433a0a1-7c09-46e6-bc6f-893f104d1691\",\"processName\":\"Agent\",\"space\":\"BIRSBKL52RS4PRK3IU2GHWTRLO5T6VOLN\",\"conversationId\":\"01KTFZZXTFTNVTK86WEJ6DKTFT\",\"runtimeName\":\"local\"},\"isEphemeral\":false,\"events\":[{\"timestamp\":1780800819855,\"type\":\"assistant.completeBlock\",\"data\":{\"messageId\":\"01KTG004MEGN8W9GP1T443300A\",\"role\":\"user\",\"block\":{\"_tag\":\"text\",\"text\":\"create a sub-agent that creates a haiku in a new document\"}}}]},{\"meta\":{\"pid\":\"fe05f5e6-f261-464a-a993-1ecc78557286\",\"parentPid\":\"2433a0a1-7c09-46e6-bc6f-893f104d1691\",\"processName\":\"Get Agent Context (dxn:org.dxos.operation.assistantToolkit.getContext)\",\"space\":\"BIRSBKL52RS4PRK3IU2GHWTRLO5T6VOLN\",\"runtimeName\":\"local\"},\"isEphemeral\":false,\"events\":[{\"timestamp\":1780800820015,\"type\":\"operation.start\",\"data\":{\"key\":\"dxn:org.dxos.operation.assistantToolkit.getContext\",\"name\":\"Get Agent Context\",\"icon\":\"ph--info--regular\"}}]},{\"meta\":{\"pid\":\"fe05f5e6-f261-464a-a993-1ecc78557286\",\"parentPid\":\"2433a0a1-7c09-46e6-bc6f-893f104d1691\",\"processName\":\"Get Agent Context (dxn:org.dxos.operation.assistantToolkit.getContext)\",\"space\":\"BIRSBKL52RS4PRK3IU2GHWTRLO5T6VOLN\",\"runtimeName\":\"local\"},\"isEphemeral\":false,\"events\":[{\"timestamp\":1780800820031,\"type\":\"operation.end\",\"data\":{\"key\":\"dxn:org.dxos.operation.assistantToolkit.getContext\",\"name\":\"Get Agent Context\",\"icon\":\"ph--info--regular\",\"outcome\":\"success\"}}]},{\"meta\":{\"pid\":\"2433a0a1-7c09-46e6-bc6f-893f104d1691\",\"processName\":\"Agent\",\"space\":\"BIRSBKL52RS4PRK3IU2GHWTRLO5T6VOLN\",\"conversationId\":\"01KTFZZXTFTNVTK86WEJ6DKTFT\",\"runtimeName\":\"local\"},\"isEphemeral\":false,\"events\":[{\"timestamp\":1780800822596,\"type\":\"assistant.completeBlock\",\"data\":{\"messageId\":\"01KTG006SHPCW6D5WZJT9J0TKE\",\"role\":\"assistant\",\"block\":{\"_tag\":\"toolCall\",\"toolCallId\":\"toolu_01T1XhBHArQ2UNHvdCEtWY1C\",\"name\":\"update-tasks\",\"input\":\"{\\\"tasks\\\": [{\\\"id\\\":\\\"task_1\\\",\\\"title\\\":\\\"Create a sub-agent that writes a haiku in a new document\\\",\\\"status\\\":\\\"in-progress\\\"}]}\",\"providerExecuted\":false,\"operationKey\":\"dxn:org.dxos.operation.assistantToolkit.updateTasks\",\"operationName\":\"Update tasks\",\"operationIcon\":\"ph--check-square-offset--regular\"}}}]},{\"meta\":{\"pid\":\"2433a0a1-7c09-46e6-bc6f-893f104d1691\",\"processName\":\"Agent\",\"space\":\"BIRSBKL52RS4PRK3IU2GHWTRLO5T6VOLN\",\"conversationId\":\"01KTFZZXTFTNVTK86WEJ6DKTFT\",\"runtimeName\":\"local\"},\"isEphemeral\":false,\"events\":[{\"timestamp\":1780800822638,\"type\":\"assistant.completeBlock\",\"data\":{\"messageId\":\"01KTG007BDN1MTQT7JXNC9MFQW\",\"role\":\"assistant\",\"block\":{\"_tag\":\"stats\",\"model\":\"claude-sonnet-4-6\",\"duration\":2536,\"message\":\"OK\",\"toolCalls\":1,\"usage\":{\"inputTokens\":3,\"outputTokens\":90,\"totalTokens\":93}}}}]},{\"meta\":{\"pid\":\"4f9baefc-1353-406d-b883-0b5a7d1f0e31\",\"parentPid\":\"2433a0a1-7c09-46e6-bc6f-893f104d1691\",\"processName\":\"Update tasks (dxn:org.dxos.operation.assistantToolkit.updateTasks)\",\"space\":\"BIRSBKL52RS4PRK3IU2GHWTRLO5T6VOLN\",\"conversationId\":\"01KTFZZXTFTNVTK86WEJ6DKTFT\",\"runtimeName\":\"local\"},\"isEphemeral\":false,\"events\":[{\"timestamp\":1780800822760,\"type\":\"operation.start\",\"data\":{\"key\":\"dxn:org.dxos.operation.assistantToolkit.updateTasks\",\"name\":\"Update tasks\",\"icon\":\"ph--check-square-offset--regular\"}}]},{\"meta\":{\"pid\":\"4f9baefc-1353-406d-b883-0b5a7d1f0e31\",\"parentPid\":\"2433a0a1-7c09-46e6-bc6f-893f104d1691\",\"processName\":\"Update tasks (dxn:org.dxos.operation.assistantToolkit.updateTasks)\",\"space\":\"BIRSBKL52RS4PRK3IU2GHWTRLO5T6VOLN\",\"conversationId\":\"01KTFZZXTFTNVTK86WEJ6DKTFT\",\"runtimeName\":\"local\"},\"isEphemeral\":false,\"events\":[{\"timestamp\":1780800822783,\"type\":\"operation.end\",\"data\":{\"key\":\"dxn:org.dxos.operation.assistantToolkit.updateTasks\",\"name\":\"Update tasks\",\"icon\":\"ph--check-square-offset--regular\",\"outcome\":\"success\"}}]},{\"meta\":{\"pid\":\"2433a0a1-7c09-46e6-bc6f-893f104d1691\",\"processName\":\"Agent\",\"space\":\"BIRSBKL52RS4PRK3IU2GHWTRLO5T6VOLN\",\"conversationId\":\"01KTFZZXTFTNVTK86WEJ6DKTFT\",\"runtimeName\":\"local\"},\"isEphemeral\":false,\"events\":[{\"timestamp\":1780800822829,\"type\":\"assistant.completeBlock\",\"data\":{\"messageId\":\"01KTG007HCMJQEHXMRSCQCQDNY\",\"role\":\"tool\",\"block\":{\"_tag\":\"toolResult\",\"toolCallId\":\"toolu_01T1XhBHArQ2UNHvdCEtWY1C\",\"name\":\"update-tasks\",\"result\":\"\\\"You must update the task status to 'in-progress' when you start and 'done' when complete.\\\\nCurrent plan updated:\\\\n<plan>\\\\n - **IN-PROGRESS**: Create a sub-agent that writes a haiku in a new document <!-- id=task_1 -->\\\\n</plan>\\\"\",\"providerExecuted\":false}}}]},{\"meta\":{\"pid\":\"211a43a3-f85b-4925-aae3-af92c46ac91b\",\"parentPid\":\"2433a0a1-7c09-46e6-bc6f-893f104d1691\",\"processName\":\"Get Agent Context (dxn:org.dxos.operation.assistantToolkit.getContext)\",\"space\":\"BIRSBKL52RS4PRK3IU2GHWTRLO5T6VOLN\",\"runtimeName\":\"local\"},\"isEphemeral\":false,\"events\":[{\"timestamp\":1780800823031,\"type\":\"operation.start\",\"data\":{\"key\":\"dxn:org.dxos.operation.assistantToolkit.getContext\",\"name\":\"Get Agent Context\",\"icon\":\"ph--info--regular\"}}]},{\"meta\":{\"pid\":\"211a43a3-f85b-4925-aae3-af92c46ac91b\",\"parentPid\":\"2433a0a1-7c09-46e6-bc6f-893f104d1691\",\"processName\":\"Get Agent Context (dxn:org.dxos.operation.assistantToolkit.getContext)\",\"space\":\"BIRSBKL52RS4PRK3IU2GHWTRLO5T6VOLN\",\"runtimeName\":\"local\"},\"isEphemeral\":false,\"events\":[{\"timestamp\":1780800823047,\"type\":\"operation.end\",\"data\":{\"key\":\"dxn:org.dxos.operation.assistantToolkit.getContext\",\"name\":\"Get Agent Context\",\"icon\":\"ph--info--regular\",\"outcome\":\"success\"}}]},{\"meta\":{\"pid\":\"2433a0a1-7c09-46e6-bc6f-893f104d1691\",\"processName\":\"Agent\",\"space\":\"BIRSBKL52RS4PRK3IU2GHWTRLO5T6VOLN\",\"conversationId\":\"01KTFZZXTFTNVTK86WEJ6DKTFT\",\"runtimeName\":\"local\"},\"isEphemeral\":false,\"events\":[{\"timestamp\":1780800825033,\"type\":\"assistant.completeBlock\",\"data\":{\"messageId\":\"01KTG009EK5A1PBQW38R1T8ABZ\",\"role\":\"assistant\",\"block\":{\"_tag\":\"toolCall\",\"toolCallId\":\"toolu_014hZLnJnQzNRkr9Xwx6gJ79\",\"name\":\"delegate-task\",\"input\":\"{\\\"title\\\": \\\"Create a haiku in a new document\\\"}\",\"providerExecuted\":false,\"operationKey\":\"dxn:org.dxos.operation.assistantToolkit.delegateTask\",\"operationName\":\"Delegate task\",\"operationIcon\":\"ph--share-network--regular\"}}}]},{\"meta\":{\"pid\":\"2433a0a1-7c09-46e6-bc6f-893f104d1691\",\"processName\":\"Agent\",\"space\":\"BIRSBKL52RS4PRK3IU2GHWTRLO5T6VOLN\",\"conversationId\":\"01KTFZZXTFTNVTK86WEJ6DKTFT\",\"runtimeName\":\"local\"},\"isEphemeral\":false,\"events\":[{\"timestamp\":1780800825087,\"type\":\"assistant.completeBlock\",\"data\":{\"messageId\":\"01KTG009QYZCDFTBGFSNCFXZ4C\",\"role\":\"assistant\",\"block\":{\"_tag\":\"stats\",\"model\":\"claude-sonnet-4-6\",\"duration\":1981,\"message\":\"OK\",\"toolCalls\":1,\"usage\":{\"inputTokens\":1,\"outputTokens\":60,\"totalTokens\":61}}}}]},{\"meta\":{\"pid\":\"cad71a95-5fbc-45cd-a834-bfc7e5085a3f\",\"parentPid\":\"2433a0a1-7c09-46e6-bc6f-893f104d1691\",\"processName\":\"Delegate task (dxn:org.dxos.operation.assistantToolkit.delegateTask)\",\"space\":\"BIRSBKL52RS4PRK3IU2GHWTRLO5T6VOLN\",\"conversationId\":\"01KTFZZXTFTNVTK86WEJ6DKTFT\",\"runtimeName\":\"local\"},\"isEphemeral\":false,\"events\":[{\"timestamp\":1780800825246,\"type\":\"operation.start\",\"data\":{\"key\":\"dxn:org.dxos.operation.assistantToolkit.delegateTask\",\"name\":\"Delegate task\",\"icon\":\"ph--share-network--regular\"}}]},{\"meta\":{\"pid\":\"cad71a95-5fbc-45cd-a834-bfc7e5085a3f\",\"parentPid\":\"2433a0a1-7c09-46e6-bc6f-893f104d1691\",\"processName\":\"Delegate task (dxn:org.dxos.operation.assistantToolkit.delegateTask)\",\"space\":\"BIRSBKL52RS4PRK3IU2GHWTRLO5T6VOLN\",\"conversationId\":\"01KTFZZXTFTNVTK86WEJ6DKTFT\",\"runtimeName\":\"local\"},\"isEphemeral\":false,\"events\":[{\"timestamp\":1780800825268,\"type\":\"operation.end\",\"data\":{\"key\":\"dxn:org.dxos.operation.assistantToolkit.delegateTask\",\"name\":\"Delegate task\",\"icon\":\"ph--share-network--regular\",\"outcome\":\"success\"}}]},{\"meta\":{\"pid\":\"2433a0a1-7c09-46e6-bc6f-893f104d1691\",\"processName\":\"Agent\",\"space\":\"BIRSBKL52RS4PRK3IU2GHWTRLO5T6VOLN\",\"conversationId\":\"01KTFZZXTFTNVTK86WEJ6DKTFT\",\"runtimeName\":\"local\"},\"isEphemeral\":false,\"events\":[{\"timestamp\":1780800825324,\"type\":\"assistant.completeBlock\",\"data\":{\"messageId\":\"01KTG009ZCDCCCF7ZPHE3SECXG\",\"role\":\"tool\",\"block\":{\"_tag\":\"toolResult\",\"toolCallId\":\"toolu_014hZLnJnQzNRkr9Xwx6gJ79\",\"name\":\"delegate-task\",\"result\":\"\\\"Delegated work as an in-progress task. Current plan:\\\\n<plan>\\\\n - **IN-PROGRESS**: Create a sub-agent that writes a haiku in a new document <!-- id=task_1 -->\\\\n - **IN-PROGRESS**: Create a haiku in a new document <!-- id=1-d4 -->\\\\n</plan>\\\"\",\"providerExecuted\":false}}}]},{\"meta\":{\"pid\":\"cf82b042-0703-4e57-b630-204f0e13deee\",\"parentPid\":\"2433a0a1-7c09-46e6-bc6f-893f104d1691\",\"processName\":\"Get Agent Context (dxn:org.dxos.operation.assistantToolkit.getContext)\",\"space\":\"BIRSBKL52RS4PRK3IU2GHWTRLO5T6VOLN\",\"runtimeName\":\"local\"},\"isEphemeral\":false,\"events\":[{\"timestamp\":1780800825537,\"type\":\"operation.start\",\"data\":{\"key\":\"dxn:org.dxos.operation.assistantToolkit.getContext\",\"name\":\"Get Agent Context\",\"icon\":\"ph--info--regular\"}}]},{\"meta\":{\"pid\":\"cf82b042-0703-4e57-b630-204f0e13deee\",\"parentPid\":\"2433a0a1-7c09-46e6-bc6f-893f104d1691\",\"processName\":\"Get Agent Context (dxn:org.dxos.operation.assistantToolkit.getContext)\",\"space\":\"BIRSBKL52RS4PRK3IU2GHWTRLO5T6VOLN\",\"runtimeName\":\"local\"},\"isEphemeral\":false,\"events\":[{\"timestamp\":1780800825552,\"type\":\"operation.end\",\"data\":{\"key\":\"dxn:org.dxos.operation.assistantToolkit.getContext\",\"name\":\"Get Agent Context\",\"icon\":\"ph--info--regular\",\"outcome\":\"success\"}}]},{\"meta\":{\"pid\":\"2433a0a1-7c09-46e6-bc6f-893f104d1691\",\"processName\":\"Agent\",\"space\":\"BIRSBKL52RS4PRK3IU2GHWTRLO5T6VOLN\",\"conversationId\":\"01KTFZZXTFTNVTK86WEJ6DKTFT\",\"runtimeName\":\"local\"},\"isEphemeral\":false,\"events\":[{\"timestamp\":1780800827693,\"type\":\"assistant.completeBlock\",\"data\":{\"messageId\":\"01KTG00B9HS4BWE7G8NPYGEG00\",\"role\":\"assistant\",\"block\":{\"_tag\":\"text\",\"text\":\"Done! I've created a sub-agent with the task of writing a haiku in a new document. The sub-agent is now in progress and will create the document with a haiku. Once it completes, the artifact will be available in the space.\"}}}]},{\"meta\":{\"pid\":\"2433a0a1-7c09-46e6-bc6f-893f104d1691\",\"processName\":\"Agent\",\"space\":\"BIRSBKL52RS4PRK3IU2GHWTRLO5T6VOLN\",\"conversationId\":\"01KTFZZXTFTNVTK86WEJ6DKTFT\",\"runtimeName\":\"local\"},\"isEphemeral\":false,\"events\":[{\"timestamp\":1780800827757,\"type\":\"assistant.completeBlock\",\"data\":{\"messageId\":\"01KTG00CBCTK0Y7068HEY1TJXJ\",\"role\":\"assistant\",\"block\":{\"_tag\":\"stats\",\"model\":\"claude-sonnet-4-6\",\"duration\":2135,\"message\":\"OK\",\"toolCalls\":0,\"usage\":{\"inputTokens\":1,\"outputTokens\":57,\"totalTokens\":58}}}}]},{\"meta\":{\"pid\":\"2433a0a1-7c09-46e6-bc6f-893f104d1691\",\"processName\":\"Agent\",\"space\":\"BIRSBKL52RS4PRK3IU2GHWTRLO5T6VOLN\",\"conversationId\":\"01KTFZZXTFTNVTK86WEJ6DKTFT\",\"runtimeName\":\"local\"},\"isEphemeral\":false,\"events\":[{\"timestamp\":1780800827765,\"type\":\"assistant.agentRequestEnd\",\"data\":{}}]},{\"meta\":{\"pid\":\"cf8f7243-5b1d-4902-b158-70d9107d5f43\",\"parentPid\":\"2433a0a1-7c09-46e6-bc6f-893f104d1691\",\"processName\":\"Run Routine (dxn:org.dxos.function.prompt)\",\"space\":\"BIRSBKL52RS4PRK3IU2GHWTRLO5T6VOLN\",\"runtimeName\":\"local\"},\"isEphemeral\":false,\"events\":[{\"timestamp\":1780800827912,\"type\":\"operation.start\",\"data\":{\"key\":\"dxn:org.dxos.function.prompt\",\"name\":\"Run Routine\",\"icon\":\"ph--brain--regular\"}}]},{\"meta\":{\"pid\":\"58e4ed1d-6cb2-475e-850a-d89be0c5c714\",\"processName\":\"Update Chat Name (dxn:org.dxos.operation.assistant.updateChatName)\",\"space\":\"BIRSBKL52RS4PRK3IU2GHWTRLO5T6VOLN\",\"runtimeName\":\"local\"},\"isEphemeral\":false,\"events\":[{\"timestamp\":1780800828033,\"type\":\"operation.start\",\"data\":{\"key\":\"dxn:org.dxos.operation.assistant.updateChatName\",\"name\":\"Update Chat Name\",\"icon\":\"ph--pencil--regular\"}}]},{\"meta\":{\"pid\":\"b070e30f-bafe-4118-94da-83681c24d49d\",\"parentPid\":\"cf8f7243-5b1d-4902-b158-70d9107d5f43\",\"processName\":\"Get Agent Context (dxn:org.dxos.operation.assistantToolkit.getContext)\",\"space\":\"BIRSBKL52RS4PRK3IU2GHWTRLO5T6VOLN\",\"runtimeName\":\"local\"},\"isEphemeral\":false,\"events\":[{\"timestamp\":1780800828277,\"type\":\"operation.start\",\"data\":{\"key\":\"dxn:org.dxos.operation.assistantToolkit.getContext\",\"name\":\"Get Agent Context\",\"icon\":\"ph--info--regular\"}}]},{\"meta\":{\"pid\":\"b070e30f-bafe-4118-94da-83681c24d49d\",\"parentPid\":\"cf8f7243-5b1d-4902-b158-70d9107d5f43\",\"processName\":\"Get Agent Context (dxn:org.dxos.operation.assistantToolkit.getContext)\",\"space\":\"BIRSBKL52RS4PRK3IU2GHWTRLO5T6VOLN\",\"runtimeName\":\"local\"},\"isEphemeral\":false,\"events\":[{\"timestamp\":1780800828278,\"type\":\"operation.end\",\"data\":{\"key\":\"dxn:org.dxos.operation.assistantToolkit.getContext\",\"name\":\"Get Agent Context\",\"icon\":\"ph--info--regular\",\"outcome\":\"success\"}}]},{\"meta\":{\"pid\":\"cf8f7243-5b1d-4902-b158-70d9107d5f43\",\"parentPid\":\"2433a0a1-7c09-46e6-bc6f-893f104d1691\",\"processName\":\"Run Routine (dxn:org.dxos.function.prompt)\",\"space\":\"BIRSBKL52RS4PRK3IU2GHWTRLO5T6VOLN\",\"runtimeName\":\"local\"},\"isEphemeral\":false,\"events\":[{\"timestamp\":1780800828323,\"type\":\"assistant.completeBlock\",\"data\":{\"messageId\":\"01KTG00CX281TNXBSMXVWGJFER\",\"role\":\"user\",\"block\":{\"_tag\":\"text\",\"text\":\"Complete the following task and report the result concisely.\\n\\nIf you create any documents or artifacts, call completeJob with a JSON object of the\\nform { \\\"summary\\\": string, \\\"artifactIds\\\": string[] }, where artifactIds are the exact\\nids returned by the tools that created them. Otherwise return a short summary string.\\n\\nTask: Create a haiku in a new document\\n<input>{}</input>\"}}}]},{\"meta\":{\"pid\":\"c2b79fcc-a455-4546-b306-fe175a2b646a\",\"parentPid\":\"cf8f7243-5b1d-4902-b158-70d9107d5f43\",\"processName\":\"Get Agent Context (dxn:org.dxos.operation.assistantToolkit.getContext)\",\"space\":\"BIRSBKL52RS4PRK3IU2GHWTRLO5T6VOLN\",\"runtimeName\":\"local\"},\"isEphemeral\":false,\"events\":[{\"timestamp\":1780800828453,\"type\":\"operation.start\",\"data\":{\"key\":\"dxn:org.dxos.operation.assistantToolkit.getContext\",\"name\":\"Get Agent Context\",\"icon\":\"ph--info--regular\"}}]},{\"meta\":{\"pid\":\"c2b79fcc-a455-4546-b306-fe175a2b646a\",\"parentPid\":\"cf8f7243-5b1d-4902-b158-70d9107d5f43\",\"processName\":\"Get Agent Context (dxn:org.dxos.operation.assistantToolkit.getContext)\",\"space\":\"BIRSBKL52RS4PRK3IU2GHWTRLO5T6VOLN\",\"runtimeName\":\"local\"},\"isEphemeral\":false,\"events\":[{\"timestamp\":1780800828455,\"type\":\"operation.end\",\"data\":{\"key\":\"dxn:org.dxos.operation.assistantToolkit.getContext\",\"name\":\"Get Agent Context\",\"icon\":\"ph--info--regular\",\"outcome\":\"success\"}}]},{\"meta\":{\"pid\":\"58e4ed1d-6cb2-475e-850a-d89be0c5c714\",\"processName\":\"Update Chat Name (dxn:org.dxos.operation.assistant.updateChatName)\",\"space\":\"BIRSBKL52RS4PRK3IU2GHWTRLO5T6VOLN\",\"runtimeName\":\"local\"},\"isEphemeral\":false,\"events\":[{\"timestamp\":1780800828735,\"type\":\"operation.end\",\"data\":{\"key\":\"dxn:org.dxos.operation.assistant.updateChatName\",\"name\":\"Update Chat Name\",\"icon\":\"ph--pencil--regular\",\"outcome\":\"success\"}}]},{\"meta\":{\"pid\":\"cf8f7243-5b1d-4902-b158-70d9107d5f43\",\"parentPid\":\"2433a0a1-7c09-46e6-bc6f-893f104d1691\",\"processName\":\"Run Routine (dxn:org.dxos.function.prompt)\",\"space\":\"BIRSBKL52RS4PRK3IU2GHWTRLO5T6VOLN\",\"runtimeName\":\"local\"},\"isEphemeral\":false,\"events\":[{\"timestamp\":1780800830265,\"type\":\"assistant.completeBlock\",\"data\":{\"messageId\":\"01KTG00EK399C8GJJ8VA656YCB\",\"role\":\"assistant\",\"block\":{\"_tag\":\"reasoning\",\"reasoningText\":\"The user wants me to create a haiku in a new document.\"}}}]},{\"meta\":{\"pid\":\"cf8f7243-5b1d-4902-b158-70d9107d5f43\",\"parentPid\":\"2433a0a1-7c09-46e6-bc6f-893f104d1691\",\"processName\":\"Run Routine (dxn:org.dxos.function.prompt)\",\"space\":\"BIRSBKL52RS4PRK3IU2GHWTRLO5T6VOLN\",\"runtimeName\":\"local\"},\"isEphemeral\":false,\"events\":[{\"timestamp\":1780800831962,\"type\":\"assistant.completeBlock\",\"data\":{\"messageId\":\"01KTG00EW0KX1Z76MNJBD0958W\",\"role\":\"assistant\",\"block\":{\"_tag\":\"toolCall\",\"toolCallId\":\"toolu_0178cbySPezLkhabBTSDtzCL\",\"name\":\"create\",\"input\":\"{\\\"name\\\": \\\"Haiku\\\", \\\"content\\\": \\\"# Haiku\\\\n\\\\nAutumn leaves descend,\\\\nWhispering through quiet woods—\\\\nEarth breathes in their fall.\\\"}\",\"providerExecuted\":false,\"operationKey\":\"dxn:org.dxos.operation.markdown.create\",\"operationName\":\"Create\",\"operationIcon\":\"ph--file-text--regular\"}}}]},{\"meta\":{\"pid\":\"cf8f7243-5b1d-4902-b158-70d9107d5f43\",\"parentPid\":\"2433a0a1-7c09-46e6-bc6f-893f104d1691\",\"processName\":\"Run Routine (dxn:org.dxos.function.prompt)\",\"space\":\"BIRSBKL52RS4PRK3IU2GHWTRLO5T6VOLN\",\"runtimeName\":\"local\"},\"isEphemeral\":false,\"events\":[{\"timestamp\":1780800832083,\"type\":\"assistant.completeBlock\",\"data\":{\"messageId\":\"01KTG00GJK5KB5BQT6C5H9HE6J\",\"role\":\"assistant\",\"block\":{\"_tag\":\"stats\",\"model\":\"claude-opus-4-6\",\"duration\":3587,\"message\":\"OK\",\"toolCalls\":1,\"usage\":{\"inputTokens\":3,\"outputTokens\":126,\"totalTokens\":129}}}}]},{\"meta\":{\"pid\":\"dd1b51d9-f2f7-4144-945b-7ccd96978964\",\"parentPid\":\"cf8f7243-5b1d-4902-b158-70d9107d5f43\",\"processName\":\"Create (dxn:org.dxos.operation.markdown.create)\",\"space\":\"BIRSBKL52RS4PRK3IU2GHWTRLO5T6VOLN\",\"runtimeName\":\"local\"},\"isEphemeral\":false,\"events\":[{\"timestamp\":1780800832091,\"type\":\"operation.start\",\"data\":{\"key\":\"dxn:org.dxos.operation.markdown.create\",\"name\":\"Create\",\"icon\":\"ph--file-text--regular\"}}]},{\"meta\":{\"pid\":\"dd1b51d9-f2f7-4144-945b-7ccd96978964\",\"parentPid\":\"cf8f7243-5b1d-4902-b158-70d9107d5f43\",\"processName\":\"Create (dxn:org.dxos.operation.markdown.create)\",\"space\":\"BIRSBKL52RS4PRK3IU2GHWTRLO5T6VOLN\",\"runtimeName\":\"local\"},\"isEphemeral\":false,\"events\":[{\"timestamp\":1780800832174,\"type\":\"operation.end\",\"data\":{\"key\":\"dxn:org.dxos.operation.markdown.create\",\"name\":\"Create\",\"icon\":\"ph--file-text--regular\",\"outcome\":\"success\"}}]},{\"meta\":{\"pid\":\"cf8f7243-5b1d-4902-b158-70d9107d5f43\",\"parentPid\":\"2433a0a1-7c09-46e6-bc6f-893f104d1691\",\"processName\":\"Run Routine (dxn:org.dxos.function.prompt)\",\"space\":\"BIRSBKL52RS4PRK3IU2GHWTRLO5T6VOLN\",\"runtimeName\":\"local\"},\"isEphemeral\":false,\"events\":[{\"timestamp\":1780800832177,\"type\":\"assistant.completeBlock\",\"data\":{\"messageId\":\"01KTG00GNGWSK4HBSS3G6GHN3Z\",\"role\":\"tool\",\"block\":{\"_tag\":\"toolResult\",\"toolCallId\":\"toolu_0178cbySPezLkhabBTSDtzCL\",\"name\":\"create\",\"result\":\"{\\\"id\\\":\\\"echo://BIRSBKL52RS4PRK3IU2GHWTRLO5T6VOLN/01KTG00GJWSZ4SQSXABYFWGDVV\\\"}\",\"providerExecuted\":false}}}]},{\"meta\":{\"pid\":\"01175964-6ffa-4785-84cb-649cbb80edd5\",\"parentPid\":\"cf8f7243-5b1d-4902-b158-70d9107d5f43\",\"processName\":\"Get Agent Context (dxn:org.dxos.operation.assistantToolkit.getContext)\",\"space\":\"BIRSBKL52RS4PRK3IU2GHWTRLO5T6VOLN\",\"runtimeName\":\"local\"},\"isEphemeral\":false,\"events\":[{\"timestamp\":1780800832318,\"type\":\"operation.start\",\"data\":{\"key\":\"dxn:org.dxos.operation.assistantToolkit.getContext\",\"name\":\"Get Agent Context\",\"icon\":\"ph--info--regular\"}}]},{\"meta\":{\"pid\":\"01175964-6ffa-4785-84cb-649cbb80edd5\",\"parentPid\":\"cf8f7243-5b1d-4902-b158-70d9107d5f43\",\"processName\":\"Get Agent Context (dxn:org.dxos.operation.assistantToolkit.getContext)\",\"space\":\"BIRSBKL52RS4PRK3IU2GHWTRLO5T6VOLN\",\"runtimeName\":\"local\"},\"isEphemeral\":false,\"events\":[{\"timestamp\":1780800832319,\"type\":\"operation.end\",\"data\":{\"key\":\"dxn:org.dxos.operation.assistantToolkit.getContext\",\"name\":\"Get Agent Context\",\"icon\":\"ph--info--regular\",\"outcome\":\"success\"}}]},{\"meta\":{\"pid\":\"cf8f7243-5b1d-4902-b158-70d9107d5f43\",\"parentPid\":\"2433a0a1-7c09-46e6-bc6f-893f104d1691\",\"processName\":\"Run Routine (dxn:org.dxos.function.prompt)\",\"space\":\"BIRSBKL52RS4PRK3IU2GHWTRLO5T6VOLN\",\"runtimeName\":\"local\"},\"isEphemeral\":false,\"events\":[{\"timestamp\":1780800834244,\"type\":\"assistant.completeBlock\",\"data\":{\"messageId\":\"01KTG00J47C4BSC65F86Z1DY9C\",\"role\":\"assistant\",\"block\":{\"_tag\":\"toolCall\",\"toolCallId\":\"toolu_019cwi3tVMMseebHThRSJkRA\",\"name\":\"add-artifact\",\"input\":\"{\\\"name\\\": \\\"Haiku\\\", \\\"artifact\\\": \\\"echo://BIRSBKL52RS4PRK3IU2GHWTRLO5T6VOLN/01KTG00GJWSZ4SQSXABYFWGDVV\\\"}\",\"providerExecuted\":false,\"operationKey\":\"dxn:org.dxos.function.agent.addArtifact\",\"operationName\":\"Add artifact\",\"operationIcon\":\"ph--plus--regular\"}}}]},{\"meta\":{\"pid\":\"cf8f7243-5b1d-4902-b158-70d9107d5f43\",\"parentPid\":\"2433a0a1-7c09-46e6-bc6f-893f104d1691\",\"processName\":\"Run Routine (dxn:org.dxos.function.prompt)\",\"space\":\"BIRSBKL52RS4PRK3IU2GHWTRLO5T6VOLN\",\"runtimeName\":\"local\"},\"isEphemeral\":false,\"events\":[{\"timestamp\":1780800834342,\"type\":\"assistant.completeBlock\",\"data\":{\"messageId\":\"01KTG00JS52RCKXSCQNEGYW6ZS\",\"role\":\"assistant\",\"block\":{\"_tag\":\"stats\",\"model\":\"claude-opus-4-6\",\"duration\":1991,\"message\":\"OK\",\"toolCalls\":1,\"usage\":{\"inputTokens\":1,\"outputTokens\":121,\"totalTokens\":122}}}}]},{\"meta\":{\"pid\":\"2f805c44-2f1e-4fff-9f1d-5864bc176d56\",\"parentPid\":\"cf8f7243-5b1d-4902-b158-70d9107d5f43\",\"processName\":\"Add artifact (dxn:org.dxos.function.agent.addArtifact)\",\"space\":\"BIRSBKL52RS4PRK3IU2GHWTRLO5T6VOLN\",\"runtimeName\":\"local\"},\"isEphemeral\":false,\"events\":[{\"timestamp\":1780800834363,\"type\":\"operation.start\",\"data\":{\"key\":\"dxn:org.dxos.function.agent.addArtifact\",\"name\":\"Add artifact\",\"icon\":\"ph--plus--regular\"}}]},{\"meta\":{\"pid\":\"2f805c44-2f1e-4fff-9f1d-5864bc176d56\",\"parentPid\":\"cf8f7243-5b1d-4902-b158-70d9107d5f43\",\"processName\":\"Add artifact (dxn:org.dxos.function.agent.addArtifact)\",\"space\":\"BIRSBKL52RS4PRK3IU2GHWTRLO5T6VOLN\",\"runtimeName\":\"local\"},\"isEphemeral\":false,\"events\":[{\"timestamp\":1780800834365,\"type\":\"operation.end\",\"data\":{\"key\":\"dxn:org.dxos.function.agent.addArtifact\",\"name\":\"Add artifact\",\"icon\":\"ph--plus--regular\",\"outcome\":\"failure\",\"error\":\"There should be exactly one agent in context. Got: 0\"}}]},{\"meta\":{\"pid\":\"cf8f7243-5b1d-4902-b158-70d9107d5f43\",\"parentPid\":\"2433a0a1-7c09-46e6-bc6f-893f104d1691\",\"processName\":\"Run Routine (dxn:org.dxos.function.prompt)\",\"space\":\"BIRSBKL52RS4PRK3IU2GHWTRLO5T6VOLN\",\"runtimeName\":\"local\"},\"isEphemeral\":false,\"events\":[{\"timestamp\":1780800834370,\"type\":\"assistant.completeBlock\",\"data\":{\"messageId\":\"01KTG00JT1JGBNR4C0TW653WVV\",\"role\":\"tool\",\"block\":{\"_tag\":\"toolResult\",\"toolCallId\":\"toolu_019cwi3tVMMseebHThRSJkRA\",\"name\":\"add-artifact\",\"error\":\"Error: There should be exactly one agent in context. Got: 0\",\"providerExecuted\":false}}}]},{\"meta\":{\"pid\":\"901f7e36-b0be-4e9e-99df-389261ff3722\",\"parentPid\":\"cf8f7243-5b1d-4902-b158-70d9107d5f43\",\"processName\":\"Get Agent Context (dxn:org.dxos.operation.assistantToolkit.getContext)\",\"space\":\"BIRSBKL52RS4PRK3IU2GHWTRLO5T6VOLN\",\"runtimeName\":\"local\"},\"isEphemeral\":false,\"events\":[{\"timestamp\":1780800834486,\"type\":\"operation.start\",\"data\":{\"key\":\"dxn:org.dxos.operation.assistantToolkit.getContext\",\"name\":\"Get Agent Context\",\"icon\":\"ph--info--regular\"}}]},{\"meta\":{\"pid\":\"901f7e36-b0be-4e9e-99df-389261ff3722\",\"parentPid\":\"cf8f7243-5b1d-4902-b158-70d9107d5f43\",\"processName\":\"Get Agent Context (dxn:org.dxos.operation.assistantToolkit.getContext)\",\"space\":\"BIRSBKL52RS4PRK3IU2GHWTRLO5T6VOLN\",\"runtimeName\":\"local\"},\"isEphemeral\":false,\"events\":[{\"timestamp\":1780800834487,\"type\":\"operation.end\",\"data\":{\"key\":\"dxn:org.dxos.operation.assistantToolkit.getContext\",\"name\":\"Get Agent Context\",\"icon\":\"ph--info--regular\",\"outcome\":\"success\"}}]},{\"meta\":{\"pid\":\"cf8f7243-5b1d-4902-b158-70d9107d5f43\",\"parentPid\":\"2433a0a1-7c09-46e6-bc6f-893f104d1691\",\"processName\":\"Run Routine (dxn:org.dxos.function.prompt)\",\"space\":\"BIRSBKL52RS4PRK3IU2GHWTRLO5T6VOLN\",\"runtimeName\":\"local\"},\"isEphemeral\":false,\"events\":[{\"timestamp\":1780800837620,\"type\":\"assistant.completeBlock\",\"data\":{\"messageId\":\"01KTG00MSMF112Q6HS7TM5YRWZ\",\"role\":\"assistant\",\"block\":{\"_tag\":\"toolCall\",\"toolCallId\":\"toolu_01C5PdSKAg51X4odG3F3Nzf6\",\"name\":\"completeJob\",\"input\":\"{\\\"success\\\": {\\\"summary\\\":\\\"Created a new document titled 'Haiku' containing an autumn-themed haiku: \\\\\\\"Autumn leaves descend, / Whispering through quiet woods— / Earth breathes in their fall.\\\\\\\"\\\",\\\"artifactIds\\\":[\\\"echo://BIRSBKL52RS4PRK3IU2GHWTRLO5T6VOLN/01KTG00GJWSZ4SQSXABYFWGDVV\\\"]}}\",\"providerExecuted\":false}}}]},{\"meta\":{\"pid\":\"cf8f7243-5b1d-4902-b158-70d9107d5f43\",\"parentPid\":\"2433a0a1-7c09-46e6-bc6f-893f104d1691\",\"processName\":\"Run Routine (dxn:org.dxos.function.prompt)\",\"space\":\"BIRSBKL52RS4PRK3IU2GHWTRLO5T6VOLN\",\"runtimeName\":\"local\"},\"isEphemeral\":false,\"events\":[{\"timestamp\":1780800837627,\"type\":\"assistant.completeBlock\",\"data\":{\"messageId\":\"01KTG00NZTEE9V745YZTH9RJVS\",\"role\":\"assistant\",\"block\":{\"_tag\":\"stats\",\"model\":\"claude-opus-4-6\",\"duration\":3095,\"message\":\"OK\",\"toolCalls\":1,\"usage\":{\"inputTokens\":1,\"outputTokens\":158,\"totalTokens\":159}}}}]},{\"meta\":{\"pid\":\"cf8f7243-5b1d-4902-b158-70d9107d5f43\",\"parentPid\":\"2433a0a1-7c09-46e6-bc6f-893f104d1691\",\"processName\":\"Run Routine (dxn:org.dxos.function.prompt)\",\"space\":\"BIRSBKL52RS4PRK3IU2GHWTRLO5T6VOLN\",\"runtimeName\":\"local\"},\"isEphemeral\":false,\"events\":[{\"timestamp\":1780800837636,\"type\":\"assistant.completeBlock\",\"data\":{\"messageId\":\"01KTG00P04B6FP1T09Y1XN487Q\",\"role\":\"tool\",\"block\":{\"_tag\":\"toolResult\",\"toolCallId\":\"toolu_01C5PdSKAg51X4odG3F3Nzf6\",\"name\":\"completeJob\",\"providerExecuted\":false}}}]},{\"meta\":{\"pid\":\"639e78ff-d0b1-4d00-8e52-7fc43d245c9f\",\"parentPid\":\"cf8f7243-5b1d-4902-b158-70d9107d5f43\",\"processName\":\"Get Agent Context (dxn:org.dxos.operation.assistantToolkit.getContext)\",\"space\":\"BIRSBKL52RS4PRK3IU2GHWTRLO5T6VOLN\",\"runtimeName\":\"local\"},\"isEphemeral\":false,\"events\":[{\"timestamp\":1780800837746,\"type\":\"operation.start\",\"data\":{\"key\":\"dxn:org.dxos.operation.assistantToolkit.getContext\",\"name\":\"Get Agent Context\",\"icon\":\"ph--info--regular\"}}]},{\"meta\":{\"pid\":\"639e78ff-d0b1-4d00-8e52-7fc43d245c9f\",\"parentPid\":\"cf8f7243-5b1d-4902-b158-70d9107d5f43\",\"processName\":\"Get Agent Context (dxn:org.dxos.operation.assistantToolkit.getContext)\",\"space\":\"BIRSBKL52RS4PRK3IU2GHWTRLO5T6VOLN\",\"runtimeName\":\"local\"},\"isEphemeral\":false,\"events\":[{\"timestamp\":1780800837747,\"type\":\"operation.end\",\"data\":{\"key\":\"dxn:org.dxos.operation.assistantToolkit.getContext\",\"name\":\"Get Agent Context\",\"icon\":\"ph--info--regular\",\"outcome\":\"success\"}}]},{\"meta\":{\"pid\":\"cf8f7243-5b1d-4902-b158-70d9107d5f43\",\"parentPid\":\"2433a0a1-7c09-46e6-bc6f-893f104d1691\",\"processName\":\"Run Routine (dxn:org.dxos.function.prompt)\",\"space\":\"BIRSBKL52RS4PRK3IU2GHWTRLO5T6VOLN\",\"runtimeName\":\"local\"},\"isEphemeral\":false,\"events\":[{\"timestamp\":1780800838834,\"type\":\"assistant.completeBlock\",\"data\":{\"messageId\":\"01KTG00Q5HN24VN54SRMH1GPT6\",\"role\":\"assistant\",\"block\":{\"_tag\":\"stats\",\"model\":\"claude-opus-4-6\",\"duration\":1052,\"message\":\"OK\",\"toolCalls\":0,\"usage\":{\"inputTokens\":1,\"outputTokens\":2,\"totalTokens\":3}}}}]},{\"meta\":{\"pid\":\"cf8f7243-5b1d-4902-b158-70d9107d5f43\",\"parentPid\":\"2433a0a1-7c09-46e6-bc6f-893f104d1691\",\"processName\":\"Run Routine (dxn:org.dxos.function.prompt)\",\"space\":\"BIRSBKL52RS4PRK3IU2GHWTRLO5T6VOLN\",\"runtimeName\":\"local\"},\"isEphemeral\":false,\"events\":[{\"timestamp\":1780800838870,\"type\":\"operation.end\",\"data\":{\"key\":\"dxn:org.dxos.function.prompt\",\"name\":\"Run Routine\",\"icon\":\"ph--brain--regular\",\"outcome\":\"success\"}}]}]");
335
+ //#endregion
336
+ export { PLAYBACK_INTERVAL_MS, STEP_STORAGE_KEY, SimulatedAgent, SimulatedOperation, agentScenarios, makeProcess, runScenario, sub_agent_delegation_default as subAgentDelegationFixture, useLocalStorageNumber };
337
+
338
+ //# sourceMappingURL=testing.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"testing.mjs","names":[],"sources":["../../src/testing/simulated-agent.ts","../../src/testing/snapshot-playback.ts","../../src/testing/test-trace.ts","../../src/execution-graph/testing/sub-agent-delegation.json"],"sourcesContent":["//\n// Copyright 2026 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\nimport * as Schema from 'effect/Schema';\n\nimport { type ProcessManager } from '@dxos/compute-runtime';\nimport * as Process from '@dxos/compute/Process';\nimport * as Trace from '@dxos/compute/Trace';\nimport { EntityId } from '@dxos/keys';\n\n/**\n * One simulated operation. Rendered as a child process in the tree and as an `operation.start`/\n * `operation.end` span on the timeline.\n */\nexport interface SimulatedTool {\n readonly key: string;\n readonly name: string;\n readonly icon?: string;\n readonly durationMs: number;\n /** Nested operations, spawned under this one so the tree exercises more than one level. */\n readonly children?: readonly SimulatedTool[];\n /** Run `children` concurrently, producing parallel lanes on the timeline. */\n readonly concurrent?: boolean;\n /** End with `outcome: 'failure'` and fail the process. */\n readonly fail?: boolean;\n}\n\nexport interface AgentScenario {\n readonly name: string;\n readonly prompt: string;\n readonly tools: readonly SimulatedTool[];\n}\n\nexport const agentScenarios: readonly AgentScenario[] = [\n {\n name: 'Create organization',\n prompt: 'Create an organization called \"Cyberdyne Systems\"',\n tools: [\n { key: 'list-schemas', name: 'List Schemas', icon: 'ph--list--regular', durationMs: 800 },\n {\n key: 'create-object',\n name: 'Create Object',\n icon: 'ph--plus-circle--regular',\n durationMs: 1_600,\n children: [{ key: 'validate', name: 'Validate', icon: 'ph--check--regular', durationMs: 600 }],\n },\n ],\n },\n {\n name: 'Research',\n prompt: 'Search for all organizations and persons',\n tools: [\n { key: 'list-schemas', name: 'List Schemas', icon: 'ph--list--regular', durationMs: 700 },\n {\n key: 'delegate',\n name: 'Delegate Research',\n icon: 'ph--users-three--regular',\n durationMs: 2_400,\n concurrent: true,\n children: [\n { key: 'query', name: 'Query Organizations', icon: 'ph--magnifying-glass--regular', durationMs: 1_800 },\n { key: 'query', name: 'Query Persons', icon: 'ph--magnifying-glass--regular', durationMs: 1_200 },\n ],\n },\n { key: 'summarize', name: 'Summarize', icon: 'ph--article--regular', durationMs: 900 },\n ],\n },\n {\n name: 'Failing run',\n prompt: 'Create a person named \"John Connor\"',\n tools: [\n { key: 'list-schemas', name: 'List Schemas', icon: 'ph--list--regular', durationMs: 600 },\n { key: 'create-object', name: 'Create Object', icon: 'ph--plus-circle--regular', durationMs: 1_200, fail: true },\n ],\n },\n];\n\nconst delay = (ms: number) => Effect.promise(() => new Promise<void>((resolve) => setTimeout(resolve, ms)));\n\n/**\n * Write a trace event and yield to the event loop so FeedTraceSink flushes it to ECHO before continuing.\n */\nconst writeAndFlush = <T>(eventType: Trace.EventType<T>, payload: T) =>\n Effect.gen(function* () {\n yield* Trace.write(eventType, payload);\n yield* delay(100);\n });\n\n//\n// Agent.\n//\n\nconst AgentStep = Schema.Union([\n Schema.Struct({ _tag: Schema.Literal('begin'), prompt: Schema.String }),\n Schema.Struct({ _tag: Schema.Literal('toolCall'), toolCallId: Schema.String, name: Schema.String }),\n Schema.Struct({ _tag: Schema.Literal('toolResult'), toolCallId: Schema.String, name: Schema.String }),\n Schema.Struct({ _tag: Schema.Literal('end'), status: Schema.Literals(['success', 'error']) }),\n]);\n\ntype AgentStep = Schema.Schema.Type<typeof AgentStep>;\n\n/**\n * Storybook fixture: a {@link Process} standing in for a conversational agent. Each input advances\n * it one step, so the caller can interleave the agent's own trace events with the child operation\n * processes that {@link runScenario} spawns beneath it.\n */\nexport const SimulatedAgent = Process.make(\n {\n key: 'org.dxos.testing.process.agent',\n input: AgentStep,\n output: Schema.Void,\n services: [Trace.TraceService],\n },\n (ctx) =>\n Effect.gen(function* () {\n // One message id spans the whole turn, so every block groups under a single message.\n const messageId = EntityId.random();\n\n return {\n onInput: (step: AgentStep) =>\n Effect.gen(function* () {\n switch (step._tag) {\n case 'begin': {\n yield* writeAndFlush(Trace.AgentRequestBegin, {});\n yield* writeAndFlush(Trace.CompleteBlock, {\n messageId,\n role: 'user',\n block: { _tag: 'text', text: step.prompt },\n });\n break;\n }\n\n case 'toolCall': {\n yield* writeAndFlush(Trace.CompleteBlock, {\n messageId,\n role: 'assistant',\n block: {\n _tag: 'toolCall',\n toolCallId: step.toolCallId,\n name: step.name,\n input: '{}',\n providerExecuted: false,\n },\n });\n break;\n }\n\n case 'toolResult': {\n yield* writeAndFlush(Trace.CompleteBlock, {\n messageId,\n role: 'assistant',\n block: {\n _tag: 'toolResult',\n toolCallId: step.toolCallId,\n name: step.name,\n providerExecuted: false,\n },\n });\n break;\n }\n\n case 'end': {\n yield* writeAndFlush(Trace.AgentRequestEnd, { status: step.status });\n if (step.status === 'error') {\n ctx.fail(new Error('Simulated agent failure'));\n } else {\n ctx.succeed();\n }\n break;\n }\n }\n }).pipe(Effect.orDie),\n onAlarm: () => Effect.void,\n onChildEvent: () => Effect.void,\n };\n }),\n);\n\n//\n// Operation.\n//\n\nconst OperationInput = Schema.Struct({\n key: Schema.String,\n name: Schema.String,\n icon: Schema.optional(Schema.String),\n durationMs: Schema.Number,\n fail: Schema.optional(Schema.Boolean),\n});\n\ntype OperationInput = Schema.Schema.Type<typeof OperationInput>;\n\n/**\n * Storybook fixture: a {@link Process} that emits the `operation.start`/`operation.end` pair a real\n * operation process emits, with a simulated execution time in between.\n */\nexport const SimulatedOperation = Process.make(\n {\n key: 'org.dxos.testing.process.operation',\n input: OperationInput,\n output: Schema.Void,\n services: [Trace.TraceService],\n },\n (ctx) =>\n Effect.succeed({\n onInput: ({ key, name, icon, durationMs, fail }: OperationInput) =>\n Effect.gen(function* () {\n yield* writeAndFlush(Trace.OperationStart, { key, name, icon });\n yield* delay(durationMs);\n yield* writeAndFlush(Trace.OperationEnd, {\n key,\n name,\n icon,\n outcome: fail ? 'failure' : 'success',\n error: fail ? `Simulated failure in '${name}'` : undefined,\n });\n\n if (fail) {\n ctx.fail(new Error(`Simulated failure in '${name}'`));\n } else {\n ctx.succeed();\n }\n }).pipe(Effect.orDie),\n onAlarm: () => Effect.void,\n onChildEvent: () => Effect.void,\n }),\n);\n\n//\n// Orchestration.\n//\n\n/**\n * Spawns one simulated operation (and its children) beneath `parentProcessId`.\n * A process cannot spawn its own children, so the tree is assembled from the caller's side.\n */\nconst runTool = (\n manager: ProcessManager.Manager,\n tool: SimulatedTool,\n parentProcessId: Process.ID,\n environment: Process.Environment,\n): Effect.Effect<void> =>\n Effect.gen(function* () {\n const handle = yield* manager.spawn(SimulatedOperation, { parentProcessId, name: tool.name, environment });\n yield* handle.submitInput({\n key: tool.key,\n name: tool.name,\n icon: tool.icon,\n durationMs: tool.durationMs,\n fail: tool.fail,\n });\n\n const children = tool.children ?? [];\n if (children.length > 0) {\n const effects = children.map((child) => runTool(manager, child, handle.pid, environment));\n yield* tool.concurrent ? Effect.all(effects, { concurrency: 'unbounded' }) : Effect.all(effects);\n }\n\n // A failing operation surfaces as a defect, which `Effect.ignore` would not catch; the scenario\n // only needs the trace it wrote, and carries on to close out the agent.\n yield* Effect.exit(handle.runToCompletion());\n }).pipe(Effect.orDie);\n\n/**\n * Runs one {@link agentScenarios} entry end to end: an agent process with a child operation process\n * per tool, so the panel has both a populated process tree and a timeline with nested spans.\n */\nexport const runScenario = (\n manager: ProcessManager.Manager,\n index: number,\n environment: Process.Environment,\n): Effect.Effect<void> =>\n Effect.gen(function* () {\n const scenario = agentScenarios[index % agentScenarios.length];\n const agent = yield* manager.spawn(SimulatedAgent, { name: `Agent (${scenario.name})`, environment });\n yield* agent.submitInput({ _tag: 'begin', prompt: scenario.prompt });\n\n let failed = false;\n for (const tool of scenario.tools) {\n const toolCallId = EntityId.random();\n yield* agent.submitInput({ _tag: 'toolCall', toolCallId, name: tool.key });\n yield* runTool(manager, tool, agent.pid, environment);\n if (tool.fail) {\n failed = true;\n break;\n }\n yield* agent.submitInput({ _tag: 'toolResult', toolCallId, name: tool.key });\n }\n\n yield* agent.submitInput({ _tag: 'end', status: failed ? 'error' : 'success' });\n }).pipe(Effect.orDie);\n","//\n// Copyright 2026 DXOS.org\n//\n\nimport { type Dispatch, type SetStateAction, useEffect, useRef, useState } from 'react';\n\n/**\n * Interval (ms) between auto-played trace messages in the snapshot playback story.\n */\nexport const PLAYBACK_INTERVAL_MS = 250;\n\nexport const STEP_STORAGE_KEY = 'plugin-assistant.trace-panel.snapshot.step';\n\n/**\n * `useState<number>` that hydrates from and persists to `localStorage`.\n * The third tuple member is `true` iff a valid value was loaded on first render.\n */\nexport const useLocalStorageNumber = (\n key: string,\n initial: number,\n): [number, Dispatch<SetStateAction<number>>, boolean] => {\n const initRef = useRef<{ value: number; hydrated: boolean } | null>(null);\n if (initRef.current === null) {\n let value = initial;\n let hydrated = false;\n if (typeof window !== 'undefined') {\n const stored = window.localStorage.getItem(key);\n const parsed = stored === null ? Number.NaN : Number(stored);\n if (Number.isInteger(parsed) && parsed >= 0) {\n value = parsed;\n hydrated = true;\n }\n }\n initRef.current = { value, hydrated };\n }\n\n const [value, setValue] = useState(initRef.current.value);\n useEffect(() => {\n if (typeof window !== 'undefined') {\n window.localStorage.setItem(key, String(value));\n }\n }, [key, value]);\n\n return [value, setValue, initRef.current.hydrated];\n};\n","//\n// Copyright 2026 DXOS.org\n//\n\nimport * as Option from 'effect/Option';\n\nimport * as Process from '@dxos/compute/Process';\nimport { Annotation } from '@dxos/echo';\n\nexport const makeProcess = (\n overrides: Partial<Process.Info> & Pick<Process.Info, 'pid' | 'state'> & { name: string },\n): Process.Info => ({\n parentPid: null,\n key: `test.process.${overrides.name}`,\n params: { name: overrides.name, annotations: Annotation.buildDictionary(() => {}) },\n environment: {},\n error: null,\n startedAt: Date.now() - 10_000,\n completedAt: Option.none(),\n metrics: { wallTime: 0, inputCount: 0, outputCount: 0 },\n ...overrides,\n});\n","[\n {\n \"meta\": {\n \"pid\": \"2433a0a1-7c09-46e6-bc6f-893f104d1691\",\n \"processName\": \"Agent\",\n \"space\": \"BIRSBKL52RS4PRK3IU2GHWTRLO5T6VOLN\",\n \"conversationId\": \"01KTFZZXTFTNVTK86WEJ6DKTFT\",\n \"runtimeName\": \"local\"\n },\n \"isEphemeral\": false,\n \"events\": [\n {\n \"timestamp\": 1780800819470,\n \"type\": \"assistant.agentRequestBegin\",\n \"data\": {}\n }\n ]\n },\n {\n \"meta\": {\n \"pid\": \"e200b1f7-30a5-4aa8-ba12-31c6d9ddf4aa\",\n \"parentPid\": \"2433a0a1-7c09-46e6-bc6f-893f104d1691\",\n \"processName\": \"Get Agent Context (dxn:org.dxos.operation.assistantToolkit.getContext)\",\n \"space\": \"BIRSBKL52RS4PRK3IU2GHWTRLO5T6VOLN\",\n \"runtimeName\": \"local\"\n },\n \"isEphemeral\": false,\n \"events\": [\n {\n \"timestamp\": 1780800819779,\n \"type\": \"operation.start\",\n \"data\": {\n \"key\": \"dxn:org.dxos.operation.assistantToolkit.getContext\",\n \"name\": \"Get Agent Context\",\n \"icon\": \"ph--info--regular\"\n }\n }\n ]\n },\n {\n \"meta\": {\n \"pid\": \"e200b1f7-30a5-4aa8-ba12-31c6d9ddf4aa\",\n \"parentPid\": \"2433a0a1-7c09-46e6-bc6f-893f104d1691\",\n \"processName\": \"Get Agent Context (dxn:org.dxos.operation.assistantToolkit.getContext)\",\n \"space\": \"BIRSBKL52RS4PRK3IU2GHWTRLO5T6VOLN\",\n \"runtimeName\": \"local\"\n },\n \"isEphemeral\": false,\n \"events\": [\n {\n \"timestamp\": 1780800819796,\n \"type\": \"operation.end\",\n \"data\": {\n \"key\": \"dxn:org.dxos.operation.assistantToolkit.getContext\",\n \"name\": \"Get Agent Context\",\n \"icon\": \"ph--info--regular\",\n \"outcome\": \"success\"\n }\n }\n ]\n },\n {\n \"meta\": {\n \"pid\": \"2433a0a1-7c09-46e6-bc6f-893f104d1691\",\n \"processName\": \"Agent\",\n \"space\": \"BIRSBKL52RS4PRK3IU2GHWTRLO5T6VOLN\",\n \"conversationId\": \"01KTFZZXTFTNVTK86WEJ6DKTFT\",\n \"runtimeName\": \"local\"\n },\n \"isEphemeral\": false,\n \"events\": [\n {\n \"timestamp\": 1780800819855,\n \"type\": \"assistant.completeBlock\",\n \"data\": {\n \"messageId\": \"01KTG004MEGN8W9GP1T443300A\",\n \"role\": \"user\",\n \"block\": {\n \"_tag\": \"text\",\n \"text\": \"create a sub-agent that creates a haiku in a new document\"\n }\n }\n }\n ]\n },\n {\n \"meta\": {\n \"pid\": \"fe05f5e6-f261-464a-a993-1ecc78557286\",\n \"parentPid\": \"2433a0a1-7c09-46e6-bc6f-893f104d1691\",\n \"processName\": \"Get Agent Context (dxn:org.dxos.operation.assistantToolkit.getContext)\",\n \"space\": \"BIRSBKL52RS4PRK3IU2GHWTRLO5T6VOLN\",\n \"runtimeName\": \"local\"\n },\n \"isEphemeral\": false,\n \"events\": [\n {\n \"timestamp\": 1780800820015,\n \"type\": \"operation.start\",\n \"data\": {\n \"key\": \"dxn:org.dxos.operation.assistantToolkit.getContext\",\n \"name\": \"Get Agent Context\",\n \"icon\": \"ph--info--regular\"\n }\n }\n ]\n },\n {\n \"meta\": {\n \"pid\": \"fe05f5e6-f261-464a-a993-1ecc78557286\",\n \"parentPid\": \"2433a0a1-7c09-46e6-bc6f-893f104d1691\",\n \"processName\": \"Get Agent Context (dxn:org.dxos.operation.assistantToolkit.getContext)\",\n \"space\": \"BIRSBKL52RS4PRK3IU2GHWTRLO5T6VOLN\",\n \"runtimeName\": \"local\"\n },\n \"isEphemeral\": false,\n \"events\": [\n {\n \"timestamp\": 1780800820031,\n \"type\": \"operation.end\",\n \"data\": {\n \"key\": \"dxn:org.dxos.operation.assistantToolkit.getContext\",\n \"name\": \"Get Agent Context\",\n \"icon\": \"ph--info--regular\",\n \"outcome\": \"success\"\n }\n }\n ]\n },\n {\n \"meta\": {\n \"pid\": \"2433a0a1-7c09-46e6-bc6f-893f104d1691\",\n \"processName\": \"Agent\",\n \"space\": \"BIRSBKL52RS4PRK3IU2GHWTRLO5T6VOLN\",\n \"conversationId\": \"01KTFZZXTFTNVTK86WEJ6DKTFT\",\n \"runtimeName\": \"local\"\n },\n \"isEphemeral\": false,\n \"events\": [\n {\n \"timestamp\": 1780800822596,\n \"type\": \"assistant.completeBlock\",\n \"data\": {\n \"messageId\": \"01KTG006SHPCW6D5WZJT9J0TKE\",\n \"role\": \"assistant\",\n \"block\": {\n \"_tag\": \"toolCall\",\n \"toolCallId\": \"toolu_01T1XhBHArQ2UNHvdCEtWY1C\",\n \"name\": \"update-tasks\",\n \"input\": \"{\\\"tasks\\\": [{\\\"id\\\":\\\"task_1\\\",\\\"title\\\":\\\"Create a sub-agent that writes a haiku in a new document\\\",\\\"status\\\":\\\"in-progress\\\"}]}\",\n \"providerExecuted\": false,\n \"operationKey\": \"dxn:org.dxos.operation.assistantToolkit.updateTasks\",\n \"operationName\": \"Update tasks\",\n \"operationIcon\": \"ph--check-square-offset--regular\"\n }\n }\n }\n ]\n },\n {\n \"meta\": {\n \"pid\": \"2433a0a1-7c09-46e6-bc6f-893f104d1691\",\n \"processName\": \"Agent\",\n \"space\": \"BIRSBKL52RS4PRK3IU2GHWTRLO5T6VOLN\",\n \"conversationId\": \"01KTFZZXTFTNVTK86WEJ6DKTFT\",\n \"runtimeName\": \"local\"\n },\n \"isEphemeral\": false,\n \"events\": [\n {\n \"timestamp\": 1780800822638,\n \"type\": \"assistant.completeBlock\",\n \"data\": {\n \"messageId\": \"01KTG007BDN1MTQT7JXNC9MFQW\",\n \"role\": \"assistant\",\n \"block\": {\n \"_tag\": \"stats\",\n \"model\": \"claude-sonnet-4-6\",\n \"duration\": 2536,\n \"message\": \"OK\",\n \"toolCalls\": 1,\n \"usage\": {\n \"inputTokens\": 3,\n \"outputTokens\": 90,\n \"totalTokens\": 93\n }\n }\n }\n }\n ]\n },\n {\n \"meta\": {\n \"pid\": \"4f9baefc-1353-406d-b883-0b5a7d1f0e31\",\n \"parentPid\": \"2433a0a1-7c09-46e6-bc6f-893f104d1691\",\n \"processName\": \"Update tasks (dxn:org.dxos.operation.assistantToolkit.updateTasks)\",\n \"space\": \"BIRSBKL52RS4PRK3IU2GHWTRLO5T6VOLN\",\n \"conversationId\": \"01KTFZZXTFTNVTK86WEJ6DKTFT\",\n \"runtimeName\": \"local\"\n },\n \"isEphemeral\": false,\n \"events\": [\n {\n \"timestamp\": 1780800822760,\n \"type\": \"operation.start\",\n \"data\": {\n \"key\": \"dxn:org.dxos.operation.assistantToolkit.updateTasks\",\n \"name\": \"Update tasks\",\n \"icon\": \"ph--check-square-offset--regular\"\n }\n }\n ]\n },\n {\n \"meta\": {\n \"pid\": \"4f9baefc-1353-406d-b883-0b5a7d1f0e31\",\n \"parentPid\": \"2433a0a1-7c09-46e6-bc6f-893f104d1691\",\n \"processName\": \"Update tasks (dxn:org.dxos.operation.assistantToolkit.updateTasks)\",\n \"space\": \"BIRSBKL52RS4PRK3IU2GHWTRLO5T6VOLN\",\n \"conversationId\": \"01KTFZZXTFTNVTK86WEJ6DKTFT\",\n \"runtimeName\": \"local\"\n },\n \"isEphemeral\": false,\n \"events\": [\n {\n \"timestamp\": 1780800822783,\n \"type\": \"operation.end\",\n \"data\": {\n \"key\": \"dxn:org.dxos.operation.assistantToolkit.updateTasks\",\n \"name\": \"Update tasks\",\n \"icon\": \"ph--check-square-offset--regular\",\n \"outcome\": \"success\"\n }\n }\n ]\n },\n {\n \"meta\": {\n \"pid\": \"2433a0a1-7c09-46e6-bc6f-893f104d1691\",\n \"processName\": \"Agent\",\n \"space\": \"BIRSBKL52RS4PRK3IU2GHWTRLO5T6VOLN\",\n \"conversationId\": \"01KTFZZXTFTNVTK86WEJ6DKTFT\",\n \"runtimeName\": \"local\"\n },\n \"isEphemeral\": false,\n \"events\": [\n {\n \"timestamp\": 1780800822829,\n \"type\": \"assistant.completeBlock\",\n \"data\": {\n \"messageId\": \"01KTG007HCMJQEHXMRSCQCQDNY\",\n \"role\": \"tool\",\n \"block\": {\n \"_tag\": \"toolResult\",\n \"toolCallId\": \"toolu_01T1XhBHArQ2UNHvdCEtWY1C\",\n \"name\": \"update-tasks\",\n \"result\": \"\\\"You must update the task status to 'in-progress' when you start and 'done' when complete.\\\\nCurrent plan updated:\\\\n<plan>\\\\n - **IN-PROGRESS**: Create a sub-agent that writes a haiku in a new document <!-- id=task_1 -->\\\\n</plan>\\\"\",\n \"providerExecuted\": false\n }\n }\n }\n ]\n },\n {\n \"meta\": {\n \"pid\": \"211a43a3-f85b-4925-aae3-af92c46ac91b\",\n \"parentPid\": \"2433a0a1-7c09-46e6-bc6f-893f104d1691\",\n \"processName\": \"Get Agent Context (dxn:org.dxos.operation.assistantToolkit.getContext)\",\n \"space\": \"BIRSBKL52RS4PRK3IU2GHWTRLO5T6VOLN\",\n \"runtimeName\": \"local\"\n },\n \"isEphemeral\": false,\n \"events\": [\n {\n \"timestamp\": 1780800823031,\n \"type\": \"operation.start\",\n \"data\": {\n \"key\": \"dxn:org.dxos.operation.assistantToolkit.getContext\",\n \"name\": \"Get Agent Context\",\n \"icon\": \"ph--info--regular\"\n }\n }\n ]\n },\n {\n \"meta\": {\n \"pid\": \"211a43a3-f85b-4925-aae3-af92c46ac91b\",\n \"parentPid\": \"2433a0a1-7c09-46e6-bc6f-893f104d1691\",\n \"processName\": \"Get Agent Context (dxn:org.dxos.operation.assistantToolkit.getContext)\",\n \"space\": \"BIRSBKL52RS4PRK3IU2GHWTRLO5T6VOLN\",\n \"runtimeName\": \"local\"\n },\n \"isEphemeral\": false,\n \"events\": [\n {\n \"timestamp\": 1780800823047,\n \"type\": \"operation.end\",\n \"data\": {\n \"key\": \"dxn:org.dxos.operation.assistantToolkit.getContext\",\n \"name\": \"Get Agent Context\",\n \"icon\": \"ph--info--regular\",\n \"outcome\": \"success\"\n }\n }\n ]\n },\n {\n \"meta\": {\n \"pid\": \"2433a0a1-7c09-46e6-bc6f-893f104d1691\",\n \"processName\": \"Agent\",\n \"space\": \"BIRSBKL52RS4PRK3IU2GHWTRLO5T6VOLN\",\n \"conversationId\": \"01KTFZZXTFTNVTK86WEJ6DKTFT\",\n \"runtimeName\": \"local\"\n },\n \"isEphemeral\": false,\n \"events\": [\n {\n \"timestamp\": 1780800825033,\n \"type\": \"assistant.completeBlock\",\n \"data\": {\n \"messageId\": \"01KTG009EK5A1PBQW38R1T8ABZ\",\n \"role\": \"assistant\",\n \"block\": {\n \"_tag\": \"toolCall\",\n \"toolCallId\": \"toolu_014hZLnJnQzNRkr9Xwx6gJ79\",\n \"name\": \"delegate-task\",\n \"input\": \"{\\\"title\\\": \\\"Create a haiku in a new document\\\"}\",\n \"providerExecuted\": false,\n \"operationKey\": \"dxn:org.dxos.operation.assistantToolkit.delegateTask\",\n \"operationName\": \"Delegate task\",\n \"operationIcon\": \"ph--share-network--regular\"\n }\n }\n }\n ]\n },\n {\n \"meta\": {\n \"pid\": \"2433a0a1-7c09-46e6-bc6f-893f104d1691\",\n \"processName\": \"Agent\",\n \"space\": \"BIRSBKL52RS4PRK3IU2GHWTRLO5T6VOLN\",\n \"conversationId\": \"01KTFZZXTFTNVTK86WEJ6DKTFT\",\n \"runtimeName\": \"local\"\n },\n \"isEphemeral\": false,\n \"events\": [\n {\n \"timestamp\": 1780800825087,\n \"type\": \"assistant.completeBlock\",\n \"data\": {\n \"messageId\": \"01KTG009QYZCDFTBGFSNCFXZ4C\",\n \"role\": \"assistant\",\n \"block\": {\n \"_tag\": \"stats\",\n \"model\": \"claude-sonnet-4-6\",\n \"duration\": 1981,\n \"message\": \"OK\",\n \"toolCalls\": 1,\n \"usage\": {\n \"inputTokens\": 1,\n \"outputTokens\": 60,\n \"totalTokens\": 61\n }\n }\n }\n }\n ]\n },\n {\n \"meta\": {\n \"pid\": \"cad71a95-5fbc-45cd-a834-bfc7e5085a3f\",\n \"parentPid\": \"2433a0a1-7c09-46e6-bc6f-893f104d1691\",\n \"processName\": \"Delegate task (dxn:org.dxos.operation.assistantToolkit.delegateTask)\",\n \"space\": \"BIRSBKL52RS4PRK3IU2GHWTRLO5T6VOLN\",\n \"conversationId\": \"01KTFZZXTFTNVTK86WEJ6DKTFT\",\n \"runtimeName\": \"local\"\n },\n \"isEphemeral\": false,\n \"events\": [\n {\n \"timestamp\": 1780800825246,\n \"type\": \"operation.start\",\n \"data\": {\n \"key\": \"dxn:org.dxos.operation.assistantToolkit.delegateTask\",\n \"name\": \"Delegate task\",\n \"icon\": \"ph--share-network--regular\"\n }\n }\n ]\n },\n {\n \"meta\": {\n \"pid\": \"cad71a95-5fbc-45cd-a834-bfc7e5085a3f\",\n \"parentPid\": \"2433a0a1-7c09-46e6-bc6f-893f104d1691\",\n \"processName\": \"Delegate task (dxn:org.dxos.operation.assistantToolkit.delegateTask)\",\n \"space\": \"BIRSBKL52RS4PRK3IU2GHWTRLO5T6VOLN\",\n \"conversationId\": \"01KTFZZXTFTNVTK86WEJ6DKTFT\",\n \"runtimeName\": \"local\"\n },\n \"isEphemeral\": false,\n \"events\": [\n {\n \"timestamp\": 1780800825268,\n \"type\": \"operation.end\",\n \"data\": {\n \"key\": \"dxn:org.dxos.operation.assistantToolkit.delegateTask\",\n \"name\": \"Delegate task\",\n \"icon\": \"ph--share-network--regular\",\n \"outcome\": \"success\"\n }\n }\n ]\n },\n {\n \"meta\": {\n \"pid\": \"2433a0a1-7c09-46e6-bc6f-893f104d1691\",\n \"processName\": \"Agent\",\n \"space\": \"BIRSBKL52RS4PRK3IU2GHWTRLO5T6VOLN\",\n \"conversationId\": \"01KTFZZXTFTNVTK86WEJ6DKTFT\",\n \"runtimeName\": \"local\"\n },\n \"isEphemeral\": false,\n \"events\": [\n {\n \"timestamp\": 1780800825324,\n \"type\": \"assistant.completeBlock\",\n \"data\": {\n \"messageId\": \"01KTG009ZCDCCCF7ZPHE3SECXG\",\n \"role\": \"tool\",\n \"block\": {\n \"_tag\": \"toolResult\",\n \"toolCallId\": \"toolu_014hZLnJnQzNRkr9Xwx6gJ79\",\n \"name\": \"delegate-task\",\n \"result\": \"\\\"Delegated work as an in-progress task. Current plan:\\\\n<plan>\\\\n - **IN-PROGRESS**: Create a sub-agent that writes a haiku in a new document <!-- id=task_1 -->\\\\n - **IN-PROGRESS**: Create a haiku in a new document <!-- id=1-d4 -->\\\\n</plan>\\\"\",\n \"providerExecuted\": false\n }\n }\n }\n ]\n },\n {\n \"meta\": {\n \"pid\": \"cf82b042-0703-4e57-b630-204f0e13deee\",\n \"parentPid\": \"2433a0a1-7c09-46e6-bc6f-893f104d1691\",\n \"processName\": \"Get Agent Context (dxn:org.dxos.operation.assistantToolkit.getContext)\",\n \"space\": \"BIRSBKL52RS4PRK3IU2GHWTRLO5T6VOLN\",\n \"runtimeName\": \"local\"\n },\n \"isEphemeral\": false,\n \"events\": [\n {\n \"timestamp\": 1780800825537,\n \"type\": \"operation.start\",\n \"data\": {\n \"key\": \"dxn:org.dxos.operation.assistantToolkit.getContext\",\n \"name\": \"Get Agent Context\",\n \"icon\": \"ph--info--regular\"\n }\n }\n ]\n },\n {\n \"meta\": {\n \"pid\": \"cf82b042-0703-4e57-b630-204f0e13deee\",\n \"parentPid\": \"2433a0a1-7c09-46e6-bc6f-893f104d1691\",\n \"processName\": \"Get Agent Context (dxn:org.dxos.operation.assistantToolkit.getContext)\",\n \"space\": \"BIRSBKL52RS4PRK3IU2GHWTRLO5T6VOLN\",\n \"runtimeName\": \"local\"\n },\n \"isEphemeral\": false,\n \"events\": [\n {\n \"timestamp\": 1780800825552,\n \"type\": \"operation.end\",\n \"data\": {\n \"key\": \"dxn:org.dxos.operation.assistantToolkit.getContext\",\n \"name\": \"Get Agent Context\",\n \"icon\": \"ph--info--regular\",\n \"outcome\": \"success\"\n }\n }\n ]\n },\n {\n \"meta\": {\n \"pid\": \"2433a0a1-7c09-46e6-bc6f-893f104d1691\",\n \"processName\": \"Agent\",\n \"space\": \"BIRSBKL52RS4PRK3IU2GHWTRLO5T6VOLN\",\n \"conversationId\": \"01KTFZZXTFTNVTK86WEJ6DKTFT\",\n \"runtimeName\": \"local\"\n },\n \"isEphemeral\": false,\n \"events\": [\n {\n \"timestamp\": 1780800827693,\n \"type\": \"assistant.completeBlock\",\n \"data\": {\n \"messageId\": \"01KTG00B9HS4BWE7G8NPYGEG00\",\n \"role\": \"assistant\",\n \"block\": {\n \"_tag\": \"text\",\n \"text\": \"Done! I've created a sub-agent with the task of writing a haiku in a new document. The sub-agent is now in progress and will create the document with a haiku. Once it completes, the artifact will be available in the space.\"\n }\n }\n }\n ]\n },\n {\n \"meta\": {\n \"pid\": \"2433a0a1-7c09-46e6-bc6f-893f104d1691\",\n \"processName\": \"Agent\",\n \"space\": \"BIRSBKL52RS4PRK3IU2GHWTRLO5T6VOLN\",\n \"conversationId\": \"01KTFZZXTFTNVTK86WEJ6DKTFT\",\n \"runtimeName\": \"local\"\n },\n \"isEphemeral\": false,\n \"events\": [\n {\n \"timestamp\": 1780800827757,\n \"type\": \"assistant.completeBlock\",\n \"data\": {\n \"messageId\": \"01KTG00CBCTK0Y7068HEY1TJXJ\",\n \"role\": \"assistant\",\n \"block\": {\n \"_tag\": \"stats\",\n \"model\": \"claude-sonnet-4-6\",\n \"duration\": 2135,\n \"message\": \"OK\",\n \"toolCalls\": 0,\n \"usage\": {\n \"inputTokens\": 1,\n \"outputTokens\": 57,\n \"totalTokens\": 58\n }\n }\n }\n }\n ]\n },\n {\n \"meta\": {\n \"pid\": \"2433a0a1-7c09-46e6-bc6f-893f104d1691\",\n \"processName\": \"Agent\",\n \"space\": \"BIRSBKL52RS4PRK3IU2GHWTRLO5T6VOLN\",\n \"conversationId\": \"01KTFZZXTFTNVTK86WEJ6DKTFT\",\n \"runtimeName\": \"local\"\n },\n \"isEphemeral\": false,\n \"events\": [\n {\n \"timestamp\": 1780800827765,\n \"type\": \"assistant.agentRequestEnd\",\n \"data\": {}\n }\n ]\n },\n {\n \"meta\": {\n \"pid\": \"cf8f7243-5b1d-4902-b158-70d9107d5f43\",\n \"parentPid\": \"2433a0a1-7c09-46e6-bc6f-893f104d1691\",\n \"processName\": \"Run Routine (dxn:org.dxos.function.prompt)\",\n \"space\": \"BIRSBKL52RS4PRK3IU2GHWTRLO5T6VOLN\",\n \"runtimeName\": \"local\"\n },\n \"isEphemeral\": false,\n \"events\": [\n {\n \"timestamp\": 1780800827912,\n \"type\": \"operation.start\",\n \"data\": {\n \"key\": \"dxn:org.dxos.function.prompt\",\n \"name\": \"Run Routine\",\n \"icon\": \"ph--brain--regular\"\n }\n }\n ]\n },\n {\n \"meta\": {\n \"pid\": \"58e4ed1d-6cb2-475e-850a-d89be0c5c714\",\n \"processName\": \"Update Chat Name (dxn:org.dxos.operation.assistant.updateChatName)\",\n \"space\": \"BIRSBKL52RS4PRK3IU2GHWTRLO5T6VOLN\",\n \"runtimeName\": \"local\"\n },\n \"isEphemeral\": false,\n \"events\": [\n {\n \"timestamp\": 1780800828033,\n \"type\": \"operation.start\",\n \"data\": {\n \"key\": \"dxn:org.dxos.operation.assistant.updateChatName\",\n \"name\": \"Update Chat Name\",\n \"icon\": \"ph--pencil--regular\"\n }\n }\n ]\n },\n {\n \"meta\": {\n \"pid\": \"b070e30f-bafe-4118-94da-83681c24d49d\",\n \"parentPid\": \"cf8f7243-5b1d-4902-b158-70d9107d5f43\",\n \"processName\": \"Get Agent Context (dxn:org.dxos.operation.assistantToolkit.getContext)\",\n \"space\": \"BIRSBKL52RS4PRK3IU2GHWTRLO5T6VOLN\",\n \"runtimeName\": \"local\"\n },\n \"isEphemeral\": false,\n \"events\": [\n {\n \"timestamp\": 1780800828277,\n \"type\": \"operation.start\",\n \"data\": {\n \"key\": \"dxn:org.dxos.operation.assistantToolkit.getContext\",\n \"name\": \"Get Agent Context\",\n \"icon\": \"ph--info--regular\"\n }\n }\n ]\n },\n {\n \"meta\": {\n \"pid\": \"b070e30f-bafe-4118-94da-83681c24d49d\",\n \"parentPid\": \"cf8f7243-5b1d-4902-b158-70d9107d5f43\",\n \"processName\": \"Get Agent Context (dxn:org.dxos.operation.assistantToolkit.getContext)\",\n \"space\": \"BIRSBKL52RS4PRK3IU2GHWTRLO5T6VOLN\",\n \"runtimeName\": \"local\"\n },\n \"isEphemeral\": false,\n \"events\": [\n {\n \"timestamp\": 1780800828278,\n \"type\": \"operation.end\",\n \"data\": {\n \"key\": \"dxn:org.dxos.operation.assistantToolkit.getContext\",\n \"name\": \"Get Agent Context\",\n \"icon\": \"ph--info--regular\",\n \"outcome\": \"success\"\n }\n }\n ]\n },\n {\n \"meta\": {\n \"pid\": \"cf8f7243-5b1d-4902-b158-70d9107d5f43\",\n \"parentPid\": \"2433a0a1-7c09-46e6-bc6f-893f104d1691\",\n \"processName\": \"Run Routine (dxn:org.dxos.function.prompt)\",\n \"space\": \"BIRSBKL52RS4PRK3IU2GHWTRLO5T6VOLN\",\n \"runtimeName\": \"local\"\n },\n \"isEphemeral\": false,\n \"events\": [\n {\n \"timestamp\": 1780800828323,\n \"type\": \"assistant.completeBlock\",\n \"data\": {\n \"messageId\": \"01KTG00CX281TNXBSMXVWGJFER\",\n \"role\": \"user\",\n \"block\": {\n \"_tag\": \"text\",\n \"text\": \"Complete the following task and report the result concisely.\\n\\nIf you create any documents or artifacts, call completeJob with a JSON object of the\\nform { \\\"summary\\\": string, \\\"artifactIds\\\": string[] }, where artifactIds are the exact\\nids returned by the tools that created them. Otherwise return a short summary string.\\n\\nTask: Create a haiku in a new document\\n<input>{}</input>\"\n }\n }\n }\n ]\n },\n {\n \"meta\": {\n \"pid\": \"c2b79fcc-a455-4546-b306-fe175a2b646a\",\n \"parentPid\": \"cf8f7243-5b1d-4902-b158-70d9107d5f43\",\n \"processName\": \"Get Agent Context (dxn:org.dxos.operation.assistantToolkit.getContext)\",\n \"space\": \"BIRSBKL52RS4PRK3IU2GHWTRLO5T6VOLN\",\n \"runtimeName\": \"local\"\n },\n \"isEphemeral\": false,\n \"events\": [\n {\n \"timestamp\": 1780800828453,\n \"type\": \"operation.start\",\n \"data\": {\n \"key\": \"dxn:org.dxos.operation.assistantToolkit.getContext\",\n \"name\": \"Get Agent Context\",\n \"icon\": \"ph--info--regular\"\n }\n }\n ]\n },\n {\n \"meta\": {\n \"pid\": \"c2b79fcc-a455-4546-b306-fe175a2b646a\",\n \"parentPid\": \"cf8f7243-5b1d-4902-b158-70d9107d5f43\",\n \"processName\": \"Get Agent Context (dxn:org.dxos.operation.assistantToolkit.getContext)\",\n \"space\": \"BIRSBKL52RS4PRK3IU2GHWTRLO5T6VOLN\",\n \"runtimeName\": \"local\"\n },\n \"isEphemeral\": false,\n \"events\": [\n {\n \"timestamp\": 1780800828455,\n \"type\": \"operation.end\",\n \"data\": {\n \"key\": \"dxn:org.dxos.operation.assistantToolkit.getContext\",\n \"name\": \"Get Agent Context\",\n \"icon\": \"ph--info--regular\",\n \"outcome\": \"success\"\n }\n }\n ]\n },\n {\n \"meta\": {\n \"pid\": \"58e4ed1d-6cb2-475e-850a-d89be0c5c714\",\n \"processName\": \"Update Chat Name (dxn:org.dxos.operation.assistant.updateChatName)\",\n \"space\": \"BIRSBKL52RS4PRK3IU2GHWTRLO5T6VOLN\",\n \"runtimeName\": \"local\"\n },\n \"isEphemeral\": false,\n \"events\": [\n {\n \"timestamp\": 1780800828735,\n \"type\": \"operation.end\",\n \"data\": {\n \"key\": \"dxn:org.dxos.operation.assistant.updateChatName\",\n \"name\": \"Update Chat Name\",\n \"icon\": \"ph--pencil--regular\",\n \"outcome\": \"success\"\n }\n }\n ]\n },\n {\n \"meta\": {\n \"pid\": \"cf8f7243-5b1d-4902-b158-70d9107d5f43\",\n \"parentPid\": \"2433a0a1-7c09-46e6-bc6f-893f104d1691\",\n \"processName\": \"Run Routine (dxn:org.dxos.function.prompt)\",\n \"space\": \"BIRSBKL52RS4PRK3IU2GHWTRLO5T6VOLN\",\n \"runtimeName\": \"local\"\n },\n \"isEphemeral\": false,\n \"events\": [\n {\n \"timestamp\": 1780800830265,\n \"type\": \"assistant.completeBlock\",\n \"data\": {\n \"messageId\": \"01KTG00EK399C8GJJ8VA656YCB\",\n \"role\": \"assistant\",\n \"block\": {\n \"_tag\": \"reasoning\",\n \"reasoningText\": \"The user wants me to create a haiku in a new document.\"\n }\n }\n }\n ]\n },\n {\n \"meta\": {\n \"pid\": \"cf8f7243-5b1d-4902-b158-70d9107d5f43\",\n \"parentPid\": \"2433a0a1-7c09-46e6-bc6f-893f104d1691\",\n \"processName\": \"Run Routine (dxn:org.dxos.function.prompt)\",\n \"space\": \"BIRSBKL52RS4PRK3IU2GHWTRLO5T6VOLN\",\n \"runtimeName\": \"local\"\n },\n \"isEphemeral\": false,\n \"events\": [\n {\n \"timestamp\": 1780800831962,\n \"type\": \"assistant.completeBlock\",\n \"data\": {\n \"messageId\": \"01KTG00EW0KX1Z76MNJBD0958W\",\n \"role\": \"assistant\",\n \"block\": {\n \"_tag\": \"toolCall\",\n \"toolCallId\": \"toolu_0178cbySPezLkhabBTSDtzCL\",\n \"name\": \"create\",\n \"input\": \"{\\\"name\\\": \\\"Haiku\\\", \\\"content\\\": \\\"# Haiku\\\\n\\\\nAutumn leaves descend,\\\\nWhispering through quiet woods—\\\\nEarth breathes in their fall.\\\"}\",\n \"providerExecuted\": false,\n \"operationKey\": \"dxn:org.dxos.operation.markdown.create\",\n \"operationName\": \"Create\",\n \"operationIcon\": \"ph--file-text--regular\"\n }\n }\n }\n ]\n },\n {\n \"meta\": {\n \"pid\": \"cf8f7243-5b1d-4902-b158-70d9107d5f43\",\n \"parentPid\": \"2433a0a1-7c09-46e6-bc6f-893f104d1691\",\n \"processName\": \"Run Routine (dxn:org.dxos.function.prompt)\",\n \"space\": \"BIRSBKL52RS4PRK3IU2GHWTRLO5T6VOLN\",\n \"runtimeName\": \"local\"\n },\n \"isEphemeral\": false,\n \"events\": [\n {\n \"timestamp\": 1780800832083,\n \"type\": \"assistant.completeBlock\",\n \"data\": {\n \"messageId\": \"01KTG00GJK5KB5BQT6C5H9HE6J\",\n \"role\": \"assistant\",\n \"block\": {\n \"_tag\": \"stats\",\n \"model\": \"claude-opus-4-6\",\n \"duration\": 3587,\n \"message\": \"OK\",\n \"toolCalls\": 1,\n \"usage\": {\n \"inputTokens\": 3,\n \"outputTokens\": 126,\n \"totalTokens\": 129\n }\n }\n }\n }\n ]\n },\n {\n \"meta\": {\n \"pid\": \"dd1b51d9-f2f7-4144-945b-7ccd96978964\",\n \"parentPid\": \"cf8f7243-5b1d-4902-b158-70d9107d5f43\",\n \"processName\": \"Create (dxn:org.dxos.operation.markdown.create)\",\n \"space\": \"BIRSBKL52RS4PRK3IU2GHWTRLO5T6VOLN\",\n \"runtimeName\": \"local\"\n },\n \"isEphemeral\": false,\n \"events\": [\n {\n \"timestamp\": 1780800832091,\n \"type\": \"operation.start\",\n \"data\": {\n \"key\": \"dxn:org.dxos.operation.markdown.create\",\n \"name\": \"Create\",\n \"icon\": \"ph--file-text--regular\"\n }\n }\n ]\n },\n {\n \"meta\": {\n \"pid\": \"dd1b51d9-f2f7-4144-945b-7ccd96978964\",\n \"parentPid\": \"cf8f7243-5b1d-4902-b158-70d9107d5f43\",\n \"processName\": \"Create (dxn:org.dxos.operation.markdown.create)\",\n \"space\": \"BIRSBKL52RS4PRK3IU2GHWTRLO5T6VOLN\",\n \"runtimeName\": \"local\"\n },\n \"isEphemeral\": false,\n \"events\": [\n {\n \"timestamp\": 1780800832174,\n \"type\": \"operation.end\",\n \"data\": {\n \"key\": \"dxn:org.dxos.operation.markdown.create\",\n \"name\": \"Create\",\n \"icon\": \"ph--file-text--regular\",\n \"outcome\": \"success\"\n }\n }\n ]\n },\n {\n \"meta\": {\n \"pid\": \"cf8f7243-5b1d-4902-b158-70d9107d5f43\",\n \"parentPid\": \"2433a0a1-7c09-46e6-bc6f-893f104d1691\",\n \"processName\": \"Run Routine (dxn:org.dxos.function.prompt)\",\n \"space\": \"BIRSBKL52RS4PRK3IU2GHWTRLO5T6VOLN\",\n \"runtimeName\": \"local\"\n },\n \"isEphemeral\": false,\n \"events\": [\n {\n \"timestamp\": 1780800832177,\n \"type\": \"assistant.completeBlock\",\n \"data\": {\n \"messageId\": \"01KTG00GNGWSK4HBSS3G6GHN3Z\",\n \"role\": \"tool\",\n \"block\": {\n \"_tag\": \"toolResult\",\n \"toolCallId\": \"toolu_0178cbySPezLkhabBTSDtzCL\",\n \"name\": \"create\",\n \"result\": \"{\\\"id\\\":\\\"echo://BIRSBKL52RS4PRK3IU2GHWTRLO5T6VOLN/01KTG00GJWSZ4SQSXABYFWGDVV\\\"}\",\n \"providerExecuted\": false\n }\n }\n }\n ]\n },\n {\n \"meta\": {\n \"pid\": \"01175964-6ffa-4785-84cb-649cbb80edd5\",\n \"parentPid\": \"cf8f7243-5b1d-4902-b158-70d9107d5f43\",\n \"processName\": \"Get Agent Context (dxn:org.dxos.operation.assistantToolkit.getContext)\",\n \"space\": \"BIRSBKL52RS4PRK3IU2GHWTRLO5T6VOLN\",\n \"runtimeName\": \"local\"\n },\n \"isEphemeral\": false,\n \"events\": [\n {\n \"timestamp\": 1780800832318,\n \"type\": \"operation.start\",\n \"data\": {\n \"key\": \"dxn:org.dxos.operation.assistantToolkit.getContext\",\n \"name\": \"Get Agent Context\",\n \"icon\": \"ph--info--regular\"\n }\n }\n ]\n },\n {\n \"meta\": {\n \"pid\": \"01175964-6ffa-4785-84cb-649cbb80edd5\",\n \"parentPid\": \"cf8f7243-5b1d-4902-b158-70d9107d5f43\",\n \"processName\": \"Get Agent Context (dxn:org.dxos.operation.assistantToolkit.getContext)\",\n \"space\": \"BIRSBKL52RS4PRK3IU2GHWTRLO5T6VOLN\",\n \"runtimeName\": \"local\"\n },\n \"isEphemeral\": false,\n \"events\": [\n {\n \"timestamp\": 1780800832319,\n \"type\": \"operation.end\",\n \"data\": {\n \"key\": \"dxn:org.dxos.operation.assistantToolkit.getContext\",\n \"name\": \"Get Agent Context\",\n \"icon\": \"ph--info--regular\",\n \"outcome\": \"success\"\n }\n }\n ]\n },\n {\n \"meta\": {\n \"pid\": \"cf8f7243-5b1d-4902-b158-70d9107d5f43\",\n \"parentPid\": \"2433a0a1-7c09-46e6-bc6f-893f104d1691\",\n \"processName\": \"Run Routine (dxn:org.dxos.function.prompt)\",\n \"space\": \"BIRSBKL52RS4PRK3IU2GHWTRLO5T6VOLN\",\n \"runtimeName\": \"local\"\n },\n \"isEphemeral\": false,\n \"events\": [\n {\n \"timestamp\": 1780800834244,\n \"type\": \"assistant.completeBlock\",\n \"data\": {\n \"messageId\": \"01KTG00J47C4BSC65F86Z1DY9C\",\n \"role\": \"assistant\",\n \"block\": {\n \"_tag\": \"toolCall\",\n \"toolCallId\": \"toolu_019cwi3tVMMseebHThRSJkRA\",\n \"name\": \"add-artifact\",\n \"input\": \"{\\\"name\\\": \\\"Haiku\\\", \\\"artifact\\\": \\\"echo://BIRSBKL52RS4PRK3IU2GHWTRLO5T6VOLN/01KTG00GJWSZ4SQSXABYFWGDVV\\\"}\",\n \"providerExecuted\": false,\n \"operationKey\": \"dxn:org.dxos.function.agent.addArtifact\",\n \"operationName\": \"Add artifact\",\n \"operationIcon\": \"ph--plus--regular\"\n }\n }\n }\n ]\n },\n {\n \"meta\": {\n \"pid\": \"cf8f7243-5b1d-4902-b158-70d9107d5f43\",\n \"parentPid\": \"2433a0a1-7c09-46e6-bc6f-893f104d1691\",\n \"processName\": \"Run Routine (dxn:org.dxos.function.prompt)\",\n \"space\": \"BIRSBKL52RS4PRK3IU2GHWTRLO5T6VOLN\",\n \"runtimeName\": \"local\"\n },\n \"isEphemeral\": false,\n \"events\": [\n {\n \"timestamp\": 1780800834342,\n \"type\": \"assistant.completeBlock\",\n \"data\": {\n \"messageId\": \"01KTG00JS52RCKXSCQNEGYW6ZS\",\n \"role\": \"assistant\",\n \"block\": {\n \"_tag\": \"stats\",\n \"model\": \"claude-opus-4-6\",\n \"duration\": 1991,\n \"message\": \"OK\",\n \"toolCalls\": 1,\n \"usage\": {\n \"inputTokens\": 1,\n \"outputTokens\": 121,\n \"totalTokens\": 122\n }\n }\n }\n }\n ]\n },\n {\n \"meta\": {\n \"pid\": \"2f805c44-2f1e-4fff-9f1d-5864bc176d56\",\n \"parentPid\": \"cf8f7243-5b1d-4902-b158-70d9107d5f43\",\n \"processName\": \"Add artifact (dxn:org.dxos.function.agent.addArtifact)\",\n \"space\": \"BIRSBKL52RS4PRK3IU2GHWTRLO5T6VOLN\",\n \"runtimeName\": \"local\"\n },\n \"isEphemeral\": false,\n \"events\": [\n {\n \"timestamp\": 1780800834363,\n \"type\": \"operation.start\",\n \"data\": {\n \"key\": \"dxn:org.dxos.function.agent.addArtifact\",\n \"name\": \"Add artifact\",\n \"icon\": \"ph--plus--regular\"\n }\n }\n ]\n },\n {\n \"meta\": {\n \"pid\": \"2f805c44-2f1e-4fff-9f1d-5864bc176d56\",\n \"parentPid\": \"cf8f7243-5b1d-4902-b158-70d9107d5f43\",\n \"processName\": \"Add artifact (dxn:org.dxos.function.agent.addArtifact)\",\n \"space\": \"BIRSBKL52RS4PRK3IU2GHWTRLO5T6VOLN\",\n \"runtimeName\": \"local\"\n },\n \"isEphemeral\": false,\n \"events\": [\n {\n \"timestamp\": 1780800834365,\n \"type\": \"operation.end\",\n \"data\": {\n \"key\": \"dxn:org.dxos.function.agent.addArtifact\",\n \"name\": \"Add artifact\",\n \"icon\": \"ph--plus--regular\",\n \"outcome\": \"failure\",\n \"error\": \"There should be exactly one agent in context. Got: 0\"\n }\n }\n ]\n },\n {\n \"meta\": {\n \"pid\": \"cf8f7243-5b1d-4902-b158-70d9107d5f43\",\n \"parentPid\": \"2433a0a1-7c09-46e6-bc6f-893f104d1691\",\n \"processName\": \"Run Routine (dxn:org.dxos.function.prompt)\",\n \"space\": \"BIRSBKL52RS4PRK3IU2GHWTRLO5T6VOLN\",\n \"runtimeName\": \"local\"\n },\n \"isEphemeral\": false,\n \"events\": [\n {\n \"timestamp\": 1780800834370,\n \"type\": \"assistant.completeBlock\",\n \"data\": {\n \"messageId\": \"01KTG00JT1JGBNR4C0TW653WVV\",\n \"role\": \"tool\",\n \"block\": {\n \"_tag\": \"toolResult\",\n \"toolCallId\": \"toolu_019cwi3tVMMseebHThRSJkRA\",\n \"name\": \"add-artifact\",\n \"error\": \"Error: There should be exactly one agent in context. Got: 0\",\n \"providerExecuted\": false\n }\n }\n }\n ]\n },\n {\n \"meta\": {\n \"pid\": \"901f7e36-b0be-4e9e-99df-389261ff3722\",\n \"parentPid\": \"cf8f7243-5b1d-4902-b158-70d9107d5f43\",\n \"processName\": \"Get Agent Context (dxn:org.dxos.operation.assistantToolkit.getContext)\",\n \"space\": \"BIRSBKL52RS4PRK3IU2GHWTRLO5T6VOLN\",\n \"runtimeName\": \"local\"\n },\n \"isEphemeral\": false,\n \"events\": [\n {\n \"timestamp\": 1780800834486,\n \"type\": \"operation.start\",\n \"data\": {\n \"key\": \"dxn:org.dxos.operation.assistantToolkit.getContext\",\n \"name\": \"Get Agent Context\",\n \"icon\": \"ph--info--regular\"\n }\n }\n ]\n },\n {\n \"meta\": {\n \"pid\": \"901f7e36-b0be-4e9e-99df-389261ff3722\",\n \"parentPid\": \"cf8f7243-5b1d-4902-b158-70d9107d5f43\",\n \"processName\": \"Get Agent Context (dxn:org.dxos.operation.assistantToolkit.getContext)\",\n \"space\": \"BIRSBKL52RS4PRK3IU2GHWTRLO5T6VOLN\",\n \"runtimeName\": \"local\"\n },\n \"isEphemeral\": false,\n \"events\": [\n {\n \"timestamp\": 1780800834487,\n \"type\": \"operation.end\",\n \"data\": {\n \"key\": \"dxn:org.dxos.operation.assistantToolkit.getContext\",\n \"name\": \"Get Agent Context\",\n \"icon\": \"ph--info--regular\",\n \"outcome\": \"success\"\n }\n }\n ]\n },\n {\n \"meta\": {\n \"pid\": \"cf8f7243-5b1d-4902-b158-70d9107d5f43\",\n \"parentPid\": \"2433a0a1-7c09-46e6-bc6f-893f104d1691\",\n \"processName\": \"Run Routine (dxn:org.dxos.function.prompt)\",\n \"space\": \"BIRSBKL52RS4PRK3IU2GHWTRLO5T6VOLN\",\n \"runtimeName\": \"local\"\n },\n \"isEphemeral\": false,\n \"events\": [\n {\n \"timestamp\": 1780800837620,\n \"type\": \"assistant.completeBlock\",\n \"data\": {\n \"messageId\": \"01KTG00MSMF112Q6HS7TM5YRWZ\",\n \"role\": \"assistant\",\n \"block\": {\n \"_tag\": \"toolCall\",\n \"toolCallId\": \"toolu_01C5PdSKAg51X4odG3F3Nzf6\",\n \"name\": \"completeJob\",\n \"input\": \"{\\\"success\\\": {\\\"summary\\\":\\\"Created a new document titled 'Haiku' containing an autumn-themed haiku: \\\\\\\"Autumn leaves descend, / Whispering through quiet woods— / Earth breathes in their fall.\\\\\\\"\\\",\\\"artifactIds\\\":[\\\"echo://BIRSBKL52RS4PRK3IU2GHWTRLO5T6VOLN/01KTG00GJWSZ4SQSXABYFWGDVV\\\"]}}\",\n \"providerExecuted\": false\n }\n }\n }\n ]\n },\n {\n \"meta\": {\n \"pid\": \"cf8f7243-5b1d-4902-b158-70d9107d5f43\",\n \"parentPid\": \"2433a0a1-7c09-46e6-bc6f-893f104d1691\",\n \"processName\": \"Run Routine (dxn:org.dxos.function.prompt)\",\n \"space\": \"BIRSBKL52RS4PRK3IU2GHWTRLO5T6VOLN\",\n \"runtimeName\": \"local\"\n },\n \"isEphemeral\": false,\n \"events\": [\n {\n \"timestamp\": 1780800837627,\n \"type\": \"assistant.completeBlock\",\n \"data\": {\n \"messageId\": \"01KTG00NZTEE9V745YZTH9RJVS\",\n \"role\": \"assistant\",\n \"block\": {\n \"_tag\": \"stats\",\n \"model\": \"claude-opus-4-6\",\n \"duration\": 3095,\n \"message\": \"OK\",\n \"toolCalls\": 1,\n \"usage\": {\n \"inputTokens\": 1,\n \"outputTokens\": 158,\n \"totalTokens\": 159\n }\n }\n }\n }\n ]\n },\n {\n \"meta\": {\n \"pid\": \"cf8f7243-5b1d-4902-b158-70d9107d5f43\",\n \"parentPid\": \"2433a0a1-7c09-46e6-bc6f-893f104d1691\",\n \"processName\": \"Run Routine (dxn:org.dxos.function.prompt)\",\n \"space\": \"BIRSBKL52RS4PRK3IU2GHWTRLO5T6VOLN\",\n \"runtimeName\": \"local\"\n },\n \"isEphemeral\": false,\n \"events\": [\n {\n \"timestamp\": 1780800837636,\n \"type\": \"assistant.completeBlock\",\n \"data\": {\n \"messageId\": \"01KTG00P04B6FP1T09Y1XN487Q\",\n \"role\": \"tool\",\n \"block\": {\n \"_tag\": \"toolResult\",\n \"toolCallId\": \"toolu_01C5PdSKAg51X4odG3F3Nzf6\",\n \"name\": \"completeJob\",\n \"providerExecuted\": false\n }\n }\n }\n ]\n },\n {\n \"meta\": {\n \"pid\": \"639e78ff-d0b1-4d00-8e52-7fc43d245c9f\",\n \"parentPid\": \"cf8f7243-5b1d-4902-b158-70d9107d5f43\",\n \"processName\": \"Get Agent Context (dxn:org.dxos.operation.assistantToolkit.getContext)\",\n \"space\": \"BIRSBKL52RS4PRK3IU2GHWTRLO5T6VOLN\",\n \"runtimeName\": \"local\"\n },\n \"isEphemeral\": false,\n \"events\": [\n {\n \"timestamp\": 1780800837746,\n \"type\": \"operation.start\",\n \"data\": {\n \"key\": \"dxn:org.dxos.operation.assistantToolkit.getContext\",\n \"name\": \"Get Agent Context\",\n \"icon\": \"ph--info--regular\"\n }\n }\n ]\n },\n {\n \"meta\": {\n \"pid\": \"639e78ff-d0b1-4d00-8e52-7fc43d245c9f\",\n \"parentPid\": \"cf8f7243-5b1d-4902-b158-70d9107d5f43\",\n \"processName\": \"Get Agent Context (dxn:org.dxos.operation.assistantToolkit.getContext)\",\n \"space\": \"BIRSBKL52RS4PRK3IU2GHWTRLO5T6VOLN\",\n \"runtimeName\": \"local\"\n },\n \"isEphemeral\": false,\n \"events\": [\n {\n \"timestamp\": 1780800837747,\n \"type\": \"operation.end\",\n \"data\": {\n \"key\": \"dxn:org.dxos.operation.assistantToolkit.getContext\",\n \"name\": \"Get Agent Context\",\n \"icon\": \"ph--info--regular\",\n \"outcome\": \"success\"\n }\n }\n ]\n },\n {\n \"meta\": {\n \"pid\": \"cf8f7243-5b1d-4902-b158-70d9107d5f43\",\n \"parentPid\": \"2433a0a1-7c09-46e6-bc6f-893f104d1691\",\n \"processName\": \"Run Routine (dxn:org.dxos.function.prompt)\",\n \"space\": \"BIRSBKL52RS4PRK3IU2GHWTRLO5T6VOLN\",\n \"runtimeName\": \"local\"\n },\n \"isEphemeral\": false,\n \"events\": [\n {\n \"timestamp\": 1780800838834,\n \"type\": \"assistant.completeBlock\",\n \"data\": {\n \"messageId\": \"01KTG00Q5HN24VN54SRMH1GPT6\",\n \"role\": \"assistant\",\n \"block\": {\n \"_tag\": \"stats\",\n \"model\": \"claude-opus-4-6\",\n \"duration\": 1052,\n \"message\": \"OK\",\n \"toolCalls\": 0,\n \"usage\": {\n \"inputTokens\": 1,\n \"outputTokens\": 2,\n \"totalTokens\": 3\n }\n }\n }\n }\n ]\n },\n {\n \"meta\": {\n \"pid\": \"cf8f7243-5b1d-4902-b158-70d9107d5f43\",\n \"parentPid\": \"2433a0a1-7c09-46e6-bc6f-893f104d1691\",\n \"processName\": \"Run Routine (dxn:org.dxos.function.prompt)\",\n \"space\": \"BIRSBKL52RS4PRK3IU2GHWTRLO5T6VOLN\",\n \"runtimeName\": \"local\"\n },\n \"isEphemeral\": false,\n \"events\": [\n {\n \"timestamp\": 1780800838870,\n \"type\": \"operation.end\",\n \"data\": {\n \"key\": \"dxn:org.dxos.function.prompt\",\n \"name\": \"Run Routine\",\n \"icon\": \"ph--brain--regular\",\n \"outcome\": \"success\"\n }\n }\n ]\n }\n]\n"],"mappings":"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"}
@@ -0,0 +1,19 @@
1
+ //#region src/translations.ts
2
+ var translationKey = "@dxos/react-ui-trace";
3
+ var translations = [{ "en-US": { [translationKey]: {
4
+ "no-commits.message": "No events yet",
5
+ "trace.label": "Trace",
6
+ "trace-processes.label": "Processes",
7
+ "trace-details.label": "Details",
8
+ "trace-filter.menu": "Filter processes",
9
+ "trace-clear-selection.label": "Clear process selection",
10
+ "trace-filter-all.label": "Show all",
11
+ "trace-filter-none.label": "Hide all",
12
+ "trace-environment-app.label": "App",
13
+ "trace-environment-space.label": "Space",
14
+ "trace-environment-conversation.label": "Conversation"
15
+ } } }];
16
+ //#endregion
17
+ export { translationKey, translations };
18
+
19
+ //# sourceMappingURL=translations.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"translations.mjs","names":[],"sources":["../../src/translations.ts"],"sourcesContent":["//\n// Copyright 2026 DXOS.org\n//\n\nimport { type Resource } from '@dxos/react-ui';\n\nexport const translationKey = '@dxos/react-ui-trace';\n\nexport const translations = [\n {\n 'en-US': {\n [translationKey]: {\n 'no-commits.message': 'No events yet',\n\n 'trace.label': 'Trace',\n 'trace-processes.label': 'Processes',\n 'trace-details.label': 'Details',\n\n 'trace-filter.menu': 'Filter processes',\n 'trace-clear-selection.label': 'Clear process selection',\n 'trace-filter-all.label': 'Show all',\n 'trace-filter-none.label': 'Hide all',\n 'trace-environment-app.label': 'App',\n 'trace-environment-space.label': 'Space',\n 'trace-environment-conversation.label': 'Conversation',\n },\n },\n },\n] as const satisfies Resource[];\n"],"mappings":";AAMA,IAAa,iBAAiB;AAE9B,IAAa,eAAe,CAC1B,EACE,SAAS,GACN,iBAAiB;CAChB,sBAAsB;CAEtB,eAAe;CACf,yBAAyB;CACzB,uBAAuB;CAEvB,qBAAqB;CACrB,+BAA+B;CAC/B,0BAA0B;CAC1B,2BAA2B;CAC3B,+BAA+B;CAC/B,iCAAiC;CACjC,wCAAwC;AAC1C,EACF,EACF,CACF"}