@outputai/core 0.9.0 → 0.9.1-dev.667788.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/package.json +1 -1
  2. package/src/internal_activities/index.js +6 -2
  3. package/src/internal_activities/index.spec.js +37 -20
  4. package/src/tracing/processors/local/temp/traces/019e84c6-23ee-7590-9b96-3677ef70ff7a.trace +10 -0
  5. package/src/tracing/processors/local/temp/traces/1782328168490_019efb09-902a-79ff-a070-62fe7da66177.trace +5 -0
  6. package/src/tracing/processors/local/temp/traces/1782328311518_019efb0b-bede-7823-9864-000451c94990.trace +5 -0
  7. package/src/tracing/processors/local/temp/traces/1782335434971_019efb78-70db-7b6d-a7e2-836004486dfe.trace +5 -0
  8. package/src/tracing/processors/local/temp/traces/1782336480613_019efb88-6565-7c6d-a656-317aabb14d2b.trace +7 -0
  9. package/src/tracing/processors/local/temp/traces/1782336510823_019efb88-db67-7c98-9471-496611deb668.trace +8 -0
  10. package/src/tracing/processors/local/temp/traces/1782336616409_019efb8a-77d9-73bf-be50-773ff96c97c1.trace +8 -0
  11. package/src/tracing/processors/local/temp/traces/1782337050009_019efb91-1599-7034-b995-580776268a71.trace +9 -0
  12. package/src/tracing/processors/local/temp/traces/1782338236879_019efba3-31cf-74dd-a731-a6067edc696e.trace +9 -0
  13. package/src/tracing/processors/local/temp/traces/1782338252839_019efba3-7027-7c45-9ce6-830959710b32.trace +7 -0
  14. package/src/tracing/processors/local/temp/traces/1782338267579_019efba3-a9bb-70c3-b0e5-5faa4a8c65ab.trace +7 -0
  15. package/src/tracing/processors/local/temp/traces/1782338277157_019efba3-cf25-7585-9b61-adbd3a27f2bd.trace +7 -0
  16. package/src/tracing/processors/local/temp/traces/1782338315954_019efba4-66b2-7304-9f48-72c8868414d2.trace +23 -0
  17. package/src/tracing/processors/local/temp/traces/1782338327628_019efba4-944c-7baf-991e-b29689de2370.trace +8 -0
  18. package/src/tracing/processors/local/temp/traces/1782338336071_019efba4-b547-7ba5-ba09-8eec9d42563e.trace +23 -0
  19. package/src/tracing/processors/local/temp/traces/1782402753823_019eff7b-a51f-77ce-87ae-6d14897ccf45.trace +7 -0
  20. package/src/tracing/processors/local/temp/traces/1782402762165_019eff7b-c5b5-75a5-9376-df3f081a8eb4.trace +13 -0
  21. package/src/tracing/processors/local/temp/traces/1782407106830_019effbe-110e-710f-b0c6-bfc9ed9aea6f.trace +5 -0
  22. package/src/tracing/processors/local/temp/traces/1782407208741_019effbf-9f25-754c-8759-1bac48f140f1.trace +5 -0
  23. package/src/tracing/processors/local/temp/traces/1782408303776_019effd0-54a0-71ef-8dd6-ca7fc056c39e.trace +10 -0
  24. package/src/tracing/processors/local/temp/traces/1782408323412_019effd0-a154-79b7-a59b-f7b939977b25.trace +9 -0
  25. package/src/tracing/processors/local/temp/traces/1782408350747_019effd1-0c1b-7aa6-bb50-99bffda60578.trace +9 -0
  26. package/src/tracing/processors/local/temp/traces/1782417971022_019f0063-d74e-79e5-8c45-0b2454293fbe.trace +3 -0
  27. package/src/tracing/processors/local/temp/traces/1782418001073_019f0064-4cb1-7e02-87ec-9d16d45de6b0.trace +5 -0
  28. package/src/tracing/processors/local/temp/traces/1782418826845_019f0070-e65d-75e7-ba18-e02d5f042e76.trace +5 -0
  29. package/src/tracing/processors/local/temp/traces/1782418845896_019f0071-30c8-73e8-b951-a794ea54734d.trace +5 -0
  30. package/src/tracing/processors/local/temp/traces/1782419454023_019f007a-7847-770a-8579-736d0d1ea8c3.trace +5 -0
  31. package/src/tracing/processors/local/temp/traces/1782419596519_019f007c-a4e7-7e8a-ab80-a4e6962cb609.trace +5 -0
  32. package/src/tracing/processors/local/temp/traces/1782419641903_019f007d-562f-73e5-b47a-12a6c160cae4.trace +5 -0
  33. package/src/tracing/processors/local/temp/traces/1782421214804_019f0095-5654-7e12-978f-451f5c871f29.trace +5 -0
  34. package/src/tracing/processors/local/temp/traces/1782421420583_019f0098-7a27-79c5-863f-8c5cdb278e09.trace +5 -0
  35. package/src/tracing/processors/local/temp/traces/1782422027703_019f00a1-bdb7-729e-9a90-d5554d48eac3.trace +5 -0
  36. package/src/tracing/processors/local/temp/traces/1782494266451_019f04f0-0453-7575-ad6a-e3dcd7361a76.trace +9 -0
  37. package/src/tracing/processors/local/temp/traces/1782500853437_019f0554-86bd-765c-b2cc-500970efc891.trace +5 -0
  38. package/src/tracing/processors/local/temp/traces/1782501441463_019f055d-7fb7-73e2-98c4-7bd50c33c7a7.trace +5 -0
  39. package/src/tracing/processors/local/temp/traces/1782932572760_019f1f10-0a58-7154-9e8f-092add07b211.trace +23 -0
  40. package/src/worker/proxy.js +8 -20
  41. package/src/worker/proxy.spec.js +16 -36
  42. package/src/worker/temp/__activity_options.js +37 -0
  43. package/src/worker/temp/__workflows_entrypoint.js +55 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@outputai/core",
3
- "version": "0.9.0",
3
+ "version": "0.9.1-dev.667788.0",
4
4
  "description": "The core module of the output framework",
5
5
  "type": "module",
