abstractnote 0.1.0__py3-none-any.whl

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 (80) hide show
  1. abstractnote/__init__.py +18 -0
  2. abstractnote/cli.py +240 -0
  3. abstractnote/flows/__init__.py +2 -0
  4. abstractnote/flows/build.py +970 -0
  5. abstractnote/flows/bundle.py +62 -0
  6. abstractnote/flows/contract.py +88 -0
  7. abstractnote/flows/graph.py +540 -0
  8. abstractnote/flows/json/note-capture.json +2280 -0
  9. abstractnote/flows/json/note-drain.json +2012 -0
  10. abstractnote/flows/json/note-mine.json +2392 -0
  11. abstractnote/flows/json/note-process.json +1853 -0
  12. abstractnote/flows/json/note-recall.json +1876 -0
  13. abstractnote/flows/json/note-reflect.json +2057 -0
  14. abstractnote/flows/prompts_fallback.py +119 -0
  15. abstractnote/flows/runner.py +320 -0
  16. abstractnote/flows/schemas_fallback.py +175 -0
  17. abstractnote/gateway/__init__.py +24 -0
  18. abstractnote/gateway/appspec.py +10 -0
  19. abstractnote/gateway/router.py +571 -0
  20. abstractnote/gateway/tools.py +74 -0
  21. abstractnote/ids.py +177 -0
  22. abstractnote/importers/__init__.py +142 -0
  23. abstractnote/importers/__main__.py +3 -0
  24. abstractnote/importers/agora.py +203 -0
  25. abstractnote/importers/claude_sessions.py +415 -0
  26. abstractnote/importers/cli.py +113 -0
  27. abstractnote/importers/files.py +72 -0
  28. abstractnote/importers/markdown.py +165 -0
  29. abstractnote/ingest/__init__.py +7 -0
  30. abstractnote/ingest/blobs.py +47 -0
  31. abstractnote/ingest/capture.py +265 -0
  32. abstractnote/ingest/extract.py +118 -0
  33. abstractnote/ingest/normalise.py +95 -0
  34. abstractnote/model.py +229 -0
  35. abstractnote/process/__init__.py +5 -0
  36. abstractnote/process/context.py +218 -0
  37. abstractnote/process/merge.py +60 -0
  38. abstractnote/process/prompts/__init__.py +39 -0
  39. abstractnote/process/prompts/extract.md +30 -0
  40. abstractnote/process/prompts/link.md +32 -0
  41. abstractnote/process/prompts/mine_dossier.md +13 -0
  42. abstractnote/process/prompts/mine_findings.md +13 -0
  43. abstractnote/process/prompts/mine_plan.md +13 -0
  44. abstractnote/process/prompts/quick_filing.md +23 -0
  45. abstractnote/process/prompts/reflect.md +10 -0
  46. abstractnote/process/prompts/synthesize.md +17 -0
  47. abstractnote/process/resolve.py +96 -0
  48. abstractnote/process/revise.py +410 -0
  49. abstractnote/process/schemas.py +377 -0
  50. abstractnote/process/vocabulary.py +68 -0
  51. abstractnote/recall/__init__.py +1 -0
  52. abstractnote/recall/changes.py +191 -0
  53. abstractnote/recall/expand.py +379 -0
  54. abstractnote/recall/insights.py +62 -0
  55. abstractnote/recall/reflect.py +202 -0
  56. abstractnote/recall/review.py +191 -0
  57. abstractnote/recall/search.py +205 -0
  58. abstractnote/recall/shapes.py +52 -0
  59. abstractnote/recall/then_now.py +100 -0
  60. abstractnote/store/__init__.py +12 -0
  61. abstractnote/store/archive.py +166 -0
  62. abstractnote/store/embeddings.py +275 -0
  63. abstractnote/store/kg.py +219 -0
  64. abstractnote/store/notebook.py +829 -0
  65. abstractnote/store/notes.py +1190 -0
  66. abstractnote/store/queue.py +159 -0
  67. abstractnote/store/schema.py +348 -0
  68. abstractnote/store/vector_index.py +88 -0
  69. abstractnote/tools/__init__.py +215 -0
  70. abstractnote/tools/capture.py +121 -0
  71. abstractnote/tools/context.py +19 -0
  72. abstractnote/tools/process.py +22 -0
  73. abstractnote/tools/queue.py +23 -0
  74. abstractnote/tools/recall.py +64 -0
  75. abstractnote-0.1.0.dist-info/METADATA +145 -0
  76. abstractnote-0.1.0.dist-info/RECORD +80 -0
  77. abstractnote-0.1.0.dist-info/WHEEL +5 -0
  78. abstractnote-0.1.0.dist-info/entry_points.txt +2 -0
  79. abstractnote-0.1.0.dist-info/licenses/LICENSE +21 -0
  80. abstractnote-0.1.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,2392 @@