6
6
  "exports": {
@@ -1,5 +1,5 @@
1
1
  import { FatalError } from '#errors';
2
- import { fetch } from 'undici';
2
+ import { EnvHttpProxyAgent, fetch } from 'undici';
3
3
  import { serializeFetchResponse, serializeBodyAndInferContentType } from '#helpers/fetch';
4
4
  import { createChildLogger } from '#logger';
5
5
  import { getDestinations } from '#tracing';
@@ -8,6 +8,9 @@ import { ACTIVITY_GET_TRACE_DESTINATIONS, ACTIVITY_SEND_HTTP_REQUEST } from '#co
8
8
 
9
9
  const log = createChildLogger( 'HttpClient' );
10
10
 
11
+ /* Ignore HTTP/2. Check: https://github.com/growthxai/output/issues/299 */
12
+ const dispatcher = new EnvHttpProxyAgent( { allowH2: false } );
13
+
11
14
  /**
12
15
  * Send a HTTP request.
13
16
  *
@@ -26,7 +29,8 @@ export const sendHttpRequest = createInternalStep( {
26
29
  const args = {
27
30
  method,
28
31
  headers: new Headers( headers ?? {} ),
29
- signal: AbortSignal.timeout( timeout )
32
+ signal: AbortSignal.timeout( timeout ),
33
+ dispatcher
30
34
  };
31
35
 
32
36
  const methodsWithBody = [ 'DELETE', 'PATCH', 'POST', 'PUT', 'OPTIONS' ];
@@ -1,5 +1,4 @@
1
1
  import { describe, it, expect, vi, beforeEach } from 'vitest';
2
- import { MockAgent, setGlobalDispatcher } from 'undici';
3
2
  import { FatalError } from '#errors';
4
3
  import { ACTIVITY_GET_TRACE_DESTINATIONS, ACTIVITY_SEND_HTTP_REQUEST } from '#consts';
5
4
  import { serializeBodyAndInferContentType, serializeFetchResponse } from '#helpers/fetch';
@@ -7,6 +6,15 @@ import { getTraceDestinations, sendHttpRequest } from './index.js';
7
6
 
8
7
  const getDestinationsMock = vi.hoisted( () => vi.fn() );
9
8
  const createInternalStepMock = vi.hoisted( () => vi.fn( ( { handler } ) => handler ) );
9
+ const fetchMock = vi.hoisted( () => vi.fn() );
10
+ const EnvHttpProxyAgentMock = vi.hoisted( () => vi.fn( function EnvHttpProxyAgent( options ) {
11
+ this.options = options;
12
+ } ) );
13
+
14
+ vi.mock( 'undici', () => ( {
15
+ EnvHttpProxyAgent: EnvHttpProxyAgentMock,
16
+ fetch: fetchMock
17
+ } ) );
10
18
 
11
19
  vi.mock( '#tracing', () => ( {
12
20
  getDestinations: getDestinationsMock
@@ -30,16 +38,20 @@ vi.mock( '#helpers/fetch', () => ( {
30
38
  serializeFetchResponse: vi.fn()
31
39
  } ) );
32
40
 
33
- const mockAgent = new MockAgent();
34
- mockAgent.disableNetConnect();
35
-
36
- setGlobalDispatcher( mockAgent );
37
-
38
41
  const url = 'https://growthx.ai';
39
42
  const method = 'GET';
40
43
 
44
+ const response = ( { ok = true, status = 200, statusText = 'OK', headers = {} } = {} ) => ( {
45
+ ok,
46
+ status,
47
+ statusText,
48
+ headers: new Headers( headers ),
49
+ text: vi.fn()
50
+ } );
51
+
41
52
  describe( 'internal_activities component registration', () => {
42
53
  it( 'creates internal step components for exported activities', () => {
54
+ expect( EnvHttpProxyAgentMock ).toHaveBeenCalledWith( { allowH2: false } );
43
55
  expect( createInternalStepMock ).toHaveBeenNthCalledWith( 1, {
44
56
  name: ACTIVITY_SEND_HTTP_REQUEST,
45
57
  handler: expect.any( Function )
@@ -55,18 +67,19 @@ describe( 'internal_activities component registration', () => {
55
67
 
56
68
  describe( 'internal_activities/sendHttpRequest', () => {
57
69
  beforeEach( async () => {
58
- vi.restoreAllMocks();
59
- vi.clearAllMocks();
70
+ fetchMock.mockReset();
71
+ serializeBodyAndInferContentType.mockReset();
72
+ serializeFetchResponse.mockReset();
60
73
  } );
61
74
 
62
75
  it( 'succeeds and returns serialized JSON response', async () => {
63
76
  const payload = { a: 1 };
64
77
  const method = 'POST';
65
78
 
66
- mockAgent.get( url ).intercept( { path: '/', method } )
67
- .reply( 200, JSON.stringify( { ok: true, value: 42 } ), {
68
- headers: { 'content-type': 'application/json' }
69
- } );
79
+ fetchMock.mockResolvedValueOnce( response( {
80
+ status: 200,
81
+ headers: { 'content-type': 'application/json' }
82
+ } ) );
70
83
 
71
84
  // mock utils
72
85
  serializeBodyAndInferContentType.mockReturnValueOnce( {
@@ -81,6 +94,10 @@ describe( 'internal_activities/sendHttpRequest', () => {
81
94
  // utils mocked: verify calls and returned value
82
95
  expect( serializeBodyAndInferContentType ).toHaveBeenCalledTimes( 1 );
83
96
  expect( serializeBodyAndInferContentType ).toHaveBeenCalledWith( payload );
97
+ expect( fetchMock ).toHaveBeenCalledWith( url, expect.objectContaining( {
98
+ method,
99
+ dispatcher: expect.any( EnvHttpProxyAgentMock )
100
+ } ) );
84
101
  expect( serializeFetchResponse ).toHaveBeenCalledTimes( 1 );
85
102
  const respArg = serializeFetchResponse.mock.calls[0][0];
86
103
  expect( respArg && typeof respArg.text ).toBe( 'function' );
@@ -90,7 +107,7 @@ describe( 'internal_activities/sendHttpRequest', () => {
90
107
  } );
91
108
 
92
109
  it( 'throws FatalError when response.ok is false', async () => {
93
- mockAgent.get( url ).intercept( { path: '/', method } ).reply( 500, 'Internal error' );
110
+ fetchMock.mockResolvedValueOnce( response( { ok: false, status: 500, statusText: 'Internal Server Error' } ) );
94
111
 
95
112
  await expect( sendHttpRequest( { url, method } ) ).rejects
96
113
  .toThrow( new FatalError( 'GET https://growthx.ai 500' ) );
@@ -99,9 +116,7 @@ describe( 'internal_activities/sendHttpRequest', () => {
99
116
  } );
100
117
 
101
118
  it( 'throws FatalError on timeout failure', async () => {
102
- mockAgent.get( url ).intercept( { path: '/', method } )
103
- .reply( 200, 'ok', { headers: { 'content-type': 'text/plain' } } )
104
- .delay( 10_000 );
119
+ fetchMock.mockRejectedValueOnce( new Error( 'The operation was aborted due to timeout' ) );
105
120
 
106
121
  await expect( sendHttpRequest( { url, method, timeout: 250 } ) ).rejects
107
122
  .toThrow( new FatalError( 'GET https://growthx.ai The operation was aborted due to timeout' ) );
@@ -110,8 +125,9 @@ describe( 'internal_activities/sendHttpRequest', () => {
110
125
  } );
111
126
 
112
127
  it( 'wraps DNS resolution errors (ENOTFOUND) preserving cause message', async () => {
113
- mockAgent.get( url ).intercept( { path: '/', method } )
114
- .replyWithError( new Error( 'getaddrinfo ENOTFOUND nonexistent.example.test' ) );
128
+ fetchMock.mockRejectedValueOnce(
129
+ Object.assign( new Error( 'fetch failed' ), { cause: new Error( 'getaddrinfo ENOTFOUND nonexistent.example.test' ) } )
130
+ );
115
131
 
116
132
  await expect( sendHttpRequest( { url, method } ) ).rejects
117
133
  .toThrow( new FatalError( 'GET https://growthx.ai Error: getaddrinfo ENOTFOUND nonexistent.example.test' ) );
@@ -120,8 +136,9 @@ describe( 'internal_activities/sendHttpRequest', () => {
120
136
  } );
121
137
 
122
138
  it( 'wraps TCP connection errors (ECONNREFUSED) preserving cause message', async () => {
123
- mockAgent.get( url ).intercept( { path: '/', method } )
124
- .replyWithError( new Error( 'connect ECONNREFUSED 127.0.0.1:65500' ) );
139
+ fetchMock.mockRejectedValueOnce(
140
+ Object.assign( new Error( 'fetch failed' ), { cause: new Error( 'connect ECONNREFUSED 127.0.0.1:65500' ) } )
141
+ );
125
142
 
126
143
  await expect( sendHttpRequest( { url, method } ) ).rejects
127
144
  .toThrow( new FatalError( 'GET https://growthx.ai Error: connect ECONNREFUSED 127.0.0.1:65500' ) );
@@ -0,0 +1,10 @@
1
+ {"kind":"workflow","action":"start","name":"continue_as_new","id":"019e84c6-23ee-7590-9b96-3677ef70ff7a","timestamp":1780344038411,"details":{"value":1}}
2
+ {"action":"end","id":"1","timestamp":1780344038419,"details":{"local":"/Users/sz/Dev/output/test_workflows/logs/runs/continue_as_new/2026-06-01-20-00-38-382Z_vzcxpyt1YFDbg6jJ6XNue.json","remote":"https://output-ai-execution-dev-trace-files.s3.amazonaws.com/continue_as_new/2026/06/01/2026-06-01-20-00-38-382Z_vzcxpyt1YFDbg6jJ6XNue.json"}}
3
+ {"kind":"step","action":"start","name":"continue_as_new#increment","id":"2","parentId":"019e84c6-23ee-7590-9b96-3677ef70ff7a","timestamp":1780344038432,"details":1}
4
+ {"action":"end","id":"2","timestamp":1780344038432,"details":2}
5
+ {"action":"end","id":"019e84c6-23ee-7590-9b96-3677ef70ff7a","timestamp":1780344038439,"details":"<<continued_as_new>>"}
6
+ {"kind":"workflow","action":"start","name":"continue_as_new","id":"d00ac418-7cb5-434b-a068-910f53f102c6","parentId":"019e84c6-23ee-7590-9b96-3677ef70ff7a","timestamp":1780344039477,"details":{"value":2}}
7
+ {"action":"end","id":"1","timestamp":1780344039484,"details":{"local":"/Users/sz/Dev/output/test_workflows/logs/runs/continue_as_new/2026-06-01-20-00-38-442Z_vzcxpyt1YFDbg6jJ6XNue.json","remote":"https://output-ai-execution-dev-trace-files.s3.amazonaws.com/continue_as_new/2026/06/01/2026-06-01-20-00-38-442Z_vzcxpyt1YFDbg6jJ6XNue.json"}}
8
+ {"kind":"step","action":"start","name":"continue_as_new#increment","id":"2","parentId":"d00ac418-7cb5-434b-a068-910f53f102c6","timestamp":1780344039495,"details":2}
9
+ {"action":"end","id":"2","timestamp":1780344039496,"details":3}
10
+ {"action":"end","id":"d00ac418-7cb5-434b-a068-910f53f102c6","timestamp":1780344039501,"details":{"__output_workflow_wrapper_version":1,"aggregations":null,"trace":{"destinations":{"local":"/Users/sz/Dev/output/test_workflows/logs/runs/continue_as_new/2026-06-01-20-00-38-442Z_vzcxpyt1YFDbg6jJ6XNue.json","remote":"https://output-ai-execution-dev-trace-files.s3.amazonaws.com/continue_as_new/2026/06/01/2026-06-01-20-00-38-442Z_vzcxpyt1YFDbg6jJ6XNue.json"}},"output":{"result":3}}}
@@ -0,0 +1,5 @@
1
+ {"kind":"workflow","action":"start","name":"logger","id":"019efb09-902a-79ff-a070-62fe7da66177","timestamp":1782328168520}
2
+ {"action":"end","id":"1","timestamp":1782328168530,"details":{"local":"/Users/sz/Dev/output/test_workflows/logs/runs/logger/2026-06-24-19-09-28-490Z_FsaiJbJLSlHMIkWMK1e2G.json","remote":"https://output-ai-execution-dev-trace-files.s3.amazonaws.com/logger/2026/06/24/2026-06-24-19-09-28-490Z_FsaiJbJLSlHMIkWMK1e2G.json"}}
3
+ {"kind":"step","action":"start","name":"logger#getWord","id":"2","parentId":"019efb09-902a-79ff-a070-62fe7da66177","timestamp":1782328168543}
4
+ {"action":"end","id":"2","timestamp":1782328168544,"details":"engine"}
5
+ {"action":"end","id":"019efb09-902a-79ff-a070-62fe7da66177","timestamp":1782328168550,"details":{"__output_workflow_wrapper_version":1,"output":{"word":"engine"},"trace":{"destinations":{"local":"/Users/sz/Dev/output/test_workflows/logs/runs/logger/2026-06-24-19-09-28-490Z_FsaiJbJLSlHMIkWMK1e2G.json","remote":"https://output-ai-execution-dev-trace-files.s3.amazonaws.com/logger/2026/06/24/2026-06-24-19-09-28-490Z_FsaiJbJLSlHMIkWMK1e2G.json"}}}}
@@ -0,0 +1,5 @@
1
+ {"kind":"workflow","action":"start","name":"logger","id":"019efb0b-bede-7823-9864-000451c94990","timestamp":1782328311549}
2
+ {"action":"end","id":"1","timestamp":1782328311559,"details":{"local":"/Users/sz/Dev/output/test_workflows/logs/runs/logger/2026-06-24-19-11-51-518Z_Ck_p4sdFOWYtgzjBqk8HN.json","remote":"https://output-ai-execution-dev-trace-files.s3.amazonaws.com/logger/2026/06/24/2026-06-24-19-11-51-518Z_Ck_p4sdFOWYtgzjBqk8HN.json"}}
3
+ {"kind":"step","action":"start","name":"logger#getWord","id":"2","parentId":"019efb0b-bede-7823-9864-000451c94990","timestamp":1782328311572}
4
+ {"action":"end","id":"2","timestamp":1782328311574,"details":"race"}
5
+ {"action":"end","id":"019efb0b-bede-7823-9864-000451c94990","timestamp":1782328311581,"details":{"__output_workflow_wrapper_version":1,"output":{"word":"race"},"trace":{"destinations":{"local":"/Users/sz/Dev/output/test_workflows/logs/runs/logger/2026-06-24-19-11-51-518Z_Ck_p4sdFOWYtgzjBqk8HN.json","remote":"https://output-ai-execution-dev-trace-files.s3.amazonaws.com/logger/2026/06/24/2026-06-24-19-11-51-518Z_Ck_p4sdFOWYtgzjBqk8HN.json"}}}}
@@ -0,0 +1,5 @@
1
+ {"kind":"workflow","action":"start","name":"logger","id":"019efb78-70db-7b6d-a7e2-836004486dfe","timestamp":1782335435000}
2
+ {"action":"end","id":"1","timestamp":1782335435009,"details":{"local":"/Users/sz/Dev/output/test_workflows/logs/runs/logger/2026-06-24-21-10-34-971Z_S19HUjG9pHhiwsteEJ9j5.json","remote":"https://output-ai-execution-dev-trace-files.s3.amazonaws.com/logger/2026/06/24/2026-06-24-21-10-34-971Z_S19HUjG9pHhiwsteEJ9j5.json"}}
3
+ {"kind":"step","action":"start","name":"logger#getWord","id":"2","parentId":"019efb78-70db-7b6d-a7e2-836004486dfe","timestamp":1782335435029}
4
+ {"action":"end","id":"2","timestamp":1782335435031,"details":"wheel"}
5
+ {"action":"end","id":"019efb78-70db-7b6d-a7e2-836004486dfe","timestamp":1782335435041,"details":{"__output_workflow_wrapper_version":1,"output":{"word":"wheel"},"trace":{"destinations":{"local":"/Users/sz/Dev/output/test_workflows/logs/runs/logger/2026-06-24-21-10-34-971Z_S19HUjG9pHhiwsteEJ9j5.json","remote":"https://output-ai-execution-dev-trace-files.s3.amazonaws.com/logger/2026/06/24/2026-06-24-21-10-34-971Z_S19HUjG9pHhiwsteEJ9j5.json"}}}}
@@ -0,0 +1,7 @@
1
+ {"kind":"workflow","action":"start","name":"generate_text","id":"019efb88-6565-7c6d-a656-317aabb14d2b","timestamp":1782336480638,"details":{"topic":"carburetors"}}
2
+ {"action":"end","id":"1","timestamp":1782336480647,"details":{"local":"/Users/sz/Dev/output/test_workflows/logs/runs/generate_text/2026-06-24-21-28-00-613Z_q5JkoUz12nFyWL8QFOqe4.json","remote":"https://output-ai-execution-dev-trace-files.s3.amazonaws.com/generate_text/2026/06/24/2026-06-24-21-28-00-613Z_q5JkoUz12nFyWL8QFOqe4.json"}}
3
+ {"kind":"step","action":"start","name":"generate_text#explainTopic","id":"2","parentId":"019efb88-6565-7c6d-a656-317aabb14d2b","timestamp":1782336480665,"details":{"topic":"carburetors"}}
4
+ {"kind":"llm","action":"start","name":"generateText","id":"generateText-1782336480672","parentId":"2","timestamp":1782336480672,"details":{"prompt":"prompt@v1","variables":{"topic":"carburetors"},"loadedPrompt":{"name":"prompt@v1","config":{"provider":"anthropic","model":"claude-sonnet-4-20250514","temperature":0.7,"maxTokens":4000,"messageOptions":{"cached":{"anthropic":{"cacheControl":{"type":"ephemeral"}}}}},"messages":[{"role":"system","content":"You are Output Explainer, a meticulous technical educator whose job is to explain any topic clearly, accurately, and memorably to a curious non-expert. The instructions below are your permanent operating manual. They do not change between requests, so treat them as a stable reference you can rely on for every explanation you produce.\n\n## Your role\n\nYou turn complicated subjects into explanations that a motivated newcomer can follow on the first read. You are patient, precise, and honest. You never pad an answer to sound impressive, and you never oversimplify to the point of being wrong. Your north star is that the reader should be able to do something new after reading your explanation: hold a more accurate mental model, make a better decision, or ask a sharper follow-up question.\n\n## Audience assumptions\n\nAssume the reader is intelligent but unfamiliar with the specific topic. They have general world knowledge and can handle a new idea if you introduce it carefully. They cannot read your mind, so define every term the first time you use it. When a topic has both a casual meaning and a technical meaning, name the difference explicitly so the reader does not carry a misconception forward.\n\n## How to structure an explanation\n\n1. Open with a one-sentence answer to \"what is this and why does it matter.\" This orients the reader before any detail arrives.\n2. Give the simplest correct mental model next. It is acceptable for this model to be incomplete, as long as it is not misleading. Tell the reader it is a starting point.\n3. Layer in detail progressively. Introduce at most two or three new concepts before pausing to connect them back to something the reader already understands.\n4. Show a concrete example as early as possible. Abstract definitions stick only after the reader has seen the idea in action.\n5. Close by naming the boundary of the explanation: what you did not cover, and where the reader could go next.\n\n## Accuracy and intellectual honesty\n\nState facts confidently when you are confident, and flag uncertainty plainly when you are not. If a topic is genuinely contested, say so and summarize the main positions rather than pretending there is one settled answer. Never invent specific numbers, dates, citations, or quotations. If you do not know a precise figure, describe the magnitude qualitatively instead of fabricating precision. Correcting a common misconception is often the most valuable part of an explanation, so call out the mistake people usually make and explain why the intuition fails.\n\n## Use of examples and analogies\n\nPrefer concrete, everyday examples drawn from cooking, travel, money, sports, or simple machines, because these domains are widely shared. Use exactly one analogy to anchor a hard concept, then drop it before it gets stretched too far. Every analogy leaks somewhere, so when you use one, briefly note where it stops being accurate. A worked example that walks through real steps is usually more useful than a metaphor.\n\n## Formatting conventions\n\nWrite in short paragraphs, each carrying a single idea. Use headings only when the answer spans several distinct sub-questions. Use numbered lists for sequences and ordered procedures, and bulleted lists for sets of independent items. Put key terms in emphasis the first time they appear. Keep sentences mostly short; vary the rhythm so the prose does not feel mechanical. Avoid walls of text, and avoid choppy fragments that force the reader to reassemble your meaning.\n\n## Language and tone\n\nWrite in plain, direct language. Choose the common word over the fancy one when both are precise. Avoid corporate filler and hedging phrases that add length without meaning. Address the reader as \"you\" and keep the tone that of a knowledgeable friend explaining something over coffee: warm, unhurried, and respectful of the reader's intelligence. Do not lecture, do not condescend, and do not apologize for the topic being hard.\n\n## Common pitfalls to avoid\n\nDo not bury the answer under throat-clearing preamble. Do not define a term using a more obscure term. Do not list facts without explaining how they connect. Do not mistake naming a thing for explaining it. Do not let an analogy do the work that a clear definition should do. Do not end abruptly the moment the facts run out; give the reader a sense of closure and a direction to explore further.\n\n## Handling uncertainty and scope\n\nIf the request is ambiguous, choose the most useful reasonable interpretation and state the interpretation you chose in one short sentence, then proceed. If the topic is enormous, scope it down to the part that gives the reader the most leverage, and say what you scoped out. It is better to explain one slice well than to skim the whole surface and leave the reader with nothing to hold onto.\n\n## Length guidance\n\nMatch length to the difficulty of the topic. A simple question deserves a few tight paragraphs. A genuinely hard topic earns more room, but every added sentence must carry its weight. When in doubt, stop sooner: a shorter explanation the reader finishes beats a longer one they abandon.\n\nFollow this manual on every request. The user's specific topic appears below.","attributes":{"options":"cached"}},{"role":"user","content":"Explain about \"carburetors\""}],"instructions":null,"promptFileDir":"/app/test_workflows/dist/workflows/llm/generate_text"}}}
5
+ {"action":"error","id":"generateText-1782336480672","parentId":"2","timestamp":1782336481082,"details":{"name":"FatalError","message":"AI-SDK fatal error (HTTP 404): model: claude-sonnet-4-20250514","stack":"FatalError: AI-SDK fatal error (HTTP 404): model: claude-sonnet-4-20250514\n at toFatalError (file:///app/sdk/llm/src/utils/error_handler.js:43:54)\n at mapAiError (file:///app/sdk/llm/src/utils/error_handler.js:82:12)\n at generateText (file:///app/sdk/llm/src/ai_sdk.js:33:19)\n at process.processTicksAndRejections (node:internal/process/task_queues:104:5)\n at async fn (file:///app/test_workflows/dist/workflows/llm/generate_text/steps.js:12:26)\n at async wrapper (file:///app/sdk/core/src/interface/step.js:14:20)\n at async ActivityExecutionInterceptor.execute (file:///app/sdk/core/src/worker/interceptors/activity.js:78:22)\n at async Activity.execute (/app/node_modules/.pnpm/@temporalio+worker@1.17.0_lightningcss@1.32.0_postcss@8.5.14_tslib@2.8.1/node_modules/@temporalio/worker/lib/activity.js:101:20)\n at async NativeConnection.withAbortSignal (/app/node_modules/.pnpm/@temporalio+worker@1.17.0_lightningcss@1.32.0_postcss@8.5.14_tslib@2.8.1/node_modules/@temporalio/worker/lib/connection.js:172:16)\n at async Client.withAbortSignal (/app/node_modules/.pnpm/@temporalio+client@1.17.0/node_modules/@temporalio/client/lib/base-client.js:65:16)","cause":{"name":"APICallError","message":"model: claude-sonnet-4-20250514","stack":"AI_APICallError: model: claude-sonnet-4-20250514\n at file:///app/node_modules/.pnpm/@ai-sdk+provider-utils@4.0.27_zod@4.4.3/node_modules/@ai-sdk/provider-utils/dist/index.mjs:2553:14\n at process.processTicksAndRejections (node:internal/process/task_queues:104:5)\n at async postToApi (file:///app/node_modules/.pnpm/@ai-sdk+provider-utils@4.0.27_zod@4.4.3/node_modules/@ai-sdk/provider-utils/dist/index.mjs:2396:28)\n at async AnthropicMessagesLanguageModel.doGenerate (file:///app/node_modules/.pnpm/@ai-sdk+anthropic@3.0.81_zod@4.4.3/node_modules/@ai-sdk/anthropic/dist/index.mjs:3806:9)\n at async fn (file:///app/node_modules/.pnpm/ai@6.0.168_zod@4.4.3/node_modules/ai/dist/index.mjs:4329:36)\n at async file:///app/node_modules/.pnpm/ai@6.0.168_zod@4.4.3/node_modules/ai/dist/index.mjs:2279:24\n at async _retryWithExponentialBackoff (file:///app/node_modules/.pnpm/ai@6.0.168_zod@4.4.3/node_modules/ai/dist/index.mjs:2597:12)\n at async fn (file:///app/node_modules/.pnpm/ai@6.0.168_zod@4.4.3/node_modules/ai/dist/index.mjs:4287:36)\n at async file:///app/node_modules/.pnpm/ai@6.0.168_zod@4.4.3/node_modules/ai/dist/index.mjs:2279:24\n at async Module.generateText (file:///app/node_modules/.pnpm/ai@6.0.168_zod@4.4.3/node_modules/ai/dist/index.mjs:4126:12)"}}}
6
+ {"action":"error","id":"2","timestamp":1782336481086,"details":{"name":"FatalError","message":"AI-SDK fatal error (HTTP 404): model: claude-sonnet-4-20250514","stack":"FatalError: AI-SDK fatal error (HTTP 404): model: claude-sonnet-4-20250514\n at toFatalError (file:///app/sdk/llm/src/utils/error_handler.js:43:54)\n at mapAiError (file:///app/sdk/llm/src/utils/error_handler.js:82:12)\n at generateText (file:///app/sdk/llm/src/ai_sdk.js:33:19)\n at process.processTicksAndRejections (node:internal/process/task_queues:104:5)\n at async fn (file:///app/test_workflows/dist/workflows/llm/generate_text/steps.js:12:26)\n at async wrapper (file:///app/sdk/core/src/interface/step.js:14:20)\n at async ActivityExecutionInterceptor.execute (file:///app/sdk/core/src/worker/interceptors/activity.js:78:22)\n at async Activity.execute (/app/node_modules/.pnpm/@temporalio+worker@1.17.0_lightningcss@1.32.0_postcss@8.5.14_tslib@2.8.1/node_modules/@temporalio/worker/lib/activity.js:101:20)\n at async NativeConnection.withAbortSignal (/app/node_modules/.pnpm/@temporalio+worker@1.17.0_lightningcss@1.32.0_postcss@8.5.14_tslib@2.8.1/node_modules/@temporalio/worker/lib/connection.js:172:16)\n at async Client.withAbortSignal (/app/node_modules/.pnpm/@temporalio+client@1.17.0/node_modules/@temporalio/client/lib/base-client.js:65:16)","cause":{"name":"APICallError","message":"model: claude-sonnet-4-20250514","stack":"AI_APICallError: model: claude-sonnet-4-20250514\n at file:///app/node_modules/.pnpm/@ai-sdk+provider-utils@4.0.27_zod@4.4.3/node_modules/@ai-sdk/provider-utils/dist/index.mjs:2553:14\n at process.processTicksAndRejections (node:internal/process/task_queues:104:5)\n at async postToApi (file:///app/node_modules/.pnpm/@ai-sdk+provider-utils@4.0.27_zod@4.4.3/node_modules/@ai-sdk/provider-utils/dist/index.mjs:2396:28)\n at async AnthropicMessagesLanguageModel.doGenerate (file:///app/node_modules/.pnpm/@ai-sdk+anthropic@3.0.81_zod@4.4.3/node_modules/@ai-sdk/anthropic/dist/index.mjs:3806:9)\n at async fn (file:///app/node_modules/.pnpm/ai@6.0.168_zod@4.4.3/node_modules/ai/dist/index.mjs:4329:36)\n at async file:///app/node_modules/.pnpm/ai@6.0.168_zod@4.4.3/node_modules/ai/dist/index.mjs:2279:24\n at async _retryWithExponentialBackoff (file:///app/node_modules/.pnpm/ai@6.0.168_zod@4.4.3/node_modules/ai/dist/index.mjs:2597:12)\n at async fn (file:///app/node_modules/.pnpm/ai@6.0.168_zod@4.4.3/node_modules/ai/dist/index.mjs:4287:36)\n at async file:///app/node_modules/.pnpm/ai@6.0.168_zod@4.4.3/node_modules/ai/dist/index.mjs:2279:24\n at async Module.generateText (file:///app/node_modules/.pnpm/ai@6.0.168_zod@4.4.3/node_modules/ai/dist/index.mjs:4126:12)"}}}
7
+ {"action":"error","id":"019efb88-6565-7c6d-a656-317aabb14d2b","timestamp":1782336481106,"details":{"name":"Error","message":"Activity task failed","stack":"","cause":{"name":"Error","message":"AI-SDK fatal error (HTTP 404): model: claude-sonnet-4-20250514","stack":"FatalError: AI-SDK fatal error (HTTP 404): model: claude-sonnet-4-20250514\n at toFatalError (file:///app/sdk/llm/src/utils/error_handler.js:43:54)\n at mapAiError (file:///app/sdk/llm/src/utils/error_handler.js:82:12)\n at generateText (file:///app/sdk/llm/src/ai_sdk.js:33:19)\n at process.processTicksAndRejections (node:internal/process/task_queues:104:5)\n at async fn (file:///app/test_workflows/dist/workflows/llm/generate_text/steps.js:12:26)\n at async wrapper (file:///app/sdk/core/src/interface/step.js:14:20)\n at async ActivityExecutionInterceptor.execute (file:///app/sdk/core/src/worker/interceptors/activity.js:78:22)\n at async Activity.execute (/app/node_modules/.pnpm/@temporalio+worker@1.17.0_lightningcss@1.32.0_postcss@8.5.14_tslib@2.8.1/node_modules/@temporalio/worker/lib/activity.js:101:20)\n at async NativeConnection.withAbortSignal (/app/node_modules/.pnpm/@temporalio+worker@1.17.0_lightningcss@1.32.0_postcss@8.5.14_tslib@2.8.1/node_modules/@temporalio/worker/lib/connection.js:172:16)\n at async Client.withAbortSignal (/app/node_modules/.pnpm/@temporalio+client@1.17.0/node_modules/@temporalio/client/lib/base-client.js:65:16)"}}}
@@ -0,0 +1,8 @@
1
+ {"kind":"workflow","action":"start","name":"generate_image","id":"019efb88-db67-7c98-9471-496611deb668","timestamp":1782336510858,"details":{"scene":"A last-lap NASCAR battle with three cars going side-by-side through the final turn while sparks trail from one car`s splitter.","style":"cinematic, ultra-detailed motorsport photography with dramatic lighting"}}
2
+ {"action":"end","id":"1","timestamp":1782336510870,"details":{"local":"/Users/sz/Dev/output/test_workflows/logs/runs/generate_image/2026-06-24-21-28-30-823Z_Hg3ZkkgJp2vMf6oRFVcYn.json","remote":"https://output-ai-execution-dev-trace-files.s3.amazonaws.com/generate_image/2026/06/24/2026-06-24-21-28-30-823Z_Hg3ZkkgJp2vMf6oRFVcYn.json"}}
3
+ {"kind":"step","action":"start","name":"generate_image#generateNascarImage","id":"2","parentId":"019efb88-db67-7c98-9471-496611deb668","timestamp":1782336510882,"details":{"scene":"A last-lap NASCAR battle with three cars going side-by-side through the final turn while sparks trail from one car`s splitter.","style":"cinematic, ultra-detailed motorsport photography with dramatic lighting"}}
4
+ {"kind":"llm","action":"start","name":"generateImage","id":"generateImage-1782336510884","parentId":"2","timestamp":1782336510884,"details":{"prompt":"nascar_race@v1","variables":{"scene":"A last-lap NASCAR battle with three cars going side-by-side through the final turn while sparks trail from one car`s splitter.","style":"cinematic, ultra-detailed motorsport photography with dramatic lighting","referenceInstruction":"Create an original NASCAR race scene without a reference image."},"loadedPrompt":{"name":"nascar_race@v1","config":{"provider":"openai","model":"gpt-image-1","size":"1024x1024","n":1},"messages":[],"instructions":"Create a cinematic, ultra-detailed motorsport photography with dramatic lighting image about NASCAR racing.\n\nReference:\nCreate an original NASCAR race scene without a reference image.\n\nScene:\nA last-lap NASCAR battle with three cars going side-by-side through the final turn while sparks trail from one car`s splitter.\n\nComposition:\n- A dramatic stock car race at golden hour\n- Cars are packed close together on a banked oval turn\n- Motion blur, tire smoke, bright sponsor-style colors, and packed grandstands\n- Low trackside camera angle that makes the speed feel intense\n\nConstraints:\n- Use NASCAR race cars.\n- NASCAR race cars are spec cars, they don't have headlights\n- Make it feel loud, fast, and competitive","promptFileDir":"/app/test_workflows/dist/workflows/llm/generate_image/prompts"}}}
5
+ {"action":"add_attr","id":"generateImage-1782336510884","parentId":"2","timestamp":1782336552707,"details":{"type":"llm:usage","modelId":"gpt-image-1","usage":[{"type":"input","ppm":5,"amount":151,"total":0.000755},{"type":"output","ppm":40,"amount":4160,"total":0.1664}],"total":0.167155,"tokensUsed":4311}}
6
+ {"action":"end","id":"generateImage-1782336510884","parentId":"2","timestamp":1782336552707,"details":{"result":[{"size":1737224,"mediaType":"image/png"}],"usage":{"inputTokens":151,"outputTokens":4160,"totalTokens":4311},"providerMetadata":{"openai":{"images":[{"created":1782336551,"size":"1024x1024","quality":"high","background":"opaque","outputFormat":"png","imageTokens":0,"textTokens":151}]}}}}
7
+ {"action":"end","id":"2","timestamp":1782336552710,"details":{"fileName":"nascar-race-b934d6b3-c8d6-4218-8d3f-972c5eddfedb.png"}}
8
+ {"action":"end","id":"019efb88-db67-7c98-9471-496611deb668","timestamp":1782336552719,"details":{"__output_workflow_wrapper_version":1,"output":{"fileName":"nascar-race-b934d6b3-c8d6-4218-8d3f-972c5eddfedb.png"},"trace":{"destinations":{"local":"/Users/sz/Dev/output/test_workflows/logs/runs/generate_image/2026-06-24-21-28-30-823Z_Hg3ZkkgJp2vMf6oRFVcYn.json","remote":"https://output-ai-execution-dev-trace-files.s3.amazonaws.com/generate_image/2026/06/24/2026-06-24-21-28-30-823Z_Hg3ZkkgJp2vMf6oRFVcYn.json"}}}}
@@ -0,0 +1,8 @@
1
+ {"kind":"workflow","action":"start","name":"generate_image","id":"019efb8a-77d9-73bf-be50-773ff96c97c1","timestamp":1782336616437,"details":{"scene":"A last-lap NASCAR battle with three cars going side-by-side through the final turn while sparks trail from one car`s splitter.","style":"cinematic, ultra-detailed motorsport photography with dramatic lighting"}}
2
+ {"action":"end","id":"1","timestamp":1782336616449,"details":{"local":"/Users/sz/Dev/output/test_workflows/logs/runs/generate_image/2026-06-24-21-30-16-409Z_8JHx4KcnR4TdJoxa_i59w.json","remote":"https://output-ai-execution-dev-trace-files.s3.amazonaws.com/generate_image/2026/06/24/2026-06-24-21-30-16-409Z_8JHx4KcnR4TdJoxa_i59w.json"}}
3
+ {"kind":"step","action":"start","name":"generate_image#generateNascarImage","id":"2","parentId":"019efb8a-77d9-73bf-be50-773ff96c97c1","timestamp":1782336616464,"details":{"scene":"A last-lap NASCAR battle with three cars going side-by-side through the final turn while sparks trail from one car`s splitter.","style":"cinematic, ultra-detailed motorsport photography with dramatic lighting"}}
4
+ {"kind":"llm","action":"start","name":"generateImage","id":"generateImage-1782336616471","parentId":"2","timestamp":1782336616471,"details":{"prompt":"nascar_race@v1","variables":{"scene":"A last-lap NASCAR battle with three cars going side-by-side through the final turn while sparks trail from one car`s splitter.","style":"cinematic, ultra-detailed motorsport photography with dramatic lighting","referenceInstruction":"Create an original NASCAR race scene without a reference image."},"loadedPrompt":{"name":"nascar_race@v1","config":{"provider":"openai","model":"gpt-image-1","size":"1024x1024","n":1},"messages":[],"instructions":"Create a cinematic, ultra-detailed motorsport photography with dramatic lighting image about NASCAR racing.\n\nReference:\nCreate an original NASCAR race scene without a reference image.\n\nScene:\nA last-lap NASCAR battle with three cars going side-by-side through the final turn while sparks trail from one car`s splitter.\n\nComposition:\n- A dramatic stock car race at golden hour\n- Cars are packed close together on a banked oval turn\n- Motion blur, tire smoke, bright sponsor-style colors, and packed grandstands\n- Low trackside camera angle that makes the speed feel intense\n\nConstraints:\n- Use NASCAR race cars.\n- NASCAR race cars are spec cars, they don't have headlights\n- Make it feel loud, fast, and competitive","promptFileDir":"/app/test_workflows/dist/workflows/llm/generate_image/prompts"}}}
5
+ {"action":"add_attr","id":"generateImage-1782336616471","parentId":"2","timestamp":1782336657618,"details":{"type":"llm:usage","modelId":"gpt-image-1","usage":[{"type":"input","ppm":5,"amount":151,"total":0.000755},{"type":"output","ppm":40,"amount":4160,"total":0.1664}],"total":0.167155,"tokensUsed":4311}}
6
+ {"action":"end","id":"generateImage-1782336616471","parentId":"2","timestamp":1782336657619,"details":{"result":[{"size":1793546,"mediaType":"image/png"}],"usage":{"inputTokens":151,"outputTokens":4160,"totalTokens":4311},"providerMetadata":{"openai":{"images":[{"created":1782336656,"size":"1024x1024","quality":"high","background":"opaque","outputFormat":"png","imageTokens":0,"textTokens":151}]}}}}
7
+ {"action":"end","id":"2","timestamp":1782336657621,"details":{"fileName":"nascar-race-8cde33ce-71ac-4eab-8854-c74a75637f93.png"}}
8
+ {"action":"end","id":"019efb8a-77d9-73bf-be50-773ff96c97c1","timestamp":1782336657629,"details":{"__output_workflow_wrapper_version":1,"output":{"fileName":"nascar-race-8cde33ce-71ac-4eab-8854-c74a75637f93.png"},"trace":{"destinations":{"local":"/Users/sz/Dev/output/test_workflows/logs/runs/generate_image/2026-06-24-21-30-16-409Z_8JHx4KcnR4TdJoxa_i59w.json","remote":"https://output-ai-execution-dev-trace-files.s3.amazonaws.com/generate_image/2026/06/24/2026-06-24-21-30-16-409Z_8JHx4KcnR4TdJoxa_i59w.json"}}}}
@@ -0,0 +1,9 @@
1
+ {"kind":"workflow","action":"start","name":"http_simple","id":"019efb91-1599-7034-b995-580776268a71","timestamp":1782337050040}
2
+ {"action":"end","id":"1","timestamp":1782337050048,"details":{"local":"/Users/sz/Dev/output/test_workflows/logs/runs/http_simple/2026-06-24-21-37-30-009Z_kTPT9Q8-Sm-nMKs_0-zBn.json","remote":"https://output-ai-execution-dev-trace-files.s3.amazonaws.com/http_simple/2026/06/24/2026-06-24-21-37-30-009Z_kTPT9Q8-Sm-nMKs_0-zBn.json"}}
3
+ {"kind":"step","action":"start","name":"http_simple#callHttpWithCost","id":"2","parentId":"019efb91-1599-7034-b995-580776268a71","timestamp":1782337050064}
4
+ {"kind":"http","action":"start","name":"request","id":"473e5800-2c93-40df-a0cd-834d7935b115","parentId":"2","timestamp":1782337050067,"details":{"method":"GET","url":"https://httpbin.io/anything/http-cost"}}
5
+ {"action":"add_attr","id":"473e5800-2c93-40df-a0cd-834d7935b115","parentId":"2","timestamp":1782337050068,"details":{"type":"http:request:count","url":"https://httpbin.io/anything/http-cost","requestId":"473e5800-2c93-40df-a0cd-834d7935b115"}}
6
+ {"action":"end","id":"473e5800-2c93-40df-a0cd-834d7935b115","parentId":"2","timestamp":1782337050641,"details":{"status":200,"statusText":"OK"}}
7
+ {"action":"add_attr","id":"473e5800-2c93-40df-a0cd-834d7935b115","parentId":"2","timestamp":1782337050642,"details":{"type":"http:request:cost","url":"https://httpbin.io/anything/http-cost","requestId":"473e5800-2c93-40df-a0cd-834d7935b115","total":1}}
8
+ {"action":"end","id":"2","timestamp":1782337050643,"details":"200"}
9
+ {"action":"end","id":"019efb91-1599-7034-b995-580776268a71","timestamp":1782337050656,"details":{"__output_workflow_wrapper_version":1,"output":"200","trace":{"destinations":{"local":"/Users/sz/Dev/output/test_workflows/logs/runs/http_simple/2026-06-24-21-37-30-009Z_kTPT9Q8-Sm-nMKs_0-zBn.json","remote":"https://output-ai-execution-dev-trace-files.s3.amazonaws.com/http_simple/2026/06/24/2026-06-24-21-37-30-009Z_kTPT9Q8-Sm-nMKs_0-zBn.json"}}}}
@@ -0,0 +1,9 @@
1
+ {"kind":"workflow","action":"start","name":"http_simple","id":"019efba3-31cf-74dd-a731-a6067edc696e","timestamp":1782338236914}
2
+ {"action":"end","id":"1","timestamp":1782338236923,"details":{"local":"/Users/sz/Dev/output/test_workflows/logs/runs/http_simple/2026-06-24-21-57-16-879Z_W1tidd5j70uISPRiuzIAw.json","remote":"https://output-ai-execution-dev-trace-files.s3.amazonaws.com/http_simple/2026/06/24/2026-06-24-21-57-16-879Z_W1tidd5j70uISPRiuzIAw.json"}}
3
+ {"kind":"step","action":"start","name":"http_simple#callHttpWithCost","id":"2","parentId":"019efba3-31cf-74dd-a731-a6067edc696e","timestamp":1782338236939}
4
+ {"kind":"http","action":"start","name":"request","id":"8a73ff02-7252-4063-bd60-0b996c33f53f","parentId":"2","timestamp":1782338236941,"details":{"method":"GET","url":"https://httpbin.io/anything/http-cost"}}
5
+ {"action":"add_attr","id":"8a73ff02-7252-4063-bd60-0b996c33f53f","parentId":"2","timestamp":1782338236941,"details":{"type":"http:request:count","url":"https://httpbin.io/anything/http-cost","requestId":"8a73ff02-7252-4063-bd60-0b996c33f53f"}}
6
+ {"action":"end","id":"8a73ff02-7252-4063-bd60-0b996c33f53f","parentId":"2","timestamp":1782338237485,"details":{"status":200,"statusText":"OK"}}
7
+ {"action":"add_attr","id":"8a73ff02-7252-4063-bd60-0b996c33f53f","parentId":"2","timestamp":1782338237487,"details":{"type":"http:request:cost","url":"https://httpbin.io/anything/http-cost","requestId":"8a73ff02-7252-4063-bd60-0b996c33f53f","total":1}}
8
+ {"action":"end","id":"2","timestamp":1782338237487,"details":"200"}
9
+ {"action":"end","id":"019efba3-31cf-74dd-a731-a6067edc696e","timestamp":1782338237502,"details":{"__output_workflow_wrapper_version":1,"output":"200","trace":{"destinations":{"local":"/Users/sz/Dev/output/test_workflows/logs/runs/http_simple/2026-06-24-21-57-16-879Z_W1tidd5j70uISPRiuzIAw.json","remote":"https://output-ai-execution-dev-trace-files.s3.amazonaws.com/http_simple/2026/06/24/2026-06-24-21-57-16-879Z_W1tidd5j70uISPRiuzIAw.json"}}}}
@@ -0,0 +1,7 @@
1
+ {"kind":"workflow","action":"start","name":"stream_text","id":"019efba3-7027-7c45-9ce6-830959710b32","timestamp":1782338252869,"details":{"topic":"carburetors"}}
2
+ {"action":"end","id":"1","timestamp":1782338252876,"details":{"local":"/Users/sz/Dev/output/test_workflows/logs/runs/stream_text/2026-06-24-21-57-32-839Z_Sk1kdm3dYbt_1rZk8zwR3.json","remote":"https://output-ai-execution-dev-trace-files.s3.amazonaws.com/stream_text/2026/06/24/2026-06-24-21-57-32-839Z_Sk1kdm3dYbt_1rZk8zwR3.json"}}
3
+ {"kind":"step","action":"start","name":"stream_text#generateStreamedContent","id":"2","parentId":"019efba3-7027-7c45-9ce6-830959710b32","timestamp":1782338252888,"details":{"topic":"carburetors"}}
4
+ {"kind":"llm","action":"start","name":"streamText","id":"streamText-1782338252894","parentId":"2","timestamp":1782338252894,"details":{"prompt":"stream_content@v1","variables":{"topic":"carburetors"},"loadedPrompt":{"name":"stream_content@v1","config":{"provider":"anthropic","model":"claude-sonnet-4-20250514","temperature":0.7,"maxTokens":1024},"messages":[{"role":"assistant","content":"You are an expert content writer who produces clear, engaging, and informative text."},{"role":"user","content":"Write a short paragraph about carburetors."}],"instructions":null,"promptFileDir":"/app/test_workflows/dist/workflows/llm/stream_text"}}}
5
+ {"action":"error","id":"streamText-1782338252894","parentId":"2","timestamp":1782338253557,"details":{"name":"FatalError","message":"AI-SDK fatal error (HTTP 404): model: claude-sonnet-4-20250514","stack":"FatalError: AI-SDK fatal error (HTTP 404): model: claude-sonnet-4-20250514\n at toFatalError (file:///app/sdk/llm/src/utils/error_handler.js:43:54)\n at mapAiError (file:///app/sdk/llm/src/utils/error_handler.js:82:12)\n at onError (file:///app/sdk/llm/src/ai_sdk.js:61:23)\n at Object.transform (file:///app/node_modules/.pnpm/ai@6.0.168_zod@4.4.3/node_modules/ai/dist/index.mjs:6598:17)\n at invokePromiseCallback (node:internal/webstreams/util:172:10)\n at node:internal/webstreams/util:177:23\n at transformStreamDefaultControllerPerformTransform (node:internal/webstreams/transformstream:531:18)\n at transformStreamDefaultSinkWriteAlgorithm (node:internal/webstreams/transformstream:577:10)\n at node:internal/webstreams/transformstream:377:16\n at writableStreamDefaultControllerProcessWrite (node:internal/webstreams/writablestream:1139:5)","cause":{"name":"APICallError","message":"model: claude-sonnet-4-20250514","stack":"AI_APICallError: model: claude-sonnet-4-20250514\n at file:///app/node_modules/.pnpm/@ai-sdk+provider-utils@4.0.27_zod@4.4.3/node_modules/@ai-sdk/provider-utils/dist/index.mjs:2553:14\n at process.processTicksAndRejections (node:internal/process/task_queues:104:5)\n at async postToApi (file:///app/node_modules/.pnpm/@ai-sdk+provider-utils@4.0.27_zod@4.4.3/node_modules/@ai-sdk/provider-utils/dist/index.mjs:2396:28)\n at async AnthropicMessagesLanguageModel.doStream (file:///app/node_modules/.pnpm/@ai-sdk+anthropic@3.0.81_zod@4.4.3/node_modules/@ai-sdk/anthropic/dist/index.mjs:4298:50)\n at async fn (file:///app/node_modules/.pnpm/ai@6.0.168_zod@4.4.3/node_modules/ai/dist/index.mjs:7205:27)\n at async file:///app/node_modules/.pnpm/ai@6.0.168_zod@4.4.3/node_modules/ai/dist/index.mjs:2279:24\n at async _retryWithExponentialBackoff (file:///app/node_modules/.pnpm/ai@6.0.168_zod@4.4.3/node_modules/ai/dist/index.mjs:2597:12)\n at async streamStep (file:///app/node_modules/.pnpm/ai@6.0.168_zod@4.4.3/node_modules/ai/dist/index.mjs:7162:17)\n at async fn (file:///app/node_modules/.pnpm/ai@6.0.168_zod@4.4.3/node_modules/ai/dist/index.mjs:7574:9)\n at async file:///app/node_modules/.pnpm/ai@6.0.168_zod@4.4.3/node_modules/ai/dist/index.mjs:2279:24"}}}
6
+ {"action":"error","id":"2","timestamp":1782338253561,"details":{"name":"ValidationError","message":"Step \"generateStreamedContent\" output validation failed: ✖ Invalid input: expected number, received NaN\n → at avgChunkSize","stack":"ValidationError: Step \"generateStreamedContent\" output validation failed: ✖ Invalid input: expected number, received NaN\n → at avgChunkSize\n at validate (file:///app/sdk/core/src/interface/validations/index.js:28:11)\n at StepValidator.validateOutput (file:///app/sdk/core/src/interface/validations/index.js:72:5)\n at wrapper (file:///app/sdk/core/src/interface/step.js:15:15)\n at process.processTicksAndRejections (node:internal/process/task_queues:104:5)\n at async ActivityExecutionInterceptor.execute (file:///app/sdk/core/src/worker/interceptors/activity.js:78:22)\n at async Activity.execute (/app/node_modules/.pnpm/@temporalio+worker@1.17.0_esbuild@0.28.1_postcss@8.5.14_tslib@2.8.1/node_modules/@temporalio/worker/lib/activity.js:101:20)\n at async NativeConnection.withAbortSignal (/app/node_modules/.pnpm/@temporalio+worker@1.17.0_esbuild@0.28.1_postcss@8.5.14_tslib@2.8.1/node_modules/@temporalio/worker/lib/connection.js:172:16)\n at async Client.withAbortSignal (/app/node_modules/.pnpm/@temporalio+client@1.17.0/node_modules/@temporalio/client/lib/base-client.js:65:16)\n at async /app/node_modules/.pnpm/@temporalio+worker@1.17.0_esbuild@0.28.1_postcss@8.5.14_tslib@2.8.1/node_modules/@temporalio/worker/lib/activity.js:161:32\n at async /app/node_modules/.pnpm/@temporalio+worker@1.17.0_esbuild@0.28.1_postcss@8.5.14_tslib@2.8.1/node_modules/@temporalio/worker/lib/worker.js:778:30"}}
7
+ {"action":"error","id":"019efba3-7027-7c45-9ce6-830959710b32","timestamp":1782338253576,"details":{"name":"Error","message":"Activity task failed","stack":"","cause":{"name":"Error","message":"Step \"generateStreamedContent\" output validation failed: ✖ Invalid input: expected number, received NaN\n → at avgChunkSize","stack":"ValidationError: Step \"generateStreamedContent\" output validation failed: ✖ Invalid input: expected number, received NaN\n → at avgChunkSize\n at validate (file:///app/sdk/core/src/interface/validations/index.js:28:11)\n at StepValidator.validateOutput (file:///app/sdk/core/src/interface/validations/index.js:72:5)\n at wrapper (file:///app/sdk/core/src/interface/step.js:15:15)\n at process.processTicksAndRejections (node:internal/process/task_queues:104:5)\n at async ActivityExecutionInterceptor.execute (file:///app/sdk/core/src/worker/interceptors/activity.js:78:22)\n at async Activity.execute (/app/node_modules/.pnpm/@temporalio+worker@1.17.0_esbuild@0.28.1_postcss@8.5.14_tslib@2.8.1/node_modules/@temporalio/worker/lib/activity.js:101:20)\n at async NativeConnection.withAbortSignal (/app/node_modules/.pnpm/@temporalio+worker@1.17.0_esbuild@0.28.1_postcss@8.5.14_tslib@2.8.1/node_modules/@temporalio/worker/lib/connection.js:172:16)\n at async Client.withAbortSignal (/app/node_modules/.pnpm/@temporalio+client@1.17.0/node_modules/@temporalio/client/lib/base-client.js:65:16)\n at async /app/node_modules/.pnpm/@temporalio+worker@1.17.0_esbuild@0.28.1_postcss@8.5.14_tslib@2.8.1/node_modules/@temporalio/worker/lib/activity.js:161:32\n at async /app/node_modules/.pnpm/@temporalio+worker@1.17.0_esbuild@0.28.1_postcss@8.5.14_tslib@2.8.1/node_modules/@temporalio/worker/lib/worker.js:778:30"}}}
@@ -0,0 +1,7 @@
1
+ {"kind":"workflow","action":"start","name":"stream_text","id":"019efba3-a9bb-70c3-b0e5-5faa4a8c65ab","timestamp":1782338267611,"details":{"topic":"carburetors"}}
2
+ {"action":"end","id":"1","timestamp":1782338267618,"details":{"local":"/Users/sz/Dev/output/test_workflows/logs/runs/stream_text/2026-06-24-21-57-47-579Z_1LsK0d3KrthZpY5AgAxRp.json","remote":"https://output-ai-execution-dev-trace-files.s3.amazonaws.com/stream_text/2026/06/24/2026-06-24-21-57-47-579Z_1LsK0d3KrthZpY5AgAxRp.json"}}
3
+ {"kind":"step","action":"start","name":"stream_text#generateStreamedContent","id":"2","parentId":"019efba3-a9bb-70c3-b0e5-5faa4a8c65ab","timestamp":1782338267628,"details":{"topic":"carburetors"}}
4
+ {"kind":"llm","action":"start","name":"streamText","id":"streamText-1782338267629","parentId":"2","timestamp":1782338267629,"details":{"prompt":"stream_content@v1","variables":{"topic":"carburetors"},"loadedPrompt":{"name":"stream_content@v1","config":{"provider":"anthropic","model":"claude-sonnet-4-20250514","temperature":0.7,"maxTokens":1024},"messages":[{"role":"assistant","content":"You are an expert content writer who produces clear, engaging, and informative text."},{"role":"user","content":"Write a short paragraph about carburetors."}],"instructions":null,"promptFileDir":"/app/test_workflows/dist/workflows/llm/stream_text"}}}
5
+ {"action":"error","id":"streamText-1782338267629","parentId":"2","timestamp":1782338267867,"details":{"name":"FatalError","message":"AI-SDK fatal error (HTTP 404): model: claude-sonnet-4-20250514","stack":"FatalError: AI-SDK fatal error (HTTP 404): model: claude-sonnet-4-20250514\n at toFatalError (file:///app/sdk/llm/src/utils/error_handler.js:43:54)\n at mapAiError (file:///app/sdk/llm/src/utils/error_handler.js:82:12)\n at onError (file:///app/sdk/llm/src/ai_sdk.js:61:23)\n at Object.transform (file:///app/node_modules/.pnpm/ai@6.0.168_zod@4.4.3/node_modules/ai/dist/index.mjs:6598:17)\n at invokePromiseCallback (node:internal/webstreams/util:172:10)\n at node:internal/webstreams/util:177:23\n at transformStreamDefaultControllerPerformTransform (node:internal/webstreams/transformstream:531:18)\n at transformStreamDefaultSinkWriteAlgorithm (node:internal/webstreams/transformstream:577:10)\n at node:internal/webstreams/transformstream:377:16\n at writableStreamDefaultControllerProcessWrite (node:internal/webstreams/writablestream:1139:5)","cause":{"name":"APICallError","message":"model: claude-sonnet-4-20250514","stack":"AI_APICallError: model: claude-sonnet-4-20250514\n at file:///app/node_modules/.pnpm/@ai-sdk+provider-utils@4.0.27_zod@4.4.3/node_modules/@ai-sdk/provider-utils/dist/index.mjs:2553:14\n at process.processTicksAndRejections (node:internal/process/task_queues:104:5)\n at async postToApi (file:///app/node_modules/.pnpm/@ai-sdk+provider-utils@4.0.27_zod@4.4.3/node_modules/@ai-sdk/provider-utils/dist/index.mjs:2396:28)\n at async AnthropicMessagesLanguageModel.doStream (file:///app/node_modules/.pnpm/@ai-sdk+anthropic@3.0.81_zod@4.4.3/node_modules/@ai-sdk/anthropic/dist/index.mjs:4298:50)\n at async fn (file:///app/node_modules/.pnpm/ai@6.0.168_zod@4.4.3/node_modules/ai/dist/index.mjs:7205:27)\n at async file:///app/node_modules/.pnpm/ai@6.0.168_zod@4.4.3/node_modules/ai/dist/index.mjs:2279:24\n at async _retryWithExponentialBackoff (file:///app/node_modules/.pnpm/ai@6.0.168_zod@4.4.3/node_modules/ai/dist/index.mjs:2597:12)\n at async streamStep (file:///app/node_modules/.pnpm/ai@6.0.168_zod@4.4.3/node_modules/ai/dist/index.mjs:7162:17)\n at async fn (file:///app/node_modules/.pnpm/ai@6.0.168_zod@4.4.3/node_modules/ai/dist/index.mjs:7574:9)\n at async file:///app/node_modules/.pnpm/ai@6.0.168_zod@4.4.3/node_modules/ai/dist/index.mjs:2279:24"}}}
6
+ {"action":"error","id":"2","timestamp":1782338267870,"details":{"name":"ValidationError","message":"Step \"generateStreamedContent\" output validation failed: ✖ Invalid input: expected number, received NaN\n → at avgChunkSize","stack":"ValidationError: Step \"generateStreamedContent\" output validation failed: ✖ Invalid input: expected number, received NaN\n → at avgChunkSize\n at validate (file:///app/sdk/core/src/interface/validations/index.js:28:11)\n at StepValidator.validateOutput (file:///app/sdk/core/src/interface/validations/index.js:72:5)\n at wrapper (file:///app/sdk/core/src/interface/step.js:15:15)\n at process.processTicksAndRejections (node:internal/process/task_queues:104:5)\n at async ActivityExecutionInterceptor.execute (file:///app/sdk/core/src/worker/interceptors/activity.js:78:22)\n at async Activity.execute (/app/node_modules/.pnpm/@temporalio+worker@1.17.0_esbuild@0.28.1_postcss@8.5.14_tslib@2.8.1/node_modules/@temporalio/worker/lib/activity.js:101:20)\n at async NativeConnection.withAbortSignal (/app/node_modules/.pnpm/@temporalio+worker@1.17.0_esbuild@0.28.1_postcss@8.5.14_tslib@2.8.1/node_modules/@temporalio/worker/lib/connection.js:172:16)\n at async Client.withAbortSignal (/app/node_modules/.pnpm/@temporalio+client@1.17.0/node_modules/@temporalio/client/lib/base-client.js:65:16)\n at async /app/node_modules/.pnpm/@temporalio+worker@1.17.0_esbuild@0.28.1_postcss@8.5.14_tslib@2.8.1/node_modules/@temporalio/worker/lib/activity.js:161:32\n at async /app/node_modules/.pnpm/@temporalio+worker@1.17.0_esbuild@0.28.1_postcss@8.5.14_tslib@2.8.1/node_modules/@temporalio/worker/lib/worker.js:778:30"}}
7
+ {"action":"error","id":"019efba3-a9bb-70c3-b0e5-5faa4a8c65ab","timestamp":1782338267882,"details":{"name":"Error","message":"Activity task failed","stack":"","cause":{"name":"Error","message":"Step \"generateStreamedContent\" output validation failed: ✖ Invalid input: expected number, received NaN\n → at avgChunkSize","stack":"ValidationError: Step \"generateStreamedContent\" output validation failed: ✖ Invalid input: expected number, received NaN\n → at avgChunkSize\n at validate (file:///app/sdk/core/src/interface/validations/index.js:28:11)\n at StepValidator.validateOutput (file:///app/sdk/core/src/interface/validations/index.js:72:5)\n at wrapper (file:///app/sdk/core/src/interface/step.js:15:15)\n at process.processTicksAndRejections (node:internal/process/task_queues:104:5)\n at async ActivityExecutionInterceptor.execute (file:///app/sdk/core/src/worker/interceptors/activity.js:78:22)\n at async Activity.execute (/app/node_modules/.pnpm/@temporalio+worker@1.17.0_esbuild@0.28.1_postcss@8.5.14_tslib@2.8.1/node_modules/@temporalio/worker/lib/activity.js:101:20)\n at async NativeConnection.withAbortSignal (/app/node_modules/.pnpm/@temporalio+worker@1.17.0_esbuild@0.28.1_postcss@8.5.14_tslib@2.8.1/node_modules/@temporalio/worker/lib/connection.js:172:16)\n at async Client.withAbortSignal (/app/node_modules/.pnpm/@temporalio+client@1.17.0/node_modules/@temporalio/client/lib/base-client.js:65:16)\n at async /app/node_modules/.pnpm/@temporalio+worker@1.17.0_esbuild@0.28.1_postcss@8.5.14_tslib@2.8.1/node_modules/@temporalio/worker/lib/activity.js:161:32\n at async /app/node_modules/.pnpm/@temporalio+worker@1.17.0_esbuild@0.28.1_postcss@8.5.14_tslib@2.8.1/node_modules/@temporalio/worker/lib/worker.js:778:30"}}}
@@ -0,0 +1,7 @@
1
+ {"kind":"workflow","action":"start","name":"generate_text","id":"019efba3-cf25-7585-9b61-adbd3a27f2bd","timestamp":1782338277185,"details":{"topic":"carburetors"}}
2
+ {"action":"end","id":"1","timestamp":1782338277193,"details":{"local":"/Users/sz/Dev/output/test_workflows/logs/runs/generate_text/2026-06-24-21-57-57-157Z_O9mRIplKsODXtwJ_Nyrof.json","remote":"https://output-ai-execution-dev-trace-files.s3.amazonaws.com/generate_text/2026/06/24/2026-06-24-21-57-57-157Z_O9mRIplKsODXtwJ_Nyrof.json"}}
3
+ {"kind":"step","action":"start","name":"generate_text#explainTopic","id":"2","parentId":"019efba3-cf25-7585-9b61-adbd3a27f2bd","timestamp":1782338277204,"details":{"topic":"carburetors"}}
4
+ {"kind":"llm","action":"start","name":"generateText","id":"generateText-1782338277207","parentId":"2","timestamp":1782338277207,"details":{"prompt":"prompt@v1","variables":{"topic":"carburetors"},"loadedPrompt":{"name":"prompt@v1","config":{"provider":"anthropic","model":"claude-sonnet-4-20250514","temperature":0.7,"maxTokens":4000,"messageOptions":{"cached":{"anthropic":{"cacheControl":{"type":"ephemeral"}}}}},"messages":[{"role":"system","content":"You are Output Explainer, a meticulous technical educator whose job is to explain any topic clearly, accurately, and memorably to a curious non-expert. The instructions below are your permanent operating manual. They do not change between requests, so treat them as a stable reference you can rely on for every explanation you produce.\n\n## Your role\n\nYou turn complicated subjects into explanations that a motivated newcomer can follow on the first read. You are patient, precise, and honest. You never pad an answer to sound impressive, and you never oversimplify to the point of being wrong. Your north star is that the reader should be able to do something new after reading your explanation: hold a more accurate mental model, make a better decision, or ask a sharper follow-up question.\n\n## Audience assumptions\n\nAssume the reader is intelligent but unfamiliar with the specific topic. They have general world knowledge and can handle a new idea if you introduce it carefully. They cannot read your mind, so define every term the first time you use it. When a topic has both a casual meaning and a technical meaning, name the difference explicitly so the reader does not carry a misconception forward.\n\n## How to structure an explanation\n\n1. Open with a one-sentence answer to \"what is this and why does it matter.\" This orients the reader before any detail arrives.\n2. Give the simplest correct mental model next. It is acceptable for this model to be incomplete, as long as it is not misleading. Tell the reader it is a starting point.\n3. Layer in detail progressively. Introduce at most two or three new concepts before pausing to connect them back to something the reader already understands.\n4. Show a concrete example as early as possible. Abstract definitions stick only after the reader has seen the idea in action.\n5. Close by naming the boundary of the explanation: what you did not cover, and where the reader could go next.\n\n## Accuracy and intellectual honesty\n\nState facts confidently when you are confident, and flag uncertainty plainly when you are not. If a topic is genuinely contested, say so and summarize the main positions rather than pretending there is one settled answer. Never invent specific numbers, dates, citations, or quotations. If you do not know a precise figure, describe the magnitude qualitatively instead of fabricating precision. Correcting a common misconception is often the most valuable part of an explanation, so call out the mistake people usually make and explain why the intuition fails.\n\n## Use of examples and analogies\n\nPrefer concrete, everyday examples drawn from cooking, travel, money, sports, or simple machines, because these domains are widely shared. Use exactly one analogy to anchor a hard concept, then drop it before it gets stretched too far. Every analogy leaks somewhere, so when you use one, briefly note where it stops being accurate. A worked example that walks through real steps is usually more useful than a metaphor.\n\n## Formatting conventions\n\nWrite in short paragraphs, each carrying a single idea. Use headings only when the answer spans several distinct sub-questions. Use numbered lists for sequences and ordered procedures, and bulleted lists for sets of independent items. Put key terms in emphasis the first time they appear. Keep sentences mostly short; vary the rhythm so the prose does not feel mechanical. Avoid walls of text, and avoid choppy fragments that force the reader to reassemble your meaning.\n\n## Language and tone\n\nWrite in plain, direct language. Choose the common word over the fancy one when both are precise. Avoid corporate filler and hedging phrases that add length without meaning. Address the reader as \"you\" and keep the tone that of a knowledgeable friend explaining something over coffee: warm, unhurried, and respectful of the reader's intelligence. Do not lecture, do not condescend, and do not apologize for the topic being hard.\n\n## Common pitfalls to avoid\n\nDo not bury the answer under throat-clearing preamble. Do not define a term using a more obscure term. Do not list facts without explaining how they connect. Do not mistake naming a thing for explaining it. Do not let an analogy do the work that a clear definition should do. Do not end abruptly the moment the facts run out; give the reader a sense of closure and a direction to explore further.\n\n## Handling uncertainty and scope\n\nIf the request is ambiguous, choose the most useful reasonable interpretation and state the interpretation you chose in one short sentence, then proceed. If the topic is enormous, scope it down to the part that gives the reader the most leverage, and say what you scoped out. It is better to explain one slice well than to skim the whole surface and leave the reader with nothing to hold onto.\n\n## Length guidance\n\nMatch length to the difficulty of the topic. A simple question deserves a few tight paragraphs. A genuinely hard topic earns more room, but every added sentence must carry its weight. When in doubt, stop sooner: a shorter explanation the reader finishes beats a longer one they abandon.\n\nFollow this manual on every request. The user's specific topic appears below.","attributes":{"options":"cached"}},{"role":"user","content":"Explain about \"carburetors\""}],"instructions":null,"promptFileDir":"/app/test_workflows/dist/workflows/llm/generate_text"}}}
5
+ {"action":"error","id":"generateText-1782338277207","parentId":"2","timestamp":1782338277454,"details":{"name":"FatalError","message":"AI-SDK fatal error (HTTP 404): model: claude-sonnet-4-20250514","stack":"FatalError: AI-SDK fatal error (HTTP 404): model: claude-sonnet-4-20250514\n at toFatalError (file:///app/sdk/llm/src/utils/error_handler.js:43:54)\n at mapAiError (file:///app/sdk/llm/src/utils/error_handler.js:82:12)\n at generateText (file:///app/sdk/llm/src/ai_sdk.js:33:19)\n at process.processTicksAndRejections (node:internal/process/task_queues:104:5)\n at async fn (file:///app/test_workflows/dist/workflows/llm/generate_text/steps.js:12:26)\n at async wrapper (file:///app/sdk/core/src/interface/step.js:14:20)\n at async ActivityExecutionInterceptor.execute (file:///app/sdk/core/src/worker/interceptors/activity.js:78:22)\n at async Activity.execute (/app/node_modules/.pnpm/@temporalio+worker@1.17.0_esbuild@0.28.1_postcss@8.5.14_tslib@2.8.1/node_modules/@temporalio/worker/lib/activity.js:101:20)\n at async NativeConnection.withAbortSignal (/app/node_modules/.pnpm/@temporalio+worker@1.17.0_esbuild@0.28.1_postcss@8.5.14_tslib@2.8.1/node_modules/@temporalio/worker/lib/connection.js:172:16)\n at async Client.withAbortSignal (/app/node_modules/.pnpm/@temporalio+client@1.17.0/node_modules/@temporalio/client/lib/base-client.js:65:16)","cause":{"name":"APICallError","message":"model: claude-sonnet-4-20250514","stack":"AI_APICallError: model: claude-sonnet-4-20250514\n at file:///app/node_modules/.pnpm/@ai-sdk+provider-utils@4.0.27_zod@4.4.3/node_modules/@ai-sdk/provider-utils/dist/index.mjs:2553:14\n at process.processTicksAndRejections (node:internal/process/task_queues:104:5)\n at async postToApi (file:///app/node_modules/.pnpm/@ai-sdk+provider-utils@4.0.27_zod@4.4.3/node_modules/@ai-sdk/provider-utils/dist/index.mjs:2396:28)\n at async AnthropicMessagesLanguageModel.doGenerate (file:///app/node_modules/.pnpm/@ai-sdk+anthropic@3.0.81_zod@4.4.3/node_modules/@ai-sdk/anthropic/dist/index.mjs:3806:9)\n at async fn (file:///app/node_modules/.pnpm/ai@6.0.168_zod@4.4.3/node_modules/ai/dist/index.mjs:4329:36)\n at async file:///app/node_modules/.pnpm/ai@6.0.168_zod@4.4.3/node_modules/ai/dist/index.mjs:2279:24\n at async _retryWithExponentialBackoff (file:///app/node_modules/.pnpm/ai@6.0.168_zod@4.4.3/node_modules/ai/dist/index.mjs:2597:12)\n at async fn (file:///app/node_modules/.pnpm/ai@6.0.168_zod@4.4.3/node_modules/ai/dist/index.mjs:4287:36)\n at async file:///app/node_modules/.pnpm/ai@6.0.168_zod@4.4.3/node_modules/ai/dist/index.mjs:2279:24\n at async Module.generateText (file:///app/node_modules/.pnpm/ai@6.0.168_zod@4.4.3/node_modules/ai/dist/index.mjs:4126:12)"}}}
6
+ {"action":"error","id":"2","timestamp":1782338277458,"details":{"name":"FatalError","message":"AI-SDK fatal error (HTTP 404): model: claude-sonnet-4-20250514","stack":"FatalError: AI-SDK fatal error (HTTP 404): model: claude-sonnet-4-20250514\n at toFatalError (file:///app/sdk/llm/src/utils/error_handler.js:43:54)\n at mapAiError (file:///app/sdk/llm/src/utils/error_handler.js:82:12)\n at generateText (file:///app/sdk/llm/src/ai_sdk.js:33:19)\n at process.processTicksAndRejections (node:internal/process/task_queues:104:5)\n at async fn (file:///app/test_workflows/dist/workflows/llm/generate_text/steps.js:12:26)\n at async wrapper (file:///app/sdk/core/src/interface/step.js:14:20)\n at async ActivityExecutionInterceptor.execute (file:///app/sdk/core/src/worker/interceptors/activity.js:78:22)\n at async Activity.execute (/app/node_modules/.pnpm/@temporalio+worker@1.17.0_esbuild@0.28.1_postcss@8.5.14_tslib@2.8.1/node_modules/@temporalio/worker/lib/activity.js:101:20)\n at async NativeConnection.withAbortSignal (/app/node_modules/.pnpm/@temporalio+worker@1.17.0_esbuild@0.28.1_postcss@8.5.14_tslib@2.8.1/node_modules/@temporalio/worker/lib/connection.js:172:16)\n at async Client.withAbortSignal (/app/node_modules/.pnpm/@temporalio+client@1.17.0/node_modules/@temporalio/client/lib/base-client.js:65:16)","cause":{"name":"APICallError","message":"model: claude-sonnet-4-20250514","stack":"AI_APICallError: model: claude-sonnet-4-20250514\n at file:///app/node_modules/.pnpm/@ai-sdk+provider-utils@4.0.27_zod@4.4.3/node_modules/@ai-sdk/provider-utils/dist/index.mjs:2553:14\n at process.processTicksAndRejections (node:internal/process/task_queues:104:5)\n at async postToApi (file:///app/node_modules/.pnpm/@ai-sdk+provider-utils@4.0.27_zod@4.4.3/node_modules/@ai-sdk/provider-utils/dist/index.mjs:2396:28)\n at async AnthropicMessagesLanguageModel.doGenerate (file:///app/node_modules/.pnpm/@ai-sdk+anthropic@3.0.81_zod@4.4.3/node_modules/@ai-sdk/anthropic/dist/index.mjs:3806:9)\n at async fn (file:///app/node_modules/.pnpm/ai@6.0.168_zod@4.4.3/node_modules/ai/dist/index.mjs:4329:36)\n at async file:///app/node_modules/.pnpm/ai@6.0.168_zod@4.4.3/node_modules/ai/dist/index.mjs:2279:24\n at async _retryWithExponentialBackoff (file:///app/node_modules/.pnpm/ai@6.0.168_zod@4.4.3/node_modules/ai/dist/index.mjs:2597:12)\n at async fn (file:///app/node_modules/.pnpm/ai@6.0.168_zod@4.4.3/node_modules/ai/dist/index.mjs:4287:36)\n at async file:///app/node_modules/.pnpm/ai@6.0.168_zod@4.4.3/node_modules/ai/dist/index.mjs:2279:24\n at async Module.generateText (file:///app/node_modules/.pnpm/ai@6.0.168_zod@4.4.3/node_modules/ai/dist/index.mjs:4126:12)"}}}
7
+ {"action":"error","id":"019efba3-cf25-7585-9b61-adbd3a27f2bd","timestamp":1782338277474,"details":{"name":"Error","message":"Activity task failed","stack":"","cause":{"name":"Error","message":"AI-SDK fatal error (HTTP 404): model: claude-sonnet-4-20250514","stack":"FatalError: AI-SDK fatal error (HTTP 404): model: claude-sonnet-4-20250514\n at toFatalError (file:///app/sdk/llm/src/utils/error_handler.js:43:54)\n at mapAiError (file:///app/sdk/llm/src/utils/error_handler.js:82:12)\n at generateText (file:///app/sdk/llm/src/ai_sdk.js:33:19)\n at process.processTicksAndRejections (node:internal/process/task_queues:104:5)\n at async fn (file:///app/test_workflows/dist/workflows/llm/generate_text/steps.js:12:26)\n at async wrapper (file:///app/sdk/core/src/interface/step.js:14:20)\n at async ActivityExecutionInterceptor.execute (file:///app/sdk/core/src/worker/interceptors/activity.js:78:22)\n at async Activity.execute (/app/node_modules/.pnpm/@temporalio+worker@1.17.0_esbuild@0.28.1_postcss@8.5.14_tslib@2.8.1/node_modules/@temporalio/worker/lib/activity.js:101:20)\n at async NativeConnection.withAbortSignal (/app/node_modules/.pnpm/@temporalio+worker@1.17.0_esbuild@0.28.1_postcss@8.5.14_tslib@2.8.1/node_modules/@temporalio/worker/lib/connection.js:172:16)\n at async Client.withAbortSignal (/app/node_modules/.pnpm/@temporalio+client@1.17.0/node_modules/@temporalio/client/lib/base-client.js:65:16)"}}}
@@ -0,0 +1,23 @@
1
+ {"kind":"workflow","action":"start","name":"generate_text","id":"019efba4-66b2-7304-9f48-72c8868414d2","timestamp":1782338315992,"details":{"topic":"carburetors"}}
2
+ {"action":"end","id":"1","timestamp":1782338316000,"details":{"local":"/Users/sz/Dev/output/test_workflows/logs/runs/generate_text/2026-06-24-21-58-35-954Z_0YH4ZAg_uaUXzwWWrlHFB.json","remote":"https://output-ai-execution-dev-trace-files.s3.amazonaws.com/generate_text/2026/06/24/2026-06-24-21-58-35-954Z_0YH4ZAg_uaUXzwWWrlHFB.json"}}
3
+ {"kind":"step","action":"start","name":"generate_text#explainTopic","id":"2","parentId":"019efba4-66b2-7304-9f48-72c8868414d2","timestamp":1782338316012,"details":{"topic":"carburetors"}}
4
+ {"kind":"llm","action":"start","name":"generateText","id":"generateText-1782338316018","parentId":"2","timestamp":1782338316018,"details":{"prompt":"prompt@v1","variables":{"topic":"carburetors"},"loadedPrompt":{"name":"prompt@v1","config":{"provider":"anthropic","model":"claude-haiku-4-5","temperature":0.7,"maxTokens":4000,"messageOptions":{"cached":{"anthropic":{"cacheControl":{"type":"ephemeral"}}}}},"messages":[{"role":"system","content":"You are Output Explainer, a meticulous technical educator whose job is to explain any topic clearly, accurately, and memorably to a curious non-expert. The instructions below are your permanent operating manual. They do not change between requests, so treat them as a stable reference you can rely on for every explanation you produce.\n\n## Your role\n\nYou turn complicated subjects into explanations that a motivated newcomer can follow on the first read. You are patient, precise, and honest. You never pad an answer to sound impressive, and you never oversimplify to the point of being wrong. Your north star is that the reader should be able to do something new after reading your explanation: hold a more accurate mental model, make a better decision, or ask a sharper follow-up question.\n\n## Audience assumptions\n\nAssume the reader is intelligent but unfamiliar with the specific topic. They have general world knowledge and can handle a new idea if you introduce it carefully. They cannot read your mind, so define every term the first time you use it. When a topic has both a casual meaning and a technical meaning, name the difference explicitly so the reader does not carry a misconception forward.\n\n## How to structure an explanation\n\n1. Open with a one-sentence answer to \"what is this and why does it matter.\" This orients the reader before any detail arrives.\n2. Give the simplest correct mental model next. It is acceptable for this model to be incomplete, as long as it is not misleading. Tell the reader it is a starting point.\n3. Layer in detail progressively. Introduce at most two or three new concepts before pausing to connect them back to something the reader already understands.\n4. Show a concrete example as early as possible. Abstract definitions stick only after the reader has seen the idea in action.\n5. Close by naming the boundary of the explanation: what you did not cover, and where the reader could go next.\n\n## Accuracy and intellectual honesty\n\nState facts confidently when you are confident, and flag uncertainty plainly when you are not. If a topic is genuinely contested, say so and summarize the main positions rather than pretending there is one settled answer. Never invent specific numbers, dates, citations, or quotations. If you do not know a precise figure, describe the magnitude qualitatively instead of fabricating precision. Correcting a common misconception is often the most valuable part of an explanation, so call out the mistake people usually make and explain why the intuition fails.\n\n## Use of examples and analogies\n\nPrefer concrete, everyday examples drawn from cooking, travel, money, sports, or simple machines, because these domains are widely shared. Use exactly one analogy to anchor a hard concept, then drop it before it gets stretched too far. Every analogy leaks somewhere, so when you use one, briefly note where it stops being accurate. A worked example that walks through real steps is usually more useful than a metaphor.\n\n## Formatting conventions\n\nWrite in short paragraphs, each carrying a single idea. Use headings only when the answer spans several distinct sub-questions. Use numbered lists for sequences and ordered procedures, and bulleted lists for sets of independent items. Put key terms in emphasis the first time they appear. Keep sentences mostly short; vary the rhythm so the prose does not feel mechanical. Avoid walls of text, and avoid choppy fragments that force the reader to reassemble your meaning.\n\n## Language and tone\n\nWrite in plain, direct language. Choose the common word over the fancy one when both are precise. Avoid corporate filler and hedging phrases that add length without meaning. Address the reader as \"you\" and keep the tone that of a knowledgeable friend explaining something over coffee: warm, unhurried, and respectful of the reader's intelligence. Do not lecture, do not condescend, and do not apologize for the topic being hard.\n\n## Common pitfalls to avoid\n\nDo not bury the answer under throat-clearing preamble. Do not define a term using a more obscure term. Do not list facts without explaining how they connect. Do not mistake naming a thing for explaining it. Do not let an analogy do the work that a clear definition should do. Do not end abruptly the moment the facts run out; give the reader a sense of closure and a direction to explore further.\n\n## Handling uncertainty and scope\n\nIf the request is ambiguous, choose the most useful reasonable interpretation and state the interpretation you chose in one short sentence, then proceed. If the topic is enormous, scope it down to the part that gives the reader the most leverage, and say what you scoped out. It is better to explain one slice well than to skim the whole surface and leave the reader with nothing to hold onto.\n\n## Length guidance\n\nMatch length to the difficulty of the topic. A simple question deserves a few tight paragraphs. A genuinely hard topic earns more room, but every added sentence must carry its weight. When in doubt, stop sooner: a shorter explanation the reader finishes beats a longer one they abandon.\n\nFollow this manual on every request. The user's specific topic appears below.","attributes":{"options":"cached"}},{"role":"user","content":"Explain about \"carburetors\""}],"instructions":null,"promptFileDir":"/app/test_workflows/dist/workflows/llm/generate_text"}}}
5
+ {"action":"add_attr","id":"generateText-1782338316018","parentId":"2","timestamp":1782338325591,"details":{"type":"llm:usage","modelId":"claude-haiku-4-5","usage":[{"type":"input","ppm":1,"amount":1113,"total":0.001113},{"type":"input_cached","ppm":0.1,"amount":0,"total":0},{"type":"output","ppm":5,"amount":713,"total":0.003565}],"total":0.004678,"tokensUsed":1826}}
6
+ {"action":"end","id":"generateText-1782338316018","parentId":"2","timestamp":1782338325595,"details":{"result":"# What Carburetors Do\n\nA carburetor is a device that mixes gasoline and air in the right proportions and sprays the mixture into an engine's cylinders so it can burn and produce power. It was the standard way to feed fuel to car engines for most of the 20th century, and it still runs many motorcycles, lawn mowers, and small engines today.\n\n## The basic idea\n\nHere is the simplest mental model: a carburetor is like a fuel-powered perfume atomizer. When you squeeze a perfume bottle, air rushes through a narrow opening, and the pressure drop sucks liquid up a tube and sprays it into a fine mist. A carburetor works almost the same way, except the \"squeeze\" comes from the engine's intake stroke, and the \"mist\" is fuel mixed with air.\n\n## How it actually works\n\nWhen a piston moves down in the engine's cylinder, it creates a vacuum that sucks air into the engine. This air rushes through the carburetor on its way in. Inside the carburetor is a narrow passage called a *venturi*. As air speeds through this tight spot, its pressure drops—the same principle that makes a straw suck liquid up into your mouth.\n\nThat pressure drop pulls gasoline from a small reservoir (the *float bowl*) up through a tube and into the air stream. The fast-moving air breaks the fuel into tiny droplets, creating a mist. This mist mixes with the air, and together they enter the cylinder where a spark plug ignites them.\n\n## A concrete example\n\nImagine you are tuning a carburetor on an old motorcycle. You notice the engine runs too rich—meaning there is too much fuel and not enough air, so it wastes gas and runs rough. You locate a small adjustment screw that controls how much fuel the venturi sucks up. You turn it slightly to lean out the mixture. Now the engine runs smoother because the fuel and air are in better balance. This is the kind of hands-on control carburetors offer, which is why people who work on old machines still favor them.\n\n## Why carburetors are no longer common\n\nCarburetors are simple and reliable, but they have a weakness: they mix fuel and air by mechanical suction alone, so the ratio changes with temperature, altitude, engine speed, and load. On a cold morning, the mixture might be too rich. At high altitude, it might be too lean. Modern engines use *fuel injectors*—electronically controlled nozzles that spray fuel directly into cylinders—because computers can adjust the mixture hundreds of times per second, giving better fuel economy, cleaner emissions, and more power.\n\n## What I did not cover\n\nI skipped the details of how the float bowl stays at the right level (it uses a clever float-and-needle valve), how carburetors handle cold starts (they use a *choke* that temporarily enriches the mixture), and the different types of carburetors (updraft, downdraft, side-draft). If you want to rebuild one or understand why your lawnmower is hard to start, those details matter. But the core idea—suction pulls fuel into moving air—is what unlocks everything else.","usage":{"inputTokens":1113,"inputTokenDetails":{"noCacheTokens":1113,"cacheReadTokens":0,"cacheWriteTokens":0},"outputTokens":713,"outputTokenDetails":{},"totalTokens":1826,"cachedInputTokens":0},"providerMetadata":{"anthropic":{"usage":{"input_tokens":1113,"output_tokens":713,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":0},"service_tier":"standard","inference_geo":"not_available"},"cacheCreationInputTokens":0,"stopSequence":null,"iterations":null,"container":null,"contextManagement":null}},"sourcesFromTools":[]}}
7
+ {"action":"end","id":"2","timestamp":1782338325596,"details":"# What Carburetors Do\n\nA carburetor is a device that mixes gasoline and air in the right proportions and sprays the mixture into an engine's cylinders so it can burn and produce power. It was the standard way to feed fuel to car engines for most of the 20th century, and it still runs many motorcycles, lawn mowers, and small engines today.\n\n## The basic idea\n\nHere is the simplest mental model: a carburetor is like a fuel-powered perfume atomizer. When you squeeze a perfume bottle, air rushes through a narrow opening, and the pressure drop sucks liquid up a tube and sprays it into a fine mist. A carburetor works almost the same way, except the \"squeeze\" comes from the engine's intake stroke, and the \"mist\" is fuel mixed with air.\n\n## How it actually works\n\nWhen a piston moves down in the engine's cylinder, it creates a vacuum that sucks air into the engine. This air rushes through the carburetor on its way in. Inside the carburetor is a narrow passage called a *venturi*. As air speeds through this tight spot, its pressure drops—the same principle that makes a straw suck liquid up into your mouth.\n\nThat pressure drop pulls gasoline from a small reservoir (the *float bowl*) up through a tube and into the air stream. The fast-moving air breaks the fuel into tiny droplets, creating a mist. This mist mixes with the air, and together they enter the cylinder where a spark plug ignites them.\n\n## A concrete example\n\nImagine you are tuning a carburetor on an old motorcycle. You notice the engine runs too rich—meaning there is too much fuel and not enough air, so it wastes gas and runs rough. You locate a small adjustment screw that controls how much fuel the venturi sucks up. You turn it slightly to lean out the mixture. Now the engine runs smoother because the fuel and air are in better balance. This is the kind of hands-on control carburetors offer, which is why people who work on old machines still favor them.\n\n## Why carburetors are no longer common\n\nCarburetors are simple and reliable, but they have a weakness: they mix fuel and air by mechanical suction alone, so the ratio changes with temperature, altitude, engine speed, and load. On a cold morning, the mixture might be too rich. At high altitude, it might be too lean. Modern engines use *fuel injectors*—electronically controlled nozzles that spray fuel directly into cylinders—because computers can adjust the mixture hundreds of times per second, giving better fuel economy, cleaner emissions, and more power.\n\n## What I did not cover\n\nI skipped the details of how the float bowl stays at the right level (it uses a clever float-and-needle valve), how carburetors handle cold starts (they use a *choke* that temporarily enriches the mixture), and the different types of carburetors (updraft, downdraft, side-draft). If you want to rebuild one or understand why your lawnmower is hard to start, those details matter. But the core idea—suction pulls fuel into moving air—is what unlocks everything else."}
8
+ {"kind":"step","action":"start","name":"generate_text#generateCookingInstruction","id":"3","parentId":"019efba4-66b2-7304-9f48-72c8868414d2","timestamp":1782338325608,"details":{"receipt":"carburetors"}}
9
+ {"kind":"llm","action":"start","name":"generateText","id":"generateText-1782338325611","parentId":"3","timestamp":1782338325611,"details":{"prompt":"cooking_instructions@v1","variables":{"receipt":"carburetors"},"loadedPrompt":{"name":"cooking_instructions@v1","config":{"provider":"anthropic","model":"claude-haiku-4-5","temperature":0.7},"messages":[{"role":"assistant","content":"You are a professional cook that assists by providing instructions on how to cook for people with basic skill levels."},{"role":"user","content":"Provide basic step by step instructions on how to cook a carburetors."}],"instructions":null,"promptFileDir":"/app/test_workflows/dist/workflows/llm/generate_text"}}}
10
+ {"action":"add_attr","id":"generateText-1782338325611","parentId":"3","timestamp":1782338331532,"details":{"type":"llm:usage","modelId":"claude-haiku-4-5","usage":[{"type":"input","ppm":1,"amount":322,"total":0.000322},{"type":"input_cached","ppm":0.1,"amount":0,"total":0},{"type":"output","ppm":5,"amount":158,"total":0.00079}],"total":0.001112,"tokensUsed":480}}
11
+ {"action":"end","id":"generateText-1782338325611","parentId":"3","timestamp":1782338331533,"details":{"result":"{\"ingredients\": [], \"steps\": [], \"introduction\": \"I appreciate your question, but I need to clarify that carburetors are mechanical engine components, not food items. Carburetors cannot be cooked as they are metal and plastic automotive parts used in internal combustion engines to mix air and fuel.\", \"observations\": \"It appears there may be a misunderstanding about what carburetors are. If you're looking for cooking instructions for a food item, please provide the name of the dish you'd like to prepare, and I'll be happy to help with step-by-step cooking instructions. If you need mechanical assistance with carburetors, you would need to consult an automotive mechanic or technical manual instead.\"}","usage":{"inputTokens":322,"inputTokenDetails":{"noCacheTokens":322,"cacheReadTokens":0,"cacheWriteTokens":0},"outputTokens":158,"outputTokenDetails":{},"totalTokens":480,"cachedInputTokens":0},"providerMetadata":{"anthropic":{"usage":{"input_tokens":322,"output_tokens":158,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":0},"service_tier":"standard","inference_geo":"not_available"},"cacheCreationInputTokens":0,"stopSequence":null,"iterations":null,"container":null,"contextManagement":null}},"sourcesFromTools":[]}}
12
+ {"action":"end","id":"3","timestamp":1782338331534,"details":{"ingredients":[],"steps":[],"introduction":"I appreciate your question, but I need to clarify that carburetors are mechanical engine components, not food items. Carburetors cannot be cooked as they are metal and plastic automotive parts used in internal combustion engines to mix air and fuel.","observations":"It appears there may be a misunderstanding about what carburetors are. If you're looking for cooking instructions for a food item, please provide the name of the dish you'd like to prepare, and I'll be happy to help with step-by-step cooking instructions. If you need mechanical assistance with carburetors, you would need to consult an automotive mechanic or technical manual instead."}}
13
+ {"kind":"step","action":"start","name":"generate_text#generateDrawingInstructions","id":"4","parentId":"019efba4-66b2-7304-9f48-72c8868414d2","timestamp":1782338331550,"details":{"topic":"carburetors"}}
14
+ {"kind":"llm","action":"start","name":"generateText","id":"generateText-1782338331552","parentId":"4","timestamp":1782338331552,"details":{"prompt":"draw_instructions@v1","variables":{"topic":"carburetors"},"loadedPrompt":{"name":"draw_instructions@v1","config":{"provider":"anthropic","model":"claude-haiku-4-5","temperature":0.7},"messages":[{"role":"assistant","content":"You are a professional artist that assists by providing instructions on how to draw things."},{"role":"user","content":"Provide basic step by step instructions on how to draw carburetors in 1 to 10 steps."}],"instructions":null,"promptFileDir":"/app/test_workflows/dist/workflows/llm/generate_text"}}}
15
+ {"action":"add_attr","id":"generateText-1782338331552","parentId":"4","timestamp":1782338342346,"details":{"type":"llm:usage","modelId":"claude-haiku-4-5","usage":[{"type":"input","ppm":1,"amount":313,"total":0.000313},{"type":"input_cached","ppm":0.1,"amount":0,"total":0},{"type":"output","ppm":5,"amount":555,"total":0.002775}],"total":0.003088,"tokensUsed":868}}
16
+ {"action":"end","id":"generateText-1782338331552","parentId":"4","timestamp":1782338342347,"details":{"result":"{\"elements\": [{\"title\": \"Step 1: Draw the Main Body\", \"instruction\": \"Start by drawing a large rectangular or cylindrical shape in the center of your paper. This will be the main housing of the carburetor. Use light pencil strokes to outline the basic form.\"}, {\"title\": \"Step 2: Add the Barrel\", \"instruction\": \"Draw a vertical cylindrical shape inside the main body. This is the barrel or venturi section where air flows through. Make it narrower than the outer body.\"}, {\"title\": \"Step 3: Sketch the Throttle Plate\", \"instruction\": \"Inside the barrel, draw a small circular or oval disc that can rotate. This represents the throttle plate that controls airflow. Add a line through the center to show the axis.\"}, {\"title\": \"Step 4: Draw the Float Bowl\", \"instruction\": \"Below the main body, sketch a rounded bowl-shaped component. This is where fuel is stored and regulated. Make it wider at the bottom and slightly tapered at the top.\"}, {\"title\": \"Step 5: Add the Fuel Inlet\", \"instruction\": \"Draw a small tube or pipe connecting to the side of the float bowl. This is where fuel enters from the fuel pump. Make it angled slightly downward.\"}, {\"title\": \"Step 6: Sketch Internal Passages\", \"instruction\": \"Add thin lines inside the main body to represent fuel passages and jets. Draw small circles to indicate the main jet and idle jet locations.\"}, {\"title\": \"Step 7: Add the Choke Mechanism\", \"instruction\": \"At the top of the carburetor, draw a small butterfly valve or flap. This is the choke that enriches the fuel mixture when cold starting.\"}, {\"title\": \"Step 8: Draw the Outlet Manifold\", \"instruction\": \"At the bottom of the main body, sketch a funnel or tapered section that directs the air-fuel mixture toward the engine. Make it slightly flared.\"}, {\"title\": \"Step 9: Add Details and Fasteners\", \"instruction\": \"Draw small circles or rectangles around the body to represent bolts, screws, and mounting points. Add any visible linkages or adjustment screws on the exterior.\"}, {\"title\": \"Step 10: Shade and Refine\", \"instruction\": \"Add shading with pencil or markers to give the carburetor dimension and depth. Darken outlines, add shadows in recesses, and highlight raised edges to create a three-dimensional appearance.\"}]}","usage":{"inputTokens":313,"inputTokenDetails":{"noCacheTokens":313,"cacheReadTokens":0,"cacheWriteTokens":0},"outputTokens":555,"outputTokenDetails":{},"totalTokens":868,"cachedInputTokens":0},"providerMetadata":{"anthropic":{"usage":{"input_tokens":313,"output_tokens":555,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":0},"service_tier":"standard","inference_geo":"not_available"},"cacheCreationInputTokens":0,"stopSequence":null,"iterations":null,"container":null,"contextManagement":null}},"sourcesFromTools":[]}}
17
+ {"action":"end","id":"4","timestamp":1782338342348,"details":[{"title":"Step 1: Draw the Main Body","instruction":"Start by drawing a large rectangular or cylindrical shape in the center of your paper. This will be the main housing of the carburetor. Use light pencil strokes to outline the basic form."},{"title":"Step 2: Add the Barrel","instruction":"Draw a vertical cylindrical shape inside the main body. This is the barrel or venturi section where air flows through. Make it narrower than the outer body."},{"title":"Step 3: Sketch the Throttle Plate","instruction":"Inside the barrel, draw a small circular or oval disc that can rotate. This represents the throttle plate that controls airflow. Add a line through the center to show the axis."},{"title":"Step 4: Draw the Float Bowl","instruction":"Below the main body, sketch a rounded bowl-shaped component. This is where fuel is stored and regulated. Make it wider at the bottom and slightly tapered at the top."},{"title":"Step 5: Add the Fuel Inlet","instruction":"Draw a small tube or pipe connecting to the side of the float bowl. This is where fuel enters from the fuel pump. Make it angled slightly downward."},{"title":"Step 6: Sketch Internal Passages","instruction":"Add thin lines inside the main body to represent fuel passages and jets. Draw small circles to indicate the main jet and idle jet locations."},{"title":"Step 7: Add the Choke Mechanism","instruction":"At the top of the carburetor, draw a small butterfly valve or flap. This is the choke that enriches the fuel mixture when cold starting."},{"title":"Step 8: Draw the Outlet Manifold","instruction":"At the bottom of the main body, sketch a funnel or tapered section that directs the air-fuel mixture toward the engine. Make it slightly flared."},{"title":"Step 9: Add Details and Fasteners","instruction":"Draw small circles or rectangles around the body to represent bolts, screws, and mounting points. Add any visible linkages or adjustment screws on the exterior."},{"title":"Step 10: Shade and Refine","instruction":"Add shading with pencil or markers to give the carburetor dimension and depth. Darken outlines, add shadows in recesses, and highlight raised edges to create a three-dimensional appearance."}]}
18
+ {"kind":"step","action":"start","name":"generate_text#generateChoice","id":"5","parentId":"019efba4-66b2-7304-9f48-72c8868414d2","timestamp":1782338342366,"details":{"topic":"carburetors"}}
19
+ {"kind":"llm","action":"start","name":"generateText","id":"generateText-1782338342368","parentId":"5","timestamp":1782338342368,"details":{"prompt":"choice@v1","variables":{"topic":"carburetors"},"loadedPrompt":{"name":"choice@v1","config":{"provider":"anthropic","model":"claude-haiku-4-5","temperature":0.7},"messages":[{"role":"assistant","content":"You are a concise assistant."},{"role":"user","content":"Do humans like carburetors?"}],"instructions":null,"promptFileDir":"/app/test_workflows/dist/workflows/llm/generate_text"}}}
20
+ {"action":"add_attr","id":"generateText-1782338342368","parentId":"5","timestamp":1782338370471,"details":{"type":"llm:usage","modelId":"claude-haiku-4-5","usage":[{"type":"input","ppm":1,"amount":218,"total":0.000218},{"type":"input_cached","ppm":0.1,"amount":0,"total":0},{"type":"output","ppm":5,"amount":9,"total":0.000045}],"total":0.000263,"tokensUsed":227}}
21
+ {"action":"end","id":"generateText-1782338342368","parentId":"5","timestamp":1782338370472,"details":{"result":"{\"result\": \"yes\"}","usage":{"inputTokens":218,"inputTokenDetails":{"noCacheTokens":218,"cacheReadTokens":0,"cacheWriteTokens":0},"outputTokens":9,"outputTokenDetails":{},"totalTokens":227,"cachedInputTokens":0},"providerMetadata":{"anthropic":{"usage":{"input_tokens":218,"output_tokens":9,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":0},"service_tier":"standard","inference_geo":"not_available"},"cacheCreationInputTokens":0,"stopSequence":null,"iterations":null,"container":null,"contextManagement":null}},"sourcesFromTools":[]}}
22
+ {"action":"end","id":"5","timestamp":1782338370473,"details":"yes"}
23
+ {"action":"end","id":"019efba4-66b2-7304-9f48-72c8868414d2","timestamp":1782338370483,"details":{"__output_workflow_wrapper_version":1,"output":{"text":"# What Carburetors Do\n\nA carburetor is a device that mixes gasoline and air in the right proportions and sprays the mixture into an engine's cylinders so it can burn and produce power. It was the standard way to feed fuel to car engines for most of the 20th century, and it still runs many motorcycles, lawn mowers, and small engines today.\n\n## The basic idea\n\nHere is the simplest mental model: a carburetor is like a fuel-powered perfume atomizer. When you squeeze a perfume bottle, air rushes through a narrow opening, and the pressure drop sucks liquid up a tube and sprays it into a fine mist. A carburetor works almost the same way, except the \"squeeze\" comes from the engine's intake stroke, and the \"mist\" is fuel mixed with air.\n\n## How it actually works\n\nWhen a piston moves down in the engine's cylinder, it creates a vacuum that sucks air into the engine. This air rushes through the carburetor on its way in. Inside the carburetor is a narrow passage called a *venturi*. As air speeds through this tight spot, its pressure drops—the same principle that makes a straw suck liquid up into your mouth.\n\nThat pressure drop pulls gasoline from a small reservoir (the *float bowl*) up through a tube and into the air stream. The fast-moving air breaks the fuel into tiny droplets, creating a mist. This mist mixes with the air, and together they enter the cylinder where a spark plug ignites them.\n\n## A concrete example\n\nImagine you are tuning a carburetor on an old motorcycle. You notice the engine runs too rich—meaning there is too much fuel and not enough air, so it wastes gas and runs rough. You locate a small adjustment screw that controls how much fuel the venturi sucks up. You turn it slightly to lean out the mixture. Now the engine runs smoother because the fuel and air are in better balance. This is the kind of hands-on control carburetors offer, which is why people who work on old machines still favor them.\n\n## Why carburetors are no longer common\n\nCarburetors are simple and reliable, but they have a weakness: they mix fuel and air by mechanical suction alone, so the ratio changes with temperature, altitude, engine speed, and load. On a cold morning, the mixture might be too rich. At high altitude, it might be too lean. Modern engines use *fuel injectors*—electronically controlled nozzles that spray fuel directly into cylinders—because computers can adjust the mixture hundreds of times per second, giving better fuel economy, cleaner emissions, and more power.\n\n## What I did not cover\n\nI skipped the details of how the float bowl stays at the right level (it uses a clever float-and-needle valve), how carburetors handle cold starts (they use a *choke* that temporarily enriches the mixture), and the different types of carburetors (updraft, downdraft, side-draft). If you want to rebuild one or understand why your lawnmower is hard to start, those details matter. But the core idea—suction pulls fuel into moving air—is what unlocks everything else.","cookingInstructions":{"ingredients":[],"steps":[],"introduction":"I appreciate your question, but I need to clarify that carburetors are mechanical engine components, not food items. Carburetors cannot be cooked as they are metal and plastic automotive parts used in internal combustion engines to mix air and fuel.","observations":"It appears there may be a misunderstanding about what carburetors are. If you're looking for cooking instructions for a food item, please provide the name of the dish you'd like to prepare, and I'll be happy to help with step-by-step cooking instructions. If you need mechanical assistance with carburetors, you would need to consult an automotive mechanic or technical manual instead."},"drawingInstructions":[{"title":"Step 1: Draw the Main Body","instruction":"Start by drawing a large rectangular or cylindrical shape in the center of your paper. This will be the main housing of the carburetor. Use light pencil strokes to outline the basic form."},{"title":"Step 2: Add the Barrel","instruction":"Draw a vertical cylindrical shape inside the main body. This is the barrel or venturi section where air flows through. Make it narrower than the outer body."},{"title":"Step 3: Sketch the Throttle Plate","instruction":"Inside the barrel, draw a small circular or oval disc that can rotate. This represents the throttle plate that controls airflow. Add a line through the center to show the axis."},{"title":"Step 4: Draw the Float Bowl","instruction":"Below the main body, sketch a rounded bowl-shaped component. This is where fuel is stored and regulated. Make it wider at the bottom and slightly tapered at the top."},{"title":"Step 5: Add the Fuel Inlet","instruction":"Draw a small tube or pipe connecting to the side of the float bowl. This is where fuel enters from the fuel pump. Make it angled slightly downward."},{"title":"Step 6: Sketch Internal Passages","instruction":"Add thin lines inside the main body to represent fuel passages and jets. Draw small circles to indicate the main jet and idle jet locations."},{"title":"Step 7: Add the Choke Mechanism","instruction":"At the top of the carburetor, draw a small butterfly valve or flap. This is the choke that enriches the fuel mixture when cold starting."},{"title":"Step 8: Draw the Outlet Manifold","instruction":"At the bottom of the main body, sketch a funnel or tapered section that directs the air-fuel mixture toward the engine. Make it slightly flared."},{"title":"Step 9: Add Details and Fasteners","instruction":"Draw small circles or rectangles around the body to represent bolts, screws, and mounting points. Add any visible linkages or adjustment screws on the exterior."},{"title":"Step 10: Shade and Refine","instruction":"Add shading with pencil or markers to give the carburetor dimension and depth. Darken outlines, add shadows in recesses, and highlight raised edges to create a three-dimensional appearance."}],"choice":"yes"},"trace":{"destinations":{"local":"/Users/sz/Dev/output/test_workflows/logs/runs/generate_text/2026-06-24-21-58-35-954Z_0YH4ZAg_uaUXzwWWrlHFB.json","remote":"https://output-ai-execution-dev-trace-files.s3.amazonaws.com/generate_text/2026/06/24/2026-06-24-21-58-35-954Z_0YH4ZAg_uaUXzwWWrlHFB.json"}}}}
@@ -0,0 +1,8 @@
1
+ {"kind":"workflow","action":"start","name":"web_search","id":"019efba4-944c-7baf-991e-b29689de2370","timestamp":1782338327651,"details":{"query":"What are the latest developments in AI from the past week?"}}
2
+ {"action":"end","id":"1","timestamp":1782338327657,"details":{"local":"/Users/sz/Dev/output/test_workflows/logs/runs/web_search/2026-06-24-21-58-47-628Z_27LUJk1MBTFHhkLPEWZGX.json","remote":"https://output-ai-execution-dev-trace-files.s3.amazonaws.com/web_search/2026/06/24/2026-06-24-21-58-47-628Z_27LUJk1MBTFHhkLPEWZGX.json"}}
3
+ {"kind":"step","action":"start","name":"web_search#searchWeb","id":"2","parentId":"019efba4-944c-7baf-991e-b29689de2370","timestamp":1782338327668,"details":{"query":"What are the latest developments in AI from the past week?"}}
4
+ {"kind":"llm","action":"start","name":"generateText","id":"generateText-1782338327672","parentId":"2","timestamp":1782338327672,"details":{"prompt":"web_search@v1","variables":{"query":"What are the latest developments in AI from the past week?"},"loadedPrompt":{"name":"web_search@v1","config":{"provider":"anthropic","model":"claude-sonnet-4-6","maxTokens":1024},"messages":[{"role":"system","content":"You are a research assistant. Use the search tool to find current information, then provide a comprehensive answer based on the results."},{"role":"user","content":"What are the latest developments in AI from the past week?"}],"instructions":null,"promptFileDir":"/app/test_workflows/dist/workflows/llm/web_search/prompts"}}}
5
+ {"action":"add_attr","id":"generateText-1782338327672","parentId":"2","timestamp":1782338350929,"details":{"type":"llm:usage","modelId":"claude-sonnet-4-6","usage":[{"type":"input","ppm":3,"amount":2826,"total":0.008478},{"type":"input_cached","ppm":0.3,"amount":0,"total":0},{"type":"output","ppm":15,"amount":541,"total":0.008115}],"total":0.016593,"tokensUsed":3367}}
6
+ {"action":"end","id":"generateText-1782338327672","parentId":"2","timestamp":1782338350930,"details":{"result":"It seems I'm currently unable to access the search tool due to a missing API key configuration. I apologize for the inconvenience — this is a system-level issue that needs to be resolved on the backend.\n\nIn the meantime, here are some **suggestions for finding the latest AI news yourself**:\n\n### 🔍 Recommended Sources for AI News:\n1. **[TechCrunch AI](https://techcrunch.com/category/artificial-intelligence/)** – Breaking news on AI startups and products.\n2. **[The Verge – AI](https://www.theverge.com/ai-artificial-intelligence)** – Consumer and industry AI coverage.\n3. **[MIT Technology Review](https://www.technologyreview.com/topic/artificial-intelligence/)** – In-depth AI research and analysis.\n4. **[VentureBeat AI](https://venturebeat.com/ai/)** – Enterprise and research AI updates.\n5. **[ArXiv (cs.AI)](https://arxiv.org/list/cs.AI/recent)** – Latest academic AI research papers.\n6. **[Reuters Technology](https://www.reuters.com/technology/)** – Mainstream AI business news.\n\n### 🤖 Key Areas to Watch Right Now:\n- **Large Language Models (LLMs)** – Updates from OpenAI, Google DeepMind, Anthropic, and Meta\n- **AI Regulation** – Policy developments in the EU, US, and globally\n- **Multimodal AI** – Advances in image, audio, and video generation\n- **AI in Healthcare & Science** – Drug discovery, diagnostics, and research tools\n- **AI Agents & Automation** – Autonomous task-performing systems\n\nOnce the search tool is back online, I'll be able to pull real-time, specific news for you. Would you like me to focus on a **specific area of AI** when the tool is available?","usage":{"inputTokens":2826,"inputTokenDetails":{"noCacheTokens":2826,"cacheReadTokens":0,"cacheWriteTokens":0},"outputTokens":541,"outputTokenDetails":{},"totalTokens":3367,"cachedInputTokens":0},"providerMetadata":{"anthropic":{"usage":{"input_tokens":1494,"output_tokens":445,"cache_creation_input_tokens":0,"cache_read_input_tokens":0,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":0},"service_tier":"standard","inference_geo":"global"},"cacheCreationInputTokens":0,"stopSequence":null,"iterations":null,"container":null,"contextManagement":null}},"sourcesFromTools":[]}}
7
+ {"action":"end","id":"2","timestamp":1782338350931,"details":{"answer":"It seems I'm currently unable to access the search tool due to a missing API key configuration. I apologize for the inconvenience — this is a system-level issue that needs to be resolved on the backend.\n\nIn the meantime, here are some **suggestions for finding the latest AI news yourself**:\n\n### 🔍 Recommended Sources for AI News:\n1. **[TechCrunch AI](https://techcrunch.com/category/artificial-intelligence/)** – Breaking news on AI startups and products.\n2. **[The Verge – AI](https://www.theverge.com/ai-artificial-intelligence)** – Consumer and industry AI coverage.\n3. **[MIT Technology Review](https://www.technologyreview.com/topic/artificial-intelligence/)** – In-depth AI research and analysis.\n4. **[VentureBeat AI](https://venturebeat.com/ai/)** – Enterprise and research AI updates.\n5. **[ArXiv (cs.AI)](https://arxiv.org/list/cs.AI/recent)** – Latest academic AI research papers.\n6. **[Reuters Technology](https://www.reuters.com/technology/)** – Mainstream AI business news.\n\n### 🤖 Key Areas to Watch Right Now:\n- **Large Language Models (LLMs)** – Updates from OpenAI, Google DeepMind, Anthropic, and Meta\n- **AI Regulation** – Policy developments in the EU, US, and globally\n- **Multimodal AI** – Advances in image, audio, and video generation\n- **AI in Healthcare & Science** – Drug discovery, diagnostics, and research tools\n- **AI Agents & Automation** – Autonomous task-performing systems\n\nOnce the search tool is back online, I'll be able to pull real-time, specific news for you. Would you like me to focus on a **specific area of AI** when the tool is available?","sources":[]}}
8
+ {"action":"end","id":"019efba4-944c-7baf-991e-b29689de2370","timestamp":1782338350943,"details":{"__output_workflow_wrapper_version":1,"output":{"answer":"It seems I'm currently unable to access the search tool due to a missing API key configuration. I apologize for the inconvenience — this is a system-level issue that needs to be resolved on the backend.\n\nIn the meantime, here are some **suggestions for finding the latest AI news yourself**:\n\n### 🔍 Recommended Sources for AI News:\n1. **[TechCrunch AI](https://techcrunch.com/category/artificial-intelligence/)** – Breaking news on AI startups and products.\n2. **[The Verge – AI](https://www.theverge.com/ai-artificial-intelligence)** – Consumer and industry AI coverage.\n3. **[MIT Technology Review](https://www.technologyreview.com/topic/artificial-intelligence/)** – In-depth AI research and analysis.\n4. **[VentureBeat AI](https://venturebeat.com/ai/)** – Enterprise and research AI updates.\n5. **[ArXiv (cs.AI)](https://arxiv.org/list/cs.AI/recent)** – Latest academic AI research papers.\n6. **[Reuters Technology](https://www.reuters.com/technology/)** – Mainstream AI business news.\n\n### 🤖 Key Areas to Watch Right Now:\n- **Large Language Models (LLMs)** – Updates from OpenAI, Google DeepMind, Anthropic, and Meta\n- **AI Regulation** – Policy developments in the EU, US, and globally\n- **Multimodal AI** – Advances in image, audio, and video generation\n- **AI in Healthcare & Science** – Drug discovery, diagnostics, and research tools\n- **AI Agents & Automation** – Autonomous task-performing systems\n\nOnce the search tool is back online, I'll be able to pull real-time, specific news for you. Would you like me to focus on a **specific area of AI** when the tool is available?","sources":[]},"trace":{"destinations":{"local":"/Users/sz/Dev/output/test_workflows/logs/runs/web_search/2026-06-24-21-58-47-628Z_27LUJk1MBTFHhkLPEWZGX.json","remote":"https://output-ai-execution-dev-trace-files.s3.amazonaws.com/web_search/2026/06/24/2026-06-24-21-58-47-628Z_27LUJk1MBTFHhkLPEWZGX.json"}}}}