1
+ {
2
+ "id": "note-mine",
3
+ "name": "Dig through your notes",
4
+ "description": "Plan a multi-step search across time, read each slice, and write a dossier note.",
5
+ "interfaces": [],
6
+ "nodes": [
7
+ {
8
+ "id": "start",
9
+ "type": "on_flow_start",
10
+ "position": {
11
+ "x": 0.0,
12
+ "y": 0.0
13
+ },
14
+ "data": {
15
+ "nodeType": "on_flow_start",
16
+ "label": "Start",
17
+ "inputs": [],
18
+ "outputs": [
19
+ {
20
+ "id": "exec-out",
21
+ "label": "",
22
+ "type": "execution"
23
+ },
24
+ {
25
+ "id": "question",
26
+ "label": "question",
27
+ "type": "string"
28
+ },
29
+ {
30
+ "id": "since",
31
+ "label": "since",
32
+ "type": "string"
33
+ },
34
+ {
35
+ "id": "until",
36
+ "label": "until",
37
+ "type": "string"
38
+ },
39
+ {
40
+ "id": "provider",
41
+ "label": "provider",
42
+ "type": "provider_text"
43
+ },
44
+ {
45
+ "id": "model",
46
+ "label": "model",
47
+ "type": "model"
48
+ }
49
+ ],
50
+ "pinDefaults": {
51
+ "question": "",
52
+ "provider": "",
53
+ "model": ""
54
+ }
55
+ }
56
+ },
57
+ {
58
+ "id": "search_args",
59
+ "type": "code",
60
+ "position": {
61
+ "x": 480.0,
62
+ "y": 0.0
63
+ },
64
+ "data": {
65
+ "nodeType": "code",
66
+ "label": "First search: arguments",
67
+ "inputs": [
68
+ {
69
+ "id": "exec-in",
70
+ "label": "",
71
+ "type": "execution"
72
+ },
73
+ {
74
+ "id": "query",
75
+ "label": "query",
76
+ "type": "string"
77
+ },
78
+ {
79
+ "id": "since",
80
+ "label": "since",
81
+ "type": "string"
82
+ },
83
+ {
84
+ "id": "until",
85
+ "label": "until",
86
+ "type": "string"
87
+ },
88
+ {
89
+ "id": "limit",
90
+ "label": "limit",
91
+ "type": "number"
92
+ },
93
+ {
94
+ "id": "permissions",
95
+ "label": "permissions",
96
+ "type": "string"
97
+ }
98
+ ],
99
+ "outputs": [
100
+ {
101
+ "id": "exec-out",
102
+ "label": "",
103
+ "type": "execution"
104
+ },
105
+ {
106
+ "id": "tool_calls",
107
+ "label": "tool_calls",
108
+ "type": "array"
109
+ }
110
+ ],
111
+ "pinDefaults": {
112
+ "permissions": "sandbox",
113
+ "limit": 20
114
+ },
115
+ "functionName": "transform",
116
+ "codeBody": "arguments = {}\nif query is not None and query != \"\":\n arguments[\"query\"] = query\nif since is not None and since != \"\":\n arguments[\"since\"] = since\nif until is not None and until != \"\":\n arguments[\"until\"] = until\nif limit is not None and limit != \"\":\n arguments[\"limit\"] = limit\nreturn {\"tool_calls\": [{\"name\": \"note_search\", \"call_id\": \"search\", \"arguments\": arguments}]}\n"
117
+ }
118
+ },
119
+ {
120
+ "id": "search",
121
+ "type": "tool_calls",
122
+ "position": {
123
+ "x": 960.0,
124
+ "y": 0.0
125
+ },
126
+ "data": {
127
+ "nodeType": "tool_calls",
128
+ "label": "First search",
129
+ "inputs": [
130
+ {
131
+ "id": "exec-in",
132
+ "label": "",
133
+ "type": "execution"
134
+ },
135
+ {
136
+ "id": "tool_calls",
137
+ "label": "tool_calls",
138
+ "type": "array"
139
+ },
140
+ {
141
+ "id": "allowed_tools",
142
+ "label": "allowed_tools",
143
+ "type": "array"
144
+ }
145
+ ],
146
+ "outputs": [
147
+ {
148
+ "id": "exec-out",
149
+ "label": "",
150
+ "type": "execution"
151
+ },
152
+ {
153
+ "id": "results",
154
+ "label": "results",
155
+ "type": "array"
156
+ },
157
+ {
158
+ "id": "success",
159
+ "label": "success",
160
+ "type": "boolean"
161
+ }
162
+ ],
163
+ "pinDefaults": {
164
+ "allowed_tools": [
165
+ "note_search"
166
+ ]
167
+ },
168
+ "effectConfig": {
169
+ "allowed_tools": [
170
+ "note_search"
171
+ ]
172
+ }
173
+ }
174
+ },
175
+ {
176
+ "id": "search_out",
177
+ "type": "code",
178
+ "position": {
179
+ "x": 1440.0,
180
+ "y": 0.0
181
+ },
182
+ "data": {
183
+ "nodeType": "code",
184
+ "label": "First search: result",
185
+ "inputs": [
186
+ {
187
+ "id": "exec-in",
188
+ "label": "",
189
+ "type": "execution"
190
+ },
191
+ {
192
+ "id": "results",
193
+ "label": "results",
194
+ "type": "array"
195
+ },
196
+ {
197
+ "id": "permissions",
198
+ "label": "permissions",
199
+ "type": "string"
200
+ }
201
+ ],
202
+ "outputs": [
203
+ {
204
+ "id": "exec-out",
205
+ "label": "",
206
+ "type": "execution"
207
+ },
208
+ {
209
+ "id": "notes",
210
+ "label": "notes",
211
+ "type": "array"
212
+ },
213
+ {
214
+ "id": "entities",
215
+ "label": "entities",
216
+ "type": "array"
217
+ },
218
+ {
219
+ "id": "tool_output",
220
+ "label": "tool_output",
221
+ "type": "object"
222
+ }
223
+ ],
224
+ "pinDefaults": {
225
+ "permissions": "sandbox"
226
+ },
227
+ "functionName": "transform",
228
+ "codeBody": "r = results[0] if isinstance(results, list) and results else None\nfailure = None\nout = None\nif not isinstance(r, dict):\n failure = \"note_search returned no result.\"\nelif not r.get(\"success\"):\n failure = str(r.get(\"error\") or \"note_search failed.\")\nelse:\n out = r.get(\"output\")\n if not isinstance(out, dict):\n failure = \"note_search returned something other than an object.\"\nif failure is not None:\n raise ValueError(failure)\nreturn dict(out, tool_output=out)\n"
229
+ }
230
+ },
231
+ {
232
+ "id": "plan_prompt",
233
+ "type": "string_template",
234
+ "position": {
235
+ "x": 1440.0,
236
+ "y": 320.0
237
+ },
238
+ "data": {
239
+ "nodeType": "string_template",
240
+ "label": "Planning prompt",
241
+ "inputs": [
242
+ {
243
+ "id": "template",
244
+ "label": "template",
245
+ "type": "string"
246
+ },
247
+ {
248
+ "id": "question",
249
+ "label": "question",
250
+ "type": "any"
251
+ },
252
+ {
253
+ "id": "since",
254
+ "label": "since",
255
+ "type": "any"
256
+ },
257
+ {
258
+ "id": "until",
259
+ "label": "until",
260
+ "type": "any"
261
+ },
262
+ {
263
+ "id": "hits",
264
+ "label": "hits",
265
+ "type": "any"
266
+ }
267
+ ],
268
+ "outputs": [
269
+ {
270
+ "id": "result",
271
+ "label": "result",
272
+ "type": "string"
273
+ }
274
+ ],
275
+ "pinDefaults": {
276
+ "template": "You plan a deep search through a person's notes to answer a question.\n\nQuestion: {{question}}\nTime window: since {{since}} until {{until}}\n\nFirst search results:\n{{hits}}\n\nReturn up to six `steps` (each a sub-question, with an optional time slice `since` / `until` and the names of entities to trace), the `contradictions_to_test`, and the number of search `rounds` (1 to 8).\n\nRules:\n- Plan only searches the notes can answer; never invent entities or dates.\n- Output JSON only, matching the schema.\n"
277
+ }
278
+ }
279
+ },
280
+ {
281
+ "id": "plan",
282
+ "type": "llm_call",
283
+ "position": {
284
+ "x": 1920.0,
285
+ "y": 0.0
286
+ },
287
+ "data": {
288
+ "nodeType": "llm_call",
289
+ "label": "Plan the search",
290
+ "inputs": [
291
+ {
292
+ "id": "exec-in",
293
+ "label": "",
294
+ "type": "execution"
295
+ },
296
+ {
297
+ "id": "provider",
298
+ "label": "provider",
299
+ "type": "provider_text"
300
+ },
301
+ {
302
+ "id": "model",
303
+ "label": "model",
304
+ "type": "model"
305
+ },
306
+ {
307
+ "id": "system",
308
+ "label": "system",
309
+ "type": "string"
310
+ },
311
+ {
312
+ "id": "prompt",
313
+ "label": "prompt",
314
+ "type": "string"
315
+ },
316
+ {
317
+ "id": "tools",
318
+ "label": "tools",
319
+ "type": "tools"
320
+ },
321
+ {
322
+ "id": "temperature",
323
+ "label": "temperature",
324
+ "type": "number"
325
+ },
326
+ {
327
+ "id": "resp_schema",
328
+ "label": "resp_schema",
329
+ "type": "json_schema"
330
+ }
331
+ ],
332
+ "outputs": [
333
+ {
334
+ "id": "exec-out",
335
+ "label": "",
336
+ "type": "execution"
337
+ },
338
+ {
339
+ "id": "response",
340
+ "label": "response",
341
+ "type": "string"
342
+ },
343
+ {
344
+ "id": "data",
345
+ "label": "data",
346
+ "type": "object"
347
+ },
348
+ {
349
+ "id": "success",
350
+ "label": "success",
351
+ "type": "boolean"
352
+ },
353
+ {
354
+ "id": "meta",
355
+ "label": "meta",
356
+ "type": "object"
357
+ },
358
+ {
359
+ "id": "tool_calls",
360
+ "label": "tool_calls",
361
+ "type": "array"
362
+ }
363
+ ],
364
+ "pinDefaults": {
365
+ "tools": [],
366
+ "system": "You file and connect a person's notes. Output JSON only, matching the schema.",
367
+ "temperature": 0.2,
368
+ "resp_schema": {
369
+ "type": "object",
370
+ "properties": {
371
+ "steps": {
372
+ "type": "array",
373
+ "items": {
374
+ "type": "object",
375
+ "properties": {
376
+ "question": {
377
+ "type": "string",
378
+ "description": "a sub-question to search for"
379
+ },
380
+ "since": {
381
+ "type": [
382
+ "string",
383
+ "null"
384
+ ],
385
+ "description": "ISO or null"
386
+ },
387
+ "until": {
388
+ "type": [
389
+ "string",
390
+ "null"
391
+ ],
392
+ "description": "ISO or null"
393
+ },
394
+ "entities": {
395
+ "type": "array",
396
+ "items": {
397
+ "type": "string"
398
+ },
399
+ "description": "names to trace"
400
+ }
401
+ },
402
+ "required": [
403
+ "question",
404
+ "since",
405
+ "until",
406
+ "entities"
407
+ ]
408
+ }
409
+ },
410
+ "contradictions_to_test": {
411
+ "type": "array",
412
+ "items": {
413
+ "type": "string"
414
+ }
415
+ },
416
+ "rounds": {
417
+ "type": "integer",
418
+ "minimum": 1,
419
+ "maximum": 8
420
+ }
421
+ },
422
+ "required": [
423
+ "steps",
424
+ "contradictions_to_test",
425
+ "rounds"
426
+ ]
427
+ }
428
+ }
429
+ }
430
+ },
431
+ {
432
+ "id": "steps",
433
+ "type": "code",
434
+ "position": {
435
+ "x": 2400.0,
436
+ "y": 0.0
437
+ },
438
+ "data": {
439
+ "nodeType": "code",
440
+ "label": "Steps",
441
+ "inputs": [
442
+ {
443
+ "id": "exec-in",
444
+ "label": "",
445
+ "type": "execution"
446
+ },
447
+ {
448
+ "id": "plan",
449
+ "label": "plan",
450
+ "type": "object"
451
+ },
452
+ {
453
+ "id": "question",
454
+ "label": "question",
455
+ "type": "string"
456
+ },
457
+ {
458
+ "id": "permissions",
459
+ "label": "permissions",
460
+ "type": "string"
461
+ }
462
+ ],
463
+ "outputs": [
464
+ {
465
+ "id": "exec-out",
466
+ "label": "",
467
+ "type": "execution"
468
+ },
469
+ {
470
+ "id": "items",
471
+ "label": "items",
472
+ "type": "array"
473
+ }
474
+ ],
475
+ "pinDefaults": {
476
+ "permissions": "sandbox"
477
+ },
478
+ "functionName": "transform",
479
+ "codeBody": "p = plan if isinstance(plan, dict) else {}\nrounds = int(p.get(\"rounds\") or 6)\nrounds = max(1, min(rounds, 6))\nsteps = [s for s in (p.get(\"steps\") or []) if isinstance(s, dict) and str(s.get(\"question\") or \"\").strip()]\nif not steps:\n steps = [{\"question\": question, \"since\": None, \"until\": None, \"entities\": []}]\nreturn {\"items\": steps[:rounds]}\n"
480
+ }
481
+ },
482
+ {
483
+ "id": "each_step",
484
+ "type": "loop",
485
+ "position": {
486
+ "x": 2880.0,
487
+ "y": 0.0
488
+ },
489
+ "data": {
490
+ "nodeType": "loop",
491
+ "label": "For each step",
492
+ "inputs": [
493
+ {
494
+ "id": "exec-in",
495
+ "label": "",
496
+ "type": "execution"
497
+ },
498
+ {
499
+ "id": "items",
500
+ "label": "items",
501
+ "type": "array"
502
+ }
503
+ ],
504
+ "outputs": [
505
+ {
506
+ "id": "loop",
507
+ "label": "loop",
508
+ "type": "execution"
509
+ },
510
+ {
511
+ "id": "done",
512
+ "label": "done",
513
+ "type": "execution"
514
+ },
515
+ {
516
+ "id": "item",
517
+ "label": "item",
518
+ "type": "any"
519
+ },
520
+ {
521
+ "id": "index",
522
+ "label": "index",
523
+ "type": "number"
524
+ }
525
+ ]
526
+ }
527
+ },
528
+ {
529
+ "id": "step_query",
530
+ "type": "code",
531
+ "position": {
532
+ "x": 3360.0,
533
+ "y": 0.0
534
+ },
535
+ "data": {
536
+ "nodeType": "code",
537
+ "label": "Step query",
538
+ "inputs": [
539
+ {
540
+ "id": "exec-in",
541
+ "label": "",
542
+ "type": "execution"
543
+ },
544
+ {
545
+ "id": "item",
546
+ "label": "item",
547
+ "type": "object"
548
+ },
549
+ {
550
+ "id": "since",
551
+ "label": "since",
552
+ "type": "string"
553
+ },
554
+ {
555
+ "id": "until",
556
+ "label": "until",
557
+ "type": "string"
558
+ },
559
+ {
560
+ "id": "permissions",
561
+ "label": "permissions",
562
+ "type": "string"
563
+ }
564
+ ],
565
+ "outputs": [
566
+ {
567
+ "id": "exec-out",
568
+ "label": "",
569
+ "type": "execution"
570
+ },
571
+ {
572
+ "id": "query",
573
+ "label": "query",
574
+ "type": "string"
575
+ },
576
+ {
577
+ "id": "step_since",
578
+ "label": "step_since",
579
+ "type": "string"
580
+ },
581
+ {
582
+ "id": "step_until",
583
+ "label": "step_until",
584
+ "type": "string"
585
+ }
586
+ ],
587
+ "pinDefaults": {
588
+ "permissions": "sandbox"
589
+ },
590
+ "functionName": "transform",
591
+ "codeBody": "s = item if isinstance(item, dict) else {}\nreturn {\"query\": str(s.get(\"question\") or \"\"), \"step_since\": s.get(\"since\") or since,\n \"step_until\": s.get(\"until\") or until}\n"
592
+ }
593
+ },
594
+ {
595
+ "id": "step_search_args",
596
+ "type": "code",
597
+ "position": {
598
+ "x": 3840.0,
599
+ "y": 0.0
600
+ },
601
+ "data": {
602
+ "nodeType": "code",
603
+ "label": "Search this slice: arguments",
604
+ "inputs": [
605
+ {
606
+ "id": "exec-in",
607
+ "label": "",
608
+ "type": "execution"
609
+ },
610
+ {
611
+ "id": "query",
612
+ "label": "query",
613
+ "type": "string"
614
+ },
615
+ {
616
+ "id": "since",
617
+ "label": "since",
618
+ "type": "string"
619
+ },
620
+ {
621
+ "id": "until",
622
+ "label": "until",
623
+ "type": "string"
624
+ },
625
+ {
626
+ "id": "limit",
627
+ "label": "limit",
628
+ "type": "number"
629
+ },
630
+ {
631
+ "id": "permissions",
632
+ "label": "permissions",
633
+ "type": "string"
634
+ }
635
+ ],
636
+ "outputs": [
637
+ {
638
+ "id": "exec-out",
639
+ "label": "",
640
+ "type": "execution"
641
+ },
642
+ {
643
+ "id": "tool_calls",
644
+ "label": "tool_calls",
645
+ "type": "array"
646
+ }
647
+ ],
648
+ "pinDefaults": {
649
+ "permissions": "sandbox",
650
+ "limit": 20
651
+ },
652
+ "functionName": "transform",
653
+ "codeBody": "arguments = {}\nif query is not None and query != \"\":\n arguments[\"query\"] = query\nif since is not None and since != \"\":\n arguments[\"since\"] = since\nif until is not None and until != \"\":\n arguments[\"until\"] = until\nif limit is not None and limit != \"\":\n arguments[\"limit\"] = limit\nreturn {\"tool_calls\": [{\"name\": \"note_search\", \"call_id\": \"step_search\", \"arguments\": arguments}]}\n"
654
+ }
655
+ },
656
+ {
657
+ "id": "step_search",
658
+ "type": "tool_calls",
659
+ "position": {
660
+ "x": 4320.0,
661
+ "y": 0.0
662
+ },
663
+ "data": {
664
+ "nodeType": "tool_calls",
665
+ "label": "Search this slice",
666
+ "inputs": [
667
+ {
668
+ "id": "exec-in",
669
+ "label": "",
670
+ "type": "execution"
671
+ },
672
+ {
673
+ "id": "tool_calls",
674
+ "label": "tool_calls",
675
+ "type": "array"
676
+ },
677
+ {
678
+ "id": "allowed_tools",
679
+ "label": "allowed_tools",
680
+ "type": "array"
681
+ }
682
+ ],
683
+ "outputs": [
684
+ {
685
+ "id": "exec-out",
686
+ "label": "",
687
+ "type": "execution"
688
+ },
689
+ {
690
+ "id": "results",
691
+ "label": "results",
692
+ "type": "array"
693
+ },
694
+ {
695
+ "id": "success",
696
+ "label": "success",
697
+ "type": "boolean"
698
+ }
699
+ ],
700
+ "pinDefaults": {
701
+ "allowed_tools": [
702
+ "note_search"
703
+ ]
704
+ },
705
+ "effectConfig": {
706
+ "allowed_tools": [
707
+ "note_search"
708
+ ]
709
+ }
710
+ }
711
+ },
712
+ {
713
+ "id": "step_search_out",
714
+ "type": "code",
715
+ "position": {
716
+ "x": 4800.0,
717
+ "y": 0.0
718
+ },
719
+ "data": {
720
+ "nodeType": "code",
721
+ "label": "Search this slice: result",
722
+ "inputs": [
723
+ {
724
+ "id": "exec-in",
725
+ "label": "",
726
+ "type": "execution"
727
+ },
728
+ {
729
+ "id": "results",
730
+ "label": "results",
731
+ "type": "array"
732
+ },
733
+ {
734
+ "id": "permissions",
735
+ "label": "permissions",
736
+ "type": "string"
737
+ }
738
+ ],
739
+ "outputs": [
740
+ {
741
+ "id": "exec-out",
742
+ "label": "",
743
+ "type": "execution"
744
+ },
745
+ {
746
+ "id": "notes",
747
+ "label": "notes",
748
+ "type": "array"
749
+ },
750
+ {
751
+ "id": "tool_output",
752
+ "label": "tool_output",
753
+ "type": "object"
754
+ },
755
+ {
756
+ "id": "failed",
757
+ "label": "failed",
758
+ "type": "boolean"
759
+ },
760
+ {
761
+ "id": "failure",
762
+ "label": "failure",
763
+ "type": "string"
764
+ }
765
+ ],
766
+ "pinDefaults": {
767
+ "permissions": "sandbox"
768
+ },
769
+ "functionName": "transform",
770
+ "codeBody": "r = results[0] if isinstance(results, list) and results else None\nfailure = None\nout = None\nif not isinstance(r, dict):\n failure = \"note_search returned no result.\"\nelif not r.get(\"success\"):\n failure = str(r.get(\"error\") or \"note_search failed.\")\nelse:\n out = r.get(\"output\")\n if not isinstance(out, dict):\n failure = \"note_search returned something other than an object.\"\nif failure is not None:\n return {\"failed\": True, \"failure\": failure}\nreturn dict(out, tool_output=out, failed=False, failure=None)\n"
771
+ }
772
+ },
773
+ {
774
+ "id": "step_search_failed",
775
+ "type": "if",
776
+ "position": {
777
+ "x": 5280.0,
778
+ "y": 0.0
779
+ },
780
+ "data": {
781
+ "nodeType": "if",
782
+ "label": "Search this slice: failed?",
783
+ "inputs": [
784
+ {
785
+ "id": "exec-in",
786
+ "label": "",
787
+ "type": "execution"
788
+ },
789
+ {
790
+ "id": "condition",
791
+ "label": "condition",
792
+ "type": "boolean"
793
+ }
794
+ ],
795
+ "outputs": [
796
+ {
797
+ "id": "true",
798
+ "label": "true",
799
+ "type": "execution"
800
+ },
801
+ {
802
+ "id": "false",
803
+ "label": "false",
804
+ "type": "execution"
805
+ }
806
+ ]
807
+ }
808
+ },
809
+ {
810
+ "id": "step_search_stopped",
811
+ "type": "on_flow_end",
812
+ "position": {
813
+ "x": 5760.0,
814
+ "y": 0.0
815
+ },
816
+ "data": {
817
+ "nodeType": "on_flow_end",
818
+ "label": "Stopped: search this slice failed",
819
+ "inputs": [
820
+ {
821
+ "id": "exec-in",
822
+ "label": "",
823
+ "type": "execution"
824
+ },
825
+ {
826
+ "id": "response",
827
+ "label": "response",
828
+ "type": "string"
829
+ },
830
+ {
831
+ "id": "error",
832
+ "label": "error",
833
+ "type": "string"
834
+ },
835
+ {
836
+ "id": "success",
837
+ "label": "success",
838
+ "type": "boolean"
839
+ }
840
+ ],
841
+ "outputs": [],
842
+ "pinDefaults": {
843
+ "success": false
844
+ }
845
+ }
846
+ },
847
+ {
848
+ "id": "findings_prompt",
849
+ "type": "string_template",
850
+ "position": {
851
+ "x": 5280.0,
852
+ "y": 320.0
853
+ },
854
+ "data": {
855
+ "nodeType": "string_template",
856
+ "label": "Findings prompt",
857
+ "inputs": [
858
+ {
859
+ "id": "template",
860
+ "label": "template",
861
+ "type": "string"
862
+ },
863
+ {
864
+ "id": "question",
865
+ "label": "question",
866
+ "type": "any"
867
+ },
868
+ {
869
+ "id": "step",
870
+ "label": "step",
871
+ "type": "any"
872
+ },
873
+ {
874
+ "id": "hits",
875
+ "label": "hits",
876
+ "type": "any"
877
+ }
878
+ ],
879
+ "outputs": [
880
+ {
881
+ "id": "result",
882
+ "label": "result",
883
+ "type": "string"
884
+ }
885
+ ],
886
+ "pinDefaults": {
887
+ "template": "You read the search results for one step of a deep search through a person's notes.\n\nMain question: {{question}}\nThis step: {{step}}\n\nSearch results:\n{{hits}}\n\nReturn the `facts` with the note ids that support each one (`citations`), what `changes` over time the results show, and the `gaps`: what is missing to answer the step.\n\nRules:\n- Use only these results; cite note ids exactly as given.\n- Output JSON only, matching the schema.\n"
888
+ }
889
+ }
890
+ },
891
+ {
892
+ "id": "findings",
893
+ "type": "llm_call",
894
+ "position": {
895
+ "x": 5760.0,
896
+ "y": 320.0
897
+ },
898
+ "data": {
899
+ "nodeType": "llm_call",
900
+ "label": "Read this slice",
901
+ "inputs": [
902
+ {
903
+ "id": "exec-in",
904
+ "label": "",
905
+ "type": "execution"
906
+ },
907
+ {
908
+ "id": "provider",
909
+ "label": "provider",
910
+ "type": "provider_text"
911
+ },
912
+ {
913
+ "id": "model",
914
+ "label": "model",
915
+ "type": "model"
916
+ },
917
+ {
918
+ "id": "system",
919
+ "label": "system",
920
+ "type": "string"
921
+ },
922
+ {
923
+ "id": "prompt",
924
+ "label": "prompt",
925
+ "type": "string"
926
+ },
927
+ {
928
+ "id": "tools",
929
+ "label": "tools",
930
+ "type": "tools"
931
+ },
932
+ {
933
+ "id": "temperature",
934
+ "label": "temperature",
935
+ "type": "number"
936
+ },
937
+ {
938
+ "id": "resp_schema",
939
+ "label": "resp_schema",
940
+ "type": "json_schema"
941
+ }
942
+ ],
943
+ "outputs": [
944
+ {
945
+ "id": "exec-out",
946
+ "label": "",
947
+ "type": "execution"
948
+ },
949
+ {
950
+ "id": "response",
951
+ "label": "response",
952
+ "type": "string"
953
+ },
954
+ {
955
+ "id": "data",
956
+ "label": "data",
957
+ "type": "object"
958
+ },
959
+ {
960
+ "id": "success",
961
+ "label": "success",
962
+ "type": "boolean"
963
+ },
964
+ {
965
+ "id": "meta",
966
+ "label": "meta",
967
+ "type": "object"
968
+ },
969
+ {
970
+ "id": "tool_calls",
971
+ "label": "tool_calls",
972
+ "type": "array"
973
+ }
974
+ ],
975
+ "pinDefaults": {
976
+ "tools": [],
977
+ "system": "You file and connect a person's notes. Output JSON only, matching the schema.",
978
+ "temperature": 0.2,
979
+ "resp_schema": {
980
+ "type": "object",
981
+ "properties": {
982
+ "facts": {
983
+ "type": "array",
984
+ "items": {
985
+ "type": "object",
986
+ "properties": {
987
+ "text": {
988
+ "type": "string"
989
+ },
990
+ "citations": {
991
+ "type": "array",
992
+ "items": {
993
+ "type": "string"
994
+ },
995
+ "description": "note ids"
996
+ }
997
+ },
998
+ "required": [
999
+ "text",
1000
+ "citations"
1001
+ ]
1002
+ }
1003
+ },
1004
+ "changes": {
1005
+ "type": "array",
1006
+ "items": {
1007
+ "type": "string"
1008
+ }
1009
+ },
1010
+ "gaps": {
1011
+ "type": "array",
1012
+ "items": {
1013
+ "type": "string"
1014
+ }
1015
+ }
1016
+ },
1017
+ "required": [
1018
+ "facts",
1019
+ "changes",
1020
+ "gaps"
1021
+ ]
1022
+ }
1023
+ }
1024
+ }
1025
+ },
1026
+ {
1027
+ "id": "finding",
1028
+ "type": "code",
1029
+ "position": {
1030
+ "x": 6240.0,
1031
+ "y": 0.0
1032
+ },
1033
+ "data": {
1034
+ "nodeType": "code",
1035
+ "label": "Keep the findings",
1036
+ "inputs": [
1037
+ {
1038
+ "id": "exec-in",
1039
+ "label": "",
1040
+ "type": "execution"
1041
+ },
1042
+ {
1043
+ "id": "item",
1044
+ "label": "item",
1045
+ "type": "object"
1046
+ },
1047
+ {
1048
+ "id": "data",
1049
+ "label": "data",
1050
+ "type": "object"
1051
+ },
1052
+ {
1053
+ "id": "notes",
1054
+ "label": "notes",
1055
+ "type": "array"
1056
+ },
1057
+ {
1058
+ "id": "permissions",
1059
+ "label": "permissions",
1060
+ "type": "string"
1061
+ }
1062
+ ],
1063
+ "outputs": [
1064
+ {
1065
+ "id": "exec-out",
1066
+ "label": "",
1067
+ "type": "execution"
1068
+ },
1069
+ {
1070
+ "id": "entry",
1071
+ "label": "entry",
1072
+ "type": "object"
1073
+ }
1074
+ ],
1075
+ "pinDefaults": {
1076
+ "permissions": "sandbox"
1077
+ },
1078
+ "functionName": "transform",
1079
+ "codeBody": "return {\"entry\": {\"step\": item, \"findings\": data if isinstance(data, dict) else {},\n \"notes\": [n for n in (notes or []) if isinstance(n, dict)]}}\n"
1080
+ }
1081
+ },
1082
+ {
1083
+ "id": "keep_finding",
1084
+ "type": "add_to_list",
1085
+ "position": {
1086
+ "x": 6720.0,
1087
+ "y": 0.0
1088
+ },
1089
+ "data": {
1090
+ "nodeType": "add_to_list",
1091
+ "label": "Keep the findings",
1092
+ "inputs": [
1093
+ {
1094
+ "id": "exec-in",
1095
+ "label": "",
1096
+ "type": "execution"
1097
+ },
1098
+ {
1099
+ "id": "name",
1100
+ "label": "name",
1101
+ "type": "string"
1102
+ },
1103
+ {
1104
+ "id": "item",
1105
+ "label": "item",
1106
+ "type": "any"
1107
+ },
1108
+ {
1109
+ "id": "items",
1110
+ "label": "items",
1111
+ "type": "array"
1112
+ }
1113
+ ],
1114
+ "outputs": [
1115
+ {
1116
+ "id": "exec-out",
1117
+ "label": "",
1118
+ "type": "execution"
1119
+ },
1120
+ {
1121
+ "id": "list",
1122
+ "label": "list",
1123
+ "type": "array"
1124
+ }
1125
+ ],
1126
+ "pinDefaults": {
1127
+ "name": "mine_findings"
1128
+ }
1129
+ }
1130
+ },
1131
+ {
1132
+ "id": "all_findings",
1133
+ "type": "get_var",
1134
+ "position": {
1135
+ "x": 3360.0,
1136
+ "y": 320.0
1137
+ },
1138
+ "data": {
1139
+ "nodeType": "get_var",
1140
+ "label": "Get mine_findings",
1141
+ "inputs": [
1142
+ {
1143
+ "id": "name",
1144
+ "label": "name",
1145
+ "type": "string"
1146
+ },
1147
+ {
1148
+ "id": "default",
1149
+ "label": "default",
1150
+ "type": "any"
1151
+ }
1152
+ ],
1153
+ "outputs": [
1154
+ {
1155
+ "id": "value",
1156
+ "label": "value",
1157
+ "type": "any"
1158
+ }
1159
+ ],
1160
+ "pinDefaults": {
1161
+ "name": "mine_findings",
1162
+ "default": []
1163
+ }
1164
+ }
1165
+ },
1166
+ {
1167
+ "id": "dossier_prompt",
1168
+ "type": "string_template",
1169
+ "position": {
1170
+ "x": 2880.0,
1171
+ "y": 320.0
1172
+ },
1173
+ "data": {
1174
+ "nodeType": "string_template",
1175
+ "label": "Dossier prompt",
1176
+ "inputs": [
1177
+ {
1178
+ "id": "template",
1179
+ "label": "template",
1180
+ "type": "string"
1181
+ },
1182
+ {
1183
+ "id": "question",
1184
+ "label": "question",
1185
+ "type": "any"
1186
+ },
1187
+ {
1188
+ "id": "plan",
1189
+ "label": "plan",
1190
+ "type": "any"
1191
+ },
1192
+ {
1193
+ "id": "findings",
1194
+ "label": "findings",
1195
+ "type": "any"
1196
+ }
1197
+ ],
1198
+ "outputs": [
1199
+ {
1200
+ "id": "result",
1201
+ "label": "result",
1202
+ "type": "string"
1203
+ }
1204
+ ],
1205
+ "pinDefaults": {
1206
+ "template": "You write a dossier that answers a question from the findings of a deep search through a person's notes.\n\nQuestion: {{question}}\nPlan: {{plan}}\n\nFindings per step:\n{{findings}}\n\nWrite a `title`, a `narrative` with inline citations [nt_...], a `timeline` of the subject (date, event, note ids), how the view `evolution` went, the `contradictions`, `forgotten` items worth revisiting, `suggestions`, and a `confidence` statement that says how well the notes support the answer.\n\nRules:\n- Use only the note ids in the findings; never invent notes, people or dates.\n- Output JSON only, matching the schema.\n"
1207
+ }
1208
+ }
1209
+ },
1210
+ {
1211
+ "id": "dossier",
1212
+ "type": "llm_call",
1213
+ "position": {
1214
+ "x": 3360.0,
1215
+ "y": 640.0
1216
+ },
1217
+ "data": {
1218
+ "nodeType": "llm_call",
1219
+ "label": "Write the dossier",
1220
+ "inputs": [
1221
+ {
1222
+ "id": "exec-in",
1223
+ "label": "",
1224
+ "type": "execution"
1225
+ },
1226
+ {
1227
+ "id": "provider",
1228
+ "label": "provider",
1229
+ "type": "provider_text"
1230
+ },
1231
+ {
1232
+ "id": "model",
1233
+ "label": "model",
1234
+ "type": "model"
1235
+ },
1236
+ {
1237
+ "id": "system",
1238
+ "label": "system",
1239
+ "type": "string"
1240
+ },
1241
+ {
1242
+ "id": "prompt",
1243
+ "label": "prompt",
1244
+ "type": "string"
1245
+ },
1246
+ {
1247
+ "id": "tools",
1248
+ "label": "tools",
1249
+ "type": "tools"
1250
+ },
1251
+ {
1252
+ "id": "temperature",
1253
+ "label": "temperature",
1254
+ "type": "number"
1255
+ },
1256
+ {
1257
+ "id": "resp_schema",
1258
+ "label": "resp_schema",
1259
+ "type": "json_schema"
1260
+ }
1261
+ ],
1262
+ "outputs": [
1263
+ {
1264
+ "id": "exec-out",
1265
+ "label": "",
1266
+ "type": "execution"
1267
+ },
1268
+ {
1269
+ "id": "response",
1270
+ "label": "response",
1271
+ "type": "string"
1272
+ },
1273
+ {
1274
+ "id": "data",
1275
+ "label": "data",
1276
+ "type": "object"
1277
+ },
1278
+ {
1279
+ "id": "success",
1280
+ "label": "success",
1281
+ "type": "boolean"
1282
+ },
1283
+ {
1284
+ "id": "meta",
1285
+ "label": "meta",
1286
+ "type": "object"
1287
+ },
1288
+ {
1289
+ "id": "tool_calls",
1290
+ "label": "tool_calls",
1291
+ "type": "array"
1292
+ }
1293
+ ],
1294
+ "pinDefaults": {
1295
+ "tools": [],
1296
+ "system": "You file and connect a person's notes. Output JSON only, matching the schema.",
1297
+ "temperature": 0.2,
1298
+ "resp_schema": {
1299
+ "type": "object",
1300
+ "properties": {
1301
+ "title": {
1302
+ "type": "string"
1303
+ },
1304
+ "narrative": {
1305
+ "type": "string",
1306
+ "description": "with inline citations [nt_...]"
1307
+ },
1308
+ "timeline": {
1309
+ "type": "array",
1310
+ "items": {
1311
+ "type": "object",
1312
+ "properties": {
1313
+ "at": {
1314
+ "type": "string"
1315
+ },
1316
+ "event": {
1317
+ "type": "string"
1318
+ },
1319
+ "note_ids": {
1320
+ "type": "array",
1321
+ "items": {
1322
+ "type": "string"
1323
+ }
1324
+ }
1325
+ },
1326
+ "required": [
1327
+ "at",
1328
+ "event",
1329
+ "note_ids"
1330
+ ]
1331
+ }
1332
+ },
1333
+ "evolution": {
1334
+ "type": "string",
1335
+ "description": "how the view evolved"
1336
+ },
1337
+ "contradictions": {
1338
+ "type": "array",
1339
+ "items": {
1340
+ "type": "string"
1341
+ }
1342
+ },
1343
+ "forgotten": {
1344
+ "type": "array",
1345
+ "items": {
1346
+ "type": "string"
1347
+ },
1348
+ "description": "items worth revisiting"
1349
+ },
1350
+ "suggestions": {
1351
+ "type": "array",
1352
+ "items": {
1353
+ "type": "string"
1354
+ }
1355
+ },
1356
+ "confidence": {
1357
+ "type": "string",
1358
+ "description": "a confidence statement"
1359
+ }
1360
+ },
1361
+ "required": [
1362
+ "title",
1363
+ "narrative",
1364
+ "timeline",
1365
+ "evolution",
1366
+ "contradictions",
1367
+ "forgotten",
1368
+ "suggestions",
1369
+ "confidence"
1370
+ ]
1371
+ }
1372
+ }
1373
+ }
1374
+ },
1375
+ {
1376
+ "id": "dossier_note",
1377
+ "type": "code",
1378
+ "position": {
1379
+ "x": 3840.0,
1380
+ "y": 320.0
1381
+ },
1382
+ "data": {
1383
+ "nodeType": "code",
1384
+ "label": "Dossier note",
1385
+ "inputs": [
1386
+ {
1387
+ "id": "exec-in",
1388
+ "label": "",
1389
+ "type": "execution"
1390
+ },
1391
+ {
1392
+ "id": "data",
1393
+ "label": "data",
1394
+ "type": "object"
1395
+ },
1396
+ {
1397
+ "id": "findings",
1398
+ "label": "findings",
1399
+ "type": "array"
1400
+ },
1401
+ {
1402
+ "id": "first_notes",
1403
+ "label": "first_notes",
1404
+ "type": "array"
1405
+ },
1406
+ {
1407
+ "id": "first_entities",
1408
+ "label": "first_entities",
1409
+ "type": "array"
1410
+ },
1411
+ {
1412
+ "id": "question",
1413
+ "label": "question",
1414
+ "type": "string"
1415
+ },
1416
+ {
1417
+ "id": "permissions",
1418
+ "label": "permissions",
1419
+ "type": "string"
1420
+ }
1421
+ ],
1422
+ "outputs": [
1423
+ {
1424
+ "id": "exec-out",
1425
+ "label": "",
1426
+ "type": "execution"
1427
+ },
1428
+ {
1429
+ "id": "title",
1430
+ "label": "title",
1431
+ "type": "string"
1432
+ },
1433
+ {
1434
+ "id": "body",
1435
+ "label": "body",
1436
+ "type": "string"
1437
+ },
1438
+ {
1439
+ "id": "narrative",
1440
+ "label": "narrative",
1441
+ "type": "string"
1442
+ },
1443
+ {
1444
+ "id": "evidence",
1445
+ "label": "evidence",
1446
+ "type": "array"
1447
+ },
1448
+ {
1449
+ "id": "evidence_note_ids",
1450
+ "label": "evidence_note_ids",
1451
+ "type": "array"
1452
+ },
1453
+ {
1454
+ "id": "entity_ids",
1455
+ "label": "entity_ids",
1456
+ "type": "array"
1457
+ }
1458
+ ],
1459
+ "pinDefaults": {
1460
+ "permissions": "sandbox"
1461
+ },
1462
+ "functionName": "transform",
1463
+ "codeBody": "d = data if isinstance(data, dict) else {}\nseen, evidence = set(), []\npools = [first_notes or []] + [e.get(\"notes\") or [] for e in (findings or []) if isinstance(e, dict)]\nfor pool in pools:\n for n in pool:\n nid = n.get(\"note_id\") if isinstance(n, dict) else None\n if nid and nid not in seen:\n seen.add(nid)\n evidence.append({\"note_id\": nid, \"title\": n.get(\"title\"), \"kind\": n.get(\"kind\"), \"occurred_at\": n.get(\"occurred_at\"),\n \"excerpt\": n.get(\"excerpt\")})\nentity_ids = [x.get(\"entity_id\") for x in (first_entities or []) if isinstance(x, dict) and x.get(\"entity_id\")]\nnarrative = str(d.get(\"narrative\") or \"\").strip()\nif not narrative:\n raise ValueError(\"The dossier came back empty.\")\nlines = [narrative]\ndef section(title, items):\n rows = [str(i).strip() for i in (items or []) if str(i).strip()]\n if rows:\n lines.append(\"\")\n lines.append(\"## \" + title)\n lines.extend([\"- \" + r for r in rows])\nsection(\"Timeline\", [str(t.get(\"at\") or \"\") + \": \" + str(t.get(\"event\") or \"\") for t in (d.get(\"timeline\") or []) if isinstance(t, dict)])\nif str(d.get(\"evolution\") or \"\").strip():\n lines.extend([\"\", \"## How the view evolved\", str(d.get(\"evolution\")).strip()])\nsection(\"Contradictions\", d.get(\"contradictions\"))\nsection(\"Worth revisiting\", d.get(\"forgotten\"))\nsection(\"Suggestions\", d.get(\"suggestions\"))\nif str(d.get(\"confidence\") or \"\").strip():\n lines.extend([\"\", \"## Confidence\", str(d.get(\"confidence\")).strip()])\nreturn {\"title\": str(d.get(\"title\") or question)[:120], \"body\": \"\\n\".join(lines), \"narrative\": narrative,\n \"evidence\": evidence, \"evidence_note_ids\": [e[\"note_id\"] for e in evidence], \"entity_ids\": entity_ids}\n"
1464
+ }
1465
+ },
1466
+ {
1467
+ "id": "write_args",
1468
+ "type": "code",
1469
+ "position": {
1470
+ "x": 4320.0,
1471
+ "y": 320.0
1472
+ },
1473
+ "data": {
1474
+ "nodeType": "code",
1475
+ "label": "Keep the dossier: arguments",
1476
+ "inputs": [
1477
+ {
1478
+ "id": "exec-in",
1479
+ "label": "",
1480
+ "type": "execution"
1481
+ },
1482
+ {
1483
+ "id": "kind",
1484
+ "label": "kind",
1485
+ "type": "string"
1486
+ },
1487
+ {
1488
+ "id": "title",
1489
+ "label": "title",
1490
+ "type": "string"
1491
+ },
1492
+ {
1493
+ "id": "body",
1494
+ "label": "body",
1495
+ "type": "string"
1496
+ },
1497
+ {
1498
+ "id": "evidence_note_ids",
1499
+ "label": "evidence_note_ids",
1500
+ "type": "array"
1501
+ },
1502
+ {
1503
+ "id": "entity_ids",
1504
+ "label": "entity_ids",
1505
+ "type": "array"
1506
+ },
1507
+ {
1508
+ "id": "permissions",
1509
+ "label": "permissions",
1510
+ "type": "string"
1511
+ }
1512
+ ],
1513
+ "outputs": [
1514
+ {
1515
+ "id": "exec-out",
1516
+ "label": "",
1517
+ "type": "execution"
1518
+ },
1519
+ {
1520
+ "id": "tool_calls",
1521
+ "label": "tool_calls",
1522
+ "type": "array"
1523
+ }
1524
+ ],
1525
+ "pinDefaults": {
1526
+ "permissions": "sandbox",
1527
+ "kind": "dossier"
1528
+ },
1529
+ "functionName": "transform",
1530
+ "codeBody": "arguments = {}\nif kind is not None and kind != \"\":\n arguments[\"kind\"] = kind\nif title is not None and title != \"\":\n arguments[\"title\"] = title\nif body is not None and body != \"\":\n arguments[\"body\"] = body\nif evidence_note_ids is not None and evidence_note_ids != \"\":\n arguments[\"evidence_note_ids\"] = evidence_note_ids\nif entity_ids is not None and entity_ids != \"\":\n arguments[\"entity_ids\"] = entity_ids\nreturn {\"tool_calls\": [{\"name\": \"note_insight_write\", \"call_id\": \"write\", \"arguments\": arguments}]}\n"
1531
+ }
1532
+ },
1533
+ {
1534
+ "id": "write",
1535
+ "type": "tool_calls",
1536
+ "position": {
1537
+ "x": 4800.0,
1538
+ "y": 320.0
1539
+ },
1540
+ "data": {
1541
+ "nodeType": "tool_calls",
1542
+ "label": "Keep the dossier",
1543
+ "inputs": [
1544
+ {
1545
+ "id": "exec-in",
1546
+ "label": "",
1547
+ "type": "execution"
1548
+ },
1549
+ {
1550
+ "id": "tool_calls",
1551
+ "label": "tool_calls",
1552
+ "type": "array"
1553
+ },
1554
+ {
1555
+ "id": "allowed_tools",
1556
+ "label": "allowed_tools",
1557
+ "type": "array"
1558
+ }
1559
+ ],
1560
+ "outputs": [
1561
+ {
1562
+ "id": "exec-out",
1563
+ "label": "",
1564
+ "type": "execution"
1565
+ },
1566
+ {
1567
+ "id": "results",
1568
+ "label": "results",
1569
+ "type": "array"
1570
+ },
1571
+ {
1572
+ "id": "success",
1573
+ "label": "success",
1574
+ "type": "boolean"
1575
+ }
1576
+ ],
1577
+ "pinDefaults": {
1578
+ "allowed_tools": [
1579
+ "note_insight_write"
1580
+ ]
1581
+ },
1582
+ "effectConfig": {
1583
+ "allowed_tools": [
1584
+ "note_insight_write"
1585
+ ]
1586
+ }
1587
+ }
1588
+ },
1589
+ {
1590
+ "id": "write_out",
1591
+ "type": "code",
1592
+ "position": {
1593
+ "x": 5280.0,
1594
+ "y": 640.0
1595
+ },
1596
+ "data": {
1597
+ "nodeType": "code",
1598
+ "label": "Keep the dossier: result",
1599
+ "inputs": [
1600
+ {
1601
+ "id": "exec-in",
1602
+ "label": "",
1603
+ "type": "execution"
1604
+ },
1605
+ {
1606
+ "id": "results",
1607
+ "label": "results",
1608
+ "type": "array"
1609
+ },
1610
+ {
1611
+ "id": "permissions",
1612
+ "label": "permissions",
1613
+ "type": "string"
1614
+ }
1615
+ ],
1616
+ "outputs": [
1617
+ {
1618
+ "id": "exec-out",
1619
+ "label": "",
1620
+ "type": "execution"
1621
+ },
1622
+ {
1623
+ "id": "note_id",
1624
+ "label": "note_id",
1625
+ "type": "string"
1626
+ },
1627
+ {
1628
+ "id": "tool_output",
1629
+ "label": "tool_output",
1630
+ "type": "object"
1631
+ }
1632
+ ],
1633
+ "pinDefaults": {
1634
+ "permissions": "sandbox"
1635
+ },
1636
+ "functionName": "transform",
1637
+ "codeBody": "r = results[0] if isinstance(results, list) and results else None\nfailure = None\nout = None\nif not isinstance(r, dict):\n failure = \"note_insight_write returned no result.\"\nelif not r.get(\"success\"):\n failure = str(r.get(\"error\") or \"note_insight_write failed.\")\nelse:\n out = r.get(\"output\")\n if not isinstance(out, dict):\n failure = \"note_insight_write returned something other than an object.\"\nif failure is not None:\n raise ValueError(failure)\nreturn dict(out, tool_output=out)\n"
1638
+ }
1639
+ },
1640
+ {
1641
+ "id": "shape",
1642
+ "type": "code",
1643
+ "position": {
1644
+ "x": 5760.0,
1645
+ "y": 692.0
1646
+ },
1647
+ "data": {
1648
+ "nodeType": "code",
1649
+ "label": "Shape the answer",
1650
+ "inputs": [
1651
+ {
1652
+ "id": "exec-in",
1653
+ "label": "",
1654
+ "type": "execution"
1655
+ },
1656
+ {
1657
+ "id": "data",
1658
+ "label": "data",
1659
+ "type": "object"
1660
+ },
1661
+ {
1662
+ "id": "narrative",
1663
+ "label": "narrative",
1664
+ "type": "string"
1665
+ },
1666
+ {
1667
+ "id": "evidence",
1668
+ "label": "evidence",
1669
+ "type": "array"
1670
+ },
1671
+ {
1672
+ "id": "note_id",
1673
+ "label": "note_id",
1674
+ "type": "string"
1675
+ },
1676
+ {
1677
+ "id": "permissions",
1678
+ "label": "permissions",
1679
+ "type": "string"
1680
+ }
1681
+ ],
1682
+ "outputs": [
1683
+ {
1684
+ "id": "exec-out",
1685
+ "label": "",
1686
+ "type": "execution"
1687
+ },
1688
+ {
1689
+ "id": "response",
1690
+ "label": "response",
1691
+ "type": "string"
1692
+ },
1693
+ {
1694
+ "id": "answer",
1695
+ "label": "answer",
1696
+ "type": "string"
1697
+ },
1698
+ {
1699
+ "id": "evidence",
1700
+ "label": "evidence",
1701
+ "type": "array"
1702
+ },
1703
+ {
1704
+ "id": "evolution",
1705
+ "label": "evolution",
1706
+ "type": "object"
1707
+ },
1708
+ {
1709
+ "id": "open_loops",
1710
+ "label": "open_loops",
1711
+ "type": "array"
1712
+ },
1713
+ {
1714
+ "id": "follow_ups",
1715
+ "label": "follow_ups",
1716
+ "type": "array"
1717
+ },
1718
+ {
1719
+ "id": "dossier_note_id",
1720
+ "label": "dossier_note_id",
1721
+ "type": "string"
1722
+ }
1723
+ ],
1724
+ "pinDefaults": {
1725
+ "permissions": "sandbox"
1726
+ },
1727
+ "functionName": "transform",
1728
+ "codeBody": "d = data if isinstance(data, dict) else {}\nev = d.get(\"evolution\")\nreturn {\"response\": narrative, \"answer\": narrative, \"evidence\": evidence,\n \"evolution\": {\"summary\": ev} if ev else {}, \"open_loops\": d.get(\"forgotten\") or [],\n \"follow_ups\": d.get(\"suggestions\") or [], \"dossier_note_id\": note_id}\n"
1729
+ }
1730
+ },
1731
+ {
1732
+ "id": "end",
1733
+ "type": "on_flow_end",
1734
+ "position": {
1735
+ "x": 6240.0,
1736
+ "y": 320.0
1737
+ },
1738
+ "data": {
1739
+ "nodeType": "on_flow_end",
1740
+ "label": "Done",
1741
+ "inputs": [
1742
+ {
1743
+ "id": "exec-in",
1744
+ "label": "",
1745
+ "type": "execution"
1746
+ },
1747
+ {
1748
+ "id": "response",
1749
+ "label": "response",
1750
+ "type": "string"
1751
+ },
1752
+ {
1753
+ "id": "answer",
1754
+ "label": "answer",
1755
+ "type": "string"
1756
+ },
1757
+ {
1758
+ "id": "evidence",
1759
+ "label": "evidence",
1760
+ "type": "array"
1761
+ },
1762
+ {
1763
+ "id": "evolution",
1764
+ "label": "evolution",
1765
+ "type": "object"
1766
+ },
1767
+ {
1768
+ "id": "open_loops",
1769
+ "label": "open_loops",
1770
+ "type": "array"
1771
+ },
1772
+ {
1773
+ "id": "follow_ups",
1774
+ "label": "follow_ups",
1775
+ "type": "array"
1776
+ },
1777
+ {
1778
+ "id": "dossier_note_id",
1779
+ "label": "dossier_note_id",
1780
+ "type": "string"
1781
+ }
1782
+ ],
1783
+ "outputs": []
1784
+ }
1785
+ }
1786
+ ],
1787
+ "edges": [
1788
+ {
1789
+ "id": "e-start-question-search_args-query",
1790
+ "source": "start",
1791
+ "sourceHandle": "question",
1792
+ "target": "search_args",
1793
+ "targetHandle": "query"
1794
+ },
1795
+ {
1796
+ "id": "e-start-since-search_args-since",
1797
+ "source": "start",
1798
+ "sourceHandle": "since",
1799
+ "target": "search_args",
1800
+ "targetHandle": "since"
1801
+ },
1802
+ {
1803
+ "id": "e-start-until-search_args-until",
1804
+ "source": "start",
1805
+ "sourceHandle": "until",
1806
+ "target": "search_args",
1807
+ "targetHandle": "until"
1808
+ },
1809
+ {
1810
+ "id": "e-start-exec-out-search_args-exec-in",
1811
+ "source": "start",
1812
+ "sourceHandle": "exec-out",
1813
+ "target": "search_args",
1814
+ "targetHandle": "exec-in"
1815
+ },
1816
+ {
1817
+ "id": "e-search_args-tool_calls-search-tool_calls",
1818
+ "source": "search_args",
1819
+ "sourceHandle": "tool_calls",
1820
+ "target": "search",
1821
+ "targetHandle": "tool_calls"
1822
+ },
1823
+ {
1824
+ "id": "e-search_args-exec-out-search-exec-in",
1825
+ "source": "search_args",
1826
+ "sourceHandle": "exec-out",
1827
+ "target": "search",
1828
+ "targetHandle": "exec-in"
1829
+ },
1830
+ {
1831
+ "id": "e-search-results-search_out-results",
1832
+ "source": "search",
1833
+ "sourceHandle": "results",
1834
+ "target": "search_out",
1835
+ "targetHandle": "results"
1836
+ },
1837
+ {
1838
+ "id": "e-search-exec-out-search_out-exec-in",
1839
+ "source": "search",
1840
+ "sourceHandle": "exec-out",
1841
+ "target": "search_out",
1842
+ "targetHandle": "exec-in"
1843
+ },
1844
+ {
1845
+ "id": "e-start-question-plan_prompt-question",
1846
+ "source": "start",
1847
+ "sourceHandle": "question",
1848
+ "target": "plan_prompt",
1849
+ "targetHandle": "question"
1850
+ },
1851
+ {
1852
+ "id": "e-start-since-plan_prompt-since",
1853
+ "source": "start",
1854
+ "sourceHandle": "since",
1855
+ "target": "plan_prompt",
1856
+ "targetHandle": "since"
1857
+ },
1858
+ {
1859
+ "id": "e-start-until-plan_prompt-until",
1860
+ "source": "start",
1861
+ "sourceHandle": "until",
1862
+ "target": "plan_prompt",
1863
+ "targetHandle": "until"
1864
+ },
1865
+ {
1866
+ "id": "e-search_out-tool_output-plan_prompt-hits",
1867
+ "source": "search_out",
1868
+ "sourceHandle": "tool_output",
1869
+ "target": "plan_prompt",
1870
+ "targetHandle": "hits"
1871
+ },
1872
+ {
1873
+ "id": "e-plan_prompt-result-plan-prompt",
1874
+ "source": "plan_prompt",
1875
+ "sourceHandle": "result",
1876
+ "target": "plan",
1877
+ "targetHandle": "prompt"
1878
+ },
1879
+ {
1880
+ "id": "e-start-provider-plan-provider",
1881
+ "source": "start",
1882
+ "sourceHandle": "provider",
1883
+ "target": "plan",
1884
+ "targetHandle": "provider"
1885
+ },
1886
+ {
1887
+ "id": "e-start-model-plan-model",
1888
+ "source": "start",
1889
+ "sourceHandle": "model",
1890
+ "target": "plan",
1891
+ "targetHandle": "model"
1892
+ },
1893
+ {
1894
+ "id": "e-search_out-exec-out-plan-exec-in",
1895
+ "source": "search_out",
1896
+ "sourceHandle": "exec-out",
1897
+ "target": "plan",
1898
+ "targetHandle": "exec-in"
1899
+ },
1900
+ {
1901
+ "id": "e-plan-data-steps-plan",
1902
+ "source": "plan",
1903
+ "sourceHandle": "data",
1904
+ "target": "steps",
1905
+ "targetHandle": "plan"
1906
+ },
1907
+ {
1908
+ "id": "e-start-question-steps-question",
1909
+ "source": "start",
1910
+ "sourceHandle": "question",
1911
+ "target": "steps",
1912
+ "targetHandle": "question"
1913
+ },
1914
+ {
1915
+ "id": "e-plan-exec-out-steps-exec-in",
1916
+ "source": "plan",
1917
+ "sourceHandle": "exec-out",
1918
+ "target": "steps",
1919
+ "targetHandle": "exec-in"
1920
+ },
1921
+ {
1922
+ "id": "e-steps-items-each_step-items",
1923
+ "source": "steps",
1924
+ "sourceHandle": "items",
1925
+ "target": "each_step",
1926
+ "targetHandle": "items"
1927
+ },
1928
+ {
1929
+ "id": "e-steps-exec-out-each_step-exec-in",
1930
+ "source": "steps",
1931
+ "sourceHandle": "exec-out",
1932
+ "target": "each_step",
1933
+ "targetHandle": "exec-in"
1934
+ },
1935
+ {
1936
+ "id": "e-each_step-item-step_query-item",
1937
+ "source": "each_step",
1938
+ "sourceHandle": "item",
1939
+ "target": "step_query",
1940
+ "targetHandle": "item"
1941
+ },
1942
+ {
1943
+ "id": "e-start-since-step_query-since",
1944
+ "source": "start",
1945
+ "sourceHandle": "since",
1946
+ "target": "step_query",
1947
+ "targetHandle": "since"
1948
+ },
1949
+ {
1950
+ "id": "e-start-until-step_query-until",
1951
+ "source": "start",
1952
+ "sourceHandle": "until",
1953
+ "target": "step_query",
1954
+ "targetHandle": "until"
1955
+ },
1956
+ {
1957
+ "id": "e-each_step-loop-step_query-exec-in",
1958
+ "source": "each_step",
1959
+ "sourceHandle": "loop",
1960
+ "target": "step_query",
1961
+ "targetHandle": "exec-in"
1962
+ },
1963
+ {
1964
+ "id": "e-step_query-query-step_search_args-query",
1965
+ "source": "step_query",
1966
+ "sourceHandle": "query",
1967
+ "target": "step_search_args",
1968
+ "targetHandle": "query"
1969
+ },
1970
+ {
1971
+ "id": "e-step_query-step_since-step_search_args-since",
1972
+ "source": "step_query",
1973
+ "sourceHandle": "step_since",
1974
+ "target": "step_search_args",
1975
+ "targetHandle": "since"
1976
+ },
1977
+ {
1978
+ "id": "e-step_query-step_until-step_search_args-until",
1979
+ "source": "step_query",
1980
+ "sourceHandle": "step_until",
1981
+ "target": "step_search_args",
1982
+ "targetHandle": "until"
1983
+ },
1984
+ {
1985
+ "id": "e-step_query-exec-out-step_search_args-exec-in",
1986
+ "source": "step_query",
1987
+ "sourceHandle": "exec-out",
1988
+ "target": "step_search_args",
1989
+ "targetHandle": "exec-in"
1990
+ },
1991
+ {
1992
+ "id": "e-step_search_args-tool_calls-step_search-tool_calls",
1993
+ "source": "step_search_args",
1994
+ "sourceHandle": "tool_calls",
1995
+ "target": "step_search",
1996
+ "targetHandle": "tool_calls"
1997
+ },
1998
+ {
1999
+ "id": "e-step_search_args-exec-out-step_search-exec-in",
2000
+ "source": "step_search_args",
2001
+ "sourceHandle": "exec-out",
2002
+ "target": "step_search",
2003
+ "targetHandle": "exec-in"
2004
+ },
2005
+ {
2006
+ "id": "e-step_search-results-step_search_out-results",
2007
+ "source": "step_search",
2008
+ "sourceHandle": "results",
2009
+ "target": "step_search_out",
2010
+ "targetHandle": "results"
2011
+ },
2012
+ {
2013
+ "id": "e-step_search-exec-out-step_search_out-exec-in",
2014
+ "source": "step_search",
2015
+ "sourceHandle": "exec-out",
2016
+ "target": "step_search_out",
2017
+ "targetHandle": "exec-in"
2018
+ },
2019
+ {
2020
+ "id": "e-step_search_out-failed-step_search_failed-condition",
2021
+ "source": "step_search_out",
2022
+ "sourceHandle": "failed",
2023
+ "target": "step_search_failed",
2024
+ "targetHandle": "condition"
2025
+ },
2026
+ {
2027
+ "id": "e-step_search_out-exec-out-step_search_failed-exec-in",
2028
+ "source": "step_search_out",
2029
+ "sourceHandle": "exec-out",
2030
+ "target": "step_search_failed",
2031
+ "targetHandle": "exec-in"
2032
+ },
2033
+ {
2034
+ "id": "e-step_search_out-failure-step_search_stopped-response",
2035
+ "source": "step_search_out",
2036
+ "sourceHandle": "failure",
2037
+ "target": "step_search_stopped",
2038
+ "targetHandle": "response"
2039
+ },
2040
+ {
2041
+ "id": "e-step_search_out-failure-step_search_stopped-error",
2042
+ "source": "step_search_out",
2043
+ "sourceHandle": "failure",
2044
+ "target": "step_search_stopped",
2045
+ "targetHandle": "error"
2046
+ },
2047
+ {
2048
+ "id": "e-step_search_failed-true-step_search_stopped-exec-in",
2049
+ "source": "step_search_failed",
2050
+ "sourceHandle": "true",
2051
+ "target": "step_search_stopped",
2052
+ "targetHandle": "exec-in"
2053
+ },
2054
+ {
2055
+ "id": "e-start-question-findings_prompt-question",
2056
+ "source": "start",
2057
+ "sourceHandle": "question",
2058
+ "target": "findings_prompt",
2059
+ "targetHandle": "question"
2060
+ },
2061
+ {
2062
+ "id": "e-each_step-item-findings_prompt-step",
2063
+ "source": "each_step",
2064
+ "sourceHandle": "item",
2065
+ "target": "findings_prompt",
2066
+ "targetHandle": "step"
2067
+ },
2068
+ {
2069
+ "id": "e-step_search_out-tool_output-findings_prompt-hits",
2070
+ "source": "step_search_out",
2071
+ "sourceHandle": "tool_output",
2072
+ "target": "findings_prompt",
2073
+ "targetHandle": "hits"
2074
+ },
2075
+ {
2076
+ "id": "e-findings_prompt-result-findings-prompt",
2077
+ "source": "findings_prompt",
2078
+ "sourceHandle": "result",
2079
+ "target": "findings",
2080
+ "targetHandle": "prompt"
2081
+ },
2082
+ {
2083
+ "id": "e-start-provider-findings-provider",
2084
+ "source": "start",
2085
+ "sourceHandle": "provider",
2086
+ "target": "findings",
2087
+ "targetHandle": "provider"
2088
+ },
2089
+ {
2090
+ "id": "e-start-model-findings-model",
2091
+ "source": "start",
2092
+ "sourceHandle": "model",
2093
+ "target": "findings",
2094
+ "targetHandle": "model"
2095
+ },
2096
+ {
2097
+ "id": "e-step_search_failed-false-findings-exec-in",
2098
+ "source": "step_search_failed",
2099
+ "sourceHandle": "false",
2100
+ "target": "findings",
2101
+ "targetHandle": "exec-in"
2102
+ },
2103
+ {
2104
+ "id": "e-each_step-item-finding-item",
2105
+ "source": "each_step",
2106
+ "sourceHandle": "item",
2107
+ "target": "finding",
2108
+ "targetHandle": "item"
2109
+ },
2110
+ {
2111
+ "id": "e-findings-data-finding-data",
2112
+ "source": "findings",
2113
+ "sourceHandle": "data",
2114
+ "target": "finding",
2115
+ "targetHandle": "data"
2116
+ },
2117
+ {
2118
+ "id": "e-step_search_out-notes-finding-notes",
2119
+ "source": "step_search_out",
2120
+ "sourceHandle": "notes",
2121
+ "target": "finding",
2122
+ "targetHandle": "notes"
2123
+ },
2124
+ {
2125
+ "id": "e-findings-exec-out-finding-exec-in",
2126
+ "source": "findings",
2127
+ "sourceHandle": "exec-out",
2128
+ "target": "finding",
2129
+ "targetHandle": "exec-in"
2130
+ },
2131
+ {
2132
+ "id": "e-finding-entry-keep_finding-item",
2133
+ "source": "finding",
2134
+ "sourceHandle": "entry",
2135
+ "target": "keep_finding",
2136
+ "targetHandle": "item"
2137
+ },
2138
+ {
2139
+ "id": "e-finding-exec-out-keep_finding-exec-in",
2140
+ "source": "finding",
2141
+ "sourceHandle": "exec-out",
2142
+ "target": "keep_finding",
2143
+ "targetHandle": "exec-in"
2144
+ },
2145
+ {
2146
+ "id": "e-start-question-dossier_prompt-question",
2147
+ "source": "start",
2148
+ "sourceHandle": "question",
2149
+ "target": "dossier_prompt",
2150
+ "targetHandle": "question"
2151
+ },
2152
+ {
2153
+ "id": "e-plan-data-dossier_prompt-plan",
2154
+ "source": "plan",
2155
+ "sourceHandle": "data",
2156
+ "target": "dossier_prompt",
2157
+ "targetHandle": "plan"
2158
+ },
2159
+ {
2160
+ "id": "e-all_findings-value-dossier_prompt-findings",
2161
+ "source": "all_findings",
2162
+ "sourceHandle": "value",
2163
+ "target": "dossier_prompt",
2164
+ "targetHandle": "findings"
2165
+ },
2166
+ {
2167
+ "id": "e-dossier_prompt-result-dossier-prompt",
2168
+ "source": "dossier_prompt",
2169
+ "sourceHandle": "result",
2170
+ "target": "dossier",
2171
+ "targetHandle": "prompt"
2172
+ },
2173
+ {
2174
+ "id": "e-start-provider-dossier-provider",
2175
+ "source": "start",
2176
+ "sourceHandle": "provider",
2177
+ "target": "dossier",
2178
+ "targetHandle": "provider"
2179
+ },
2180
+ {
2181
+ "id": "e-start-model-dossier-model",
2182
+ "source": "start",
2183
+ "sourceHandle": "model",
2184
+ "target": "dossier",
2185
+ "targetHandle": "model"
2186
+ },
2187
+ {
2188
+ "id": "e-each_step-done-dossier-exec-in",
2189
+ "source": "each_step",
2190
+ "sourceHandle": "done",
2191
+ "target": "dossier",
2192
+ "targetHandle": "exec-in"
2193
+ },
2194
+ {
2195
+ "id": "e-dossier-data-dossier_note-data",
2196
+ "source": "dossier",
2197
+ "sourceHandle": "data",
2198
+ "target": "dossier_note",
2199
+ "targetHandle": "data"
2200
+ },
2201
+ {
2202
+ "id": "e-all_findings-value-dossier_note-findings",
2203
+ "source": "all_findings",
2204
+ "sourceHandle": "value",
2205
+ "target": "dossier_note",
2206
+ "targetHandle": "findings"
2207
+ },
2208
+ {
2209
+ "id": "e-search_out-notes-dossier_note-first_notes",
2210
+ "source": "search_out",
2211
+ "sourceHandle": "notes",
2212
+ "target": "dossier_note",
2213
+ "targetHandle": "first_notes"
2214
+ },
2215
+ {
2216
+ "id": "e-search_out-entities-dossier_note-first_entities",
2217
+ "source": "search_out",
2218
+ "sourceHandle": "entities",
2219
+ "target": "dossier_note",
2220
+ "targetHandle": "first_entities"
2221
+ },
2222
+ {
2223
+ "id": "e-start-question-dossier_note-question",
2224
+ "source": "start",
2225
+ "sourceHandle": "question",
2226
+ "target": "dossier_note",
2227
+ "targetHandle": "question"
2228
+ },
2229
+ {
2230
+ "id": "e-dossier-exec-out-dossier_note-exec-in",
2231
+ "source": "dossier",
2232
+ "sourceHandle": "exec-out",
2233
+ "target": "dossier_note",
2234
+ "targetHandle": "exec-in"
2235
+ },
2236
+ {
2237
+ "id": "e-dossier_note-title-write_args-title",
2238
+ "source": "dossier_note",
2239
+ "sourceHandle": "title",
2240
+ "target": "write_args",
2241
+ "targetHandle": "title"
2242
+ },
2243
+ {
2244
+ "id": "e-dossier_note-body-write_args-body",
2245
+ "source": "dossier_note",
2246
+ "sourceHandle": "body",
2247
+ "target": "write_args",
2248
+ "targetHandle": "body"
2249
+ },
2250
+ {
2251
+ "id": "e-dossier_note-evidence_note_ids-write_args-evidence_note_ids",
2252
+ "source": "dossier_note",
2253
+ "sourceHandle": "evidence_note_ids",
2254
+ "target": "write_args",
2255
+ "targetHandle": "evidence_note_ids"
2256
+ },
2257
+ {
2258
+ "id": "e-dossier_note-entity_ids-write_args-entity_ids",
2259
+ "source": "dossier_note",
2260
+ "sourceHandle": "entity_ids",
2261
+ "target": "write_args",
2262
+ "targetHandle": "entity_ids"
2263
+ },
2264
+ {
2265
+ "id": "e-dossier_note-exec-out-write_args-exec-in",
2266
+ "source": "dossier_note",
2267
+ "sourceHandle": "exec-out",
2268
+ "target": "write_args",
2269
+ "targetHandle": "exec-in"
2270
+ },
2271
+ {
2272
+ "id": "e-write_args-tool_calls-write-tool_calls",
2273
+ "source": "write_args",
2274
+ "sourceHandle": "tool_calls",
2275
+ "target": "write",
2276
+ "targetHandle": "tool_calls"
2277
+ },
2278
+ {
2279
+ "id": "e-write_args-exec-out-write-exec-in",
2280
+ "source": "write_args",
2281
+ "sourceHandle": "exec-out",
2282
+ "target": "write",
2283
+ "targetHandle": "exec-in"
2284
+ },
2285
+ {
2286
+ "id": "e-write-results-write_out-results",
2287
+ "source": "write",
2288
+ "sourceHandle": "results",
2289
+ "target": "write_out",
2290
+ "targetHandle": "results"
2291
+ },
2292
+ {
2293
+ "id": "e-write-exec-out-write_out-exec-in",
2294
+ "source": "write",
2295
+ "sourceHandle": "exec-out",
2296
+ "target": "write_out",
2297
+ "targetHandle": "exec-in"
2298
+ },
2299
+ {
2300
+ "id": "e-dossier-data-shape-data",
2301
+ "source": "dossier",
2302
+ "sourceHandle": "data",
2303
+ "target": "shape",
2304
+ "targetHandle": "data"
2305
+ },
2306
+ {
2307
+ "id": "e-dossier_note-narrative-shape-narrative",
2308
+ "source": "dossier_note",
2309
+ "sourceHandle": "narrative",
2310
+ "target": "shape",
2311
+ "targetHandle": "narrative"
2312
+ },
2313
+ {
2314
+ "id": "e-dossier_note-evidence-shape-evidence",
2315
+ "source": "dossier_note",
2316
+ "sourceHandle": "evidence",
2317
+ "target": "shape",
2318
+ "targetHandle": "evidence"
2319
+ },
2320
+ {
2321
+ "id": "e-write_out-note_id-shape-note_id",
2322
+ "source": "write_out",
2323
+ "sourceHandle": "note_id",
2324
+ "target": "shape",
2325
+ "targetHandle": "note_id"
2326
+ },
2327
+ {
2328
+ "id": "e-write_out-exec-out-shape-exec-in",
2329
+ "source": "write_out",
2330
+ "sourceHandle": "exec-out",
2331
+ "target": "shape",
2332
+ "targetHandle": "exec-in"
2333
+ },
2334
+ {
2335
+ "id": "e-shape-response-end-response",
2336
+ "source": "shape",
2337
+ "sourceHandle": "response",
2338
+ "target": "end",
2339
+ "targetHandle": "response"
2340
+ },
2341
+ {
2342
+ "id": "e-shape-answer-end-answer",
2343
+ "source": "shape",
2344
+ "sourceHandle": "answer",
2345
+ "target": "end",
2346
+ "targetHandle": "answer"
2347
+ },
2348
+ {
2349
+ "id": "e-shape-evidence-end-evidence",
2350
+ "source": "shape",
2351
+ "sourceHandle": "evidence",
2352
+ "target": "end",
2353
+ "targetHandle": "evidence"
2354
+ },
2355
+ {
2356
+ "id": "e-shape-evolution-end-evolution",
2357
+ "source": "shape",
2358
+ "sourceHandle": "evolution",
2359
+ "target": "end",
2360
+ "targetHandle": "evolution"
2361
+ },
2362
+ {
2363
+ "id": "e-shape-open_loops-end-open_loops",
2364
+ "source": "shape",
2365
+ "sourceHandle": "open_loops",
2366
+ "target": "end",
2367
+ "targetHandle": "open_loops"
2368
+ },
2369
+ {
2370
+ "id": "e-shape-follow_ups-end-follow_ups",
2371
+ "source": "shape",
2372
+ "sourceHandle": "follow_ups",
2373
+ "target": "end",
2374
+ "targetHandle": "follow_ups"
2375
+ },
2376
+ {
2377
+ "id": "e-shape-dossier_note_id-end-dossier_note_id",
2378
+ "source": "shape",
2379
+ "sourceHandle": "dossier_note_id",
2380
+ "target": "end",
2381
+ "targetHandle": "dossier_note_id"
2382
+ },
2383
+ {
2384
+ "id": "e-shape-exec-out-end-exec-in",
2385
+ "source": "shape",
2386
+ "sourceHandle": "exec-out",
2387
+ "target": "end",
2388
+ "targetHandle": "exec-in"
2389
+ }
2390
+ ],
2391
+ "entryNode": "start"
2392
+ }