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,2057 @@
1
+ {
2
+ "id": "note-reflect",
3
+ "name": "Reflect on your notes",
4
+ "description": "Gather open loops, contradictions, resurfacing material and anniversaries; choose what deserves attention and write it down as insights.",
5
+ "interfaces": [
6
+ "abstractnote.reflect.v1"
7
+ ],
8
+ "nodes": [
9
+ {
10
+ "id": "start",
11
+ "type": "on_flow_start",
12
+ "position": {
13
+ "x": 0.0,
14
+ "y": 0.0
15
+ },
16
+ "data": {
17
+ "nodeType": "on_flow_start",
18
+ "label": "Start",
19
+ "inputs": [],
20
+ "outputs": [
21
+ {
22
+ "id": "exec-out",
23
+ "label": "",
24
+ "type": "execution"
25
+ },
26
+ {
27
+ "id": "limit",
28
+ "label": "limit",
29
+ "type": "number"
30
+ },
31
+ {
32
+ "id": "since",
33
+ "label": "since",
34
+ "type": "string"
35
+ },
36
+ {
37
+ "id": "provider",
38
+ "label": "provider",
39
+ "type": "provider_text"
40
+ },
41
+ {
42
+ "id": "model",
43
+ "label": "model",
44
+ "type": "model"
45
+ }
46
+ ],
47
+ "pinDefaults": {
48
+ "limit": 10,
49
+ "provider": "",
50
+ "model": ""
51
+ }
52
+ }
53
+ },
54
+ {
55
+ "id": "open_loops_args",
56
+ "type": "code",
57
+ "position": {
58
+ "x": 480.0,
59
+ "y": 0.0
60
+ },
61
+ "data": {
62
+ "nodeType": "code",
63
+ "label": "Open loops: arguments",
64
+ "inputs": [
65
+ {
66
+ "id": "exec-in",
67
+ "label": "",
68
+ "type": "execution"
69
+ },
70
+ {
71
+ "id": "limit",
72
+ "label": "limit",
73
+ "type": "number"
74
+ },
75
+ {
76
+ "id": "since",
77
+ "label": "since",
78
+ "type": "string"
79
+ },
80
+ {
81
+ "id": "permissions",
82
+ "label": "permissions",
83
+ "type": "string"
84
+ }
85
+ ],
86
+ "outputs": [
87
+ {
88
+ "id": "exec-out",
89
+ "label": "",
90
+ "type": "execution"
91
+ },
92
+ {
93
+ "id": "tool_calls",
94
+ "label": "tool_calls",
95
+ "type": "array"
96
+ }
97
+ ],
98
+ "pinDefaults": {
99
+ "permissions": "sandbox"
100
+ },
101
+ "functionName": "transform",
102
+ "codeBody": "arguments = {}\nif limit is not None and limit != \"\":\n arguments[\"limit\"] = limit\nif since is not None and since != \"\":\n arguments[\"since\"] = since\nreturn {\"tool_calls\": [{\"name\": \"note_open_loops\", \"call_id\": \"open_loops\", \"arguments\": arguments}]}\n"
103
+ }
104
+ },
105
+ {
106
+ "id": "open_loops",
107
+ "type": "tool_calls",
108
+ "position": {
109
+ "x": 960.0,
110
+ "y": 0.0
111
+ },
112
+ "data": {
113
+ "nodeType": "tool_calls",
114
+ "label": "Open loops",
115
+ "inputs": [
116
+ {
117
+ "id": "exec-in",
118
+ "label": "",
119
+ "type": "execution"
120
+ },
121
+ {
122
+ "id": "tool_calls",
123
+ "label": "tool_calls",
124
+ "type": "array"
125
+ },
126
+ {
127
+ "id": "allowed_tools",
128
+ "label": "allowed_tools",
129
+ "type": "array"
130
+ }
131
+ ],
132
+ "outputs": [
133
+ {
134
+ "id": "exec-out",
135
+ "label": "",
136
+ "type": "execution"
137
+ },
138
+ {
139
+ "id": "results",
140
+ "label": "results",
141
+ "type": "array"
142
+ },
143
+ {
144
+ "id": "success",
145
+ "label": "success",
146
+ "type": "boolean"
147
+ }
148
+ ],
149
+ "pinDefaults": {
150
+ "allowed_tools": [
151
+ "note_open_loops"
152
+ ]
153
+ },
154
+ "effectConfig": {
155
+ "allowed_tools": [
156
+ "note_open_loops"
157
+ ]
158
+ }
159
+ }
160
+ },
161
+ {
162
+ "id": "open_loops_out",
163
+ "type": "code",
164
+ "position": {
165
+ "x": 1440.0,
166
+ "y": 0.0
167
+ },
168
+ "data": {
169
+ "nodeType": "code",
170
+ "label": "Open loops: result",
171
+ "inputs": [
172
+ {
173
+ "id": "exec-in",
174
+ "label": "",
175
+ "type": "execution"
176
+ },
177
+ {
178
+ "id": "results",
179
+ "label": "results",
180
+ "type": "array"
181
+ },
182
+ {
183
+ "id": "permissions",
184
+ "label": "permissions",
185
+ "type": "string"
186
+ }
187
+ ],
188
+ "outputs": [
189
+ {
190
+ "id": "exec-out",
191
+ "label": "",
192
+ "type": "execution"
193
+ },
194
+ {
195
+ "id": "items",
196
+ "label": "items",
197
+ "type": "array"
198
+ },
199
+ {
200
+ "id": "tool_output",
201
+ "label": "tool_output",
202
+ "type": "object"
203
+ }
204
+ ],
205
+ "pinDefaults": {
206
+ "permissions": "sandbox"
207
+ },
208
+ "functionName": "transform",
209
+ "codeBody": "r = results[0] if isinstance(results, list) and results else None\nfailure = None\nout = None\nif not isinstance(r, dict):\n failure = \"note_open_loops returned no result.\"\nelif not r.get(\"success\"):\n failure = str(r.get(\"error\") or \"note_open_loops failed.\")\nelse:\n out = r.get(\"output\")\n if not isinstance(out, dict):\n failure = \"note_open_loops returned something other than an object.\"\nif failure is not None:\n raise ValueError(failure)\nreturn dict(out, tool_output=out)\n"
210
+ }
211
+ },
212
+ {
213
+ "id": "contradictions_args",
214
+ "type": "code",
215
+ "position": {
216
+ "x": 1920.0,
217
+ "y": 0.0
218
+ },
219
+ "data": {
220
+ "nodeType": "code",
221
+ "label": "Contradictions: arguments",
222
+ "inputs": [
223
+ {
224
+ "id": "exec-in",
225
+ "label": "",
226
+ "type": "execution"
227
+ },
228
+ {
229
+ "id": "limit",
230
+ "label": "limit",
231
+ "type": "number"
232
+ },
233
+ {
234
+ "id": "since",
235
+ "label": "since",
236
+ "type": "string"
237
+ },
238
+ {
239
+ "id": "permissions",
240
+ "label": "permissions",
241
+ "type": "string"
242
+ }
243
+ ],
244
+ "outputs": [
245
+ {
246
+ "id": "exec-out",
247
+ "label": "",
248
+ "type": "execution"
249
+ },
250
+ {
251
+ "id": "tool_calls",
252
+ "label": "tool_calls",
253
+ "type": "array"
254
+ }
255
+ ],
256
+ "pinDefaults": {
257
+ "permissions": "sandbox"
258
+ },
259
+ "functionName": "transform",
260
+ "codeBody": "arguments = {}\nif limit is not None and limit != \"\":\n arguments[\"limit\"] = limit\nif since is not None and since != \"\":\n arguments[\"since\"] = since\nreturn {\"tool_calls\": [{\"name\": \"note_contradictions\", \"call_id\": \"contradictions\", \"arguments\": arguments}]}\n"
261
+ }
262
+ },
263
+ {
264
+ "id": "contradictions",
265
+ "type": "tool_calls",
266
+ "position": {
267
+ "x": 2400.0,
268
+ "y": 0.0
269
+ },
270
+ "data": {
271
+ "nodeType": "tool_calls",
272
+ "label": "Contradictions",
273
+ "inputs": [
274
+ {
275
+ "id": "exec-in",
276
+ "label": "",
277
+ "type": "execution"
278
+ },
279
+ {
280
+ "id": "tool_calls",
281
+ "label": "tool_calls",
282
+ "type": "array"
283
+ },
284
+ {
285
+ "id": "allowed_tools",
286
+ "label": "allowed_tools",
287
+ "type": "array"
288
+ }
289
+ ],
290
+ "outputs": [
291
+ {
292
+ "id": "exec-out",
293
+ "label": "",
294
+ "type": "execution"
295
+ },
296
+ {
297
+ "id": "results",
298
+ "label": "results",
299
+ "type": "array"
300
+ },
301
+ {
302
+ "id": "success",
303
+ "label": "success",
304
+ "type": "boolean"
305
+ }
306
+ ],
307
+ "pinDefaults": {
308
+ "allowed_tools": [
309
+ "note_contradictions"
310
+ ]
311
+ },
312
+ "effectConfig": {
313
+ "allowed_tools": [
314
+ "note_contradictions"
315
+ ]
316
+ }
317
+ }
318
+ },
319
+ {
320
+ "id": "contradictions_out",
321
+ "type": "code",
322
+ "position": {
323
+ "x": 2880.0,
324
+ "y": 0.0
325
+ },
326
+ "data": {
327
+ "nodeType": "code",
328
+ "label": "Contradictions: result",
329
+ "inputs": [
330
+ {
331
+ "id": "exec-in",
332
+ "label": "",
333
+ "type": "execution"
334
+ },
335
+ {
336
+ "id": "results",
337
+ "label": "results",
338
+ "type": "array"
339
+ },
340
+ {
341
+ "id": "permissions",
342
+ "label": "permissions",
343
+ "type": "string"
344
+ }
345
+ ],
346
+ "outputs": [
347
+ {
348
+ "id": "exec-out",
349
+ "label": "",
350
+ "type": "execution"
351
+ },
352
+ {
353
+ "id": "items",
354
+ "label": "items",
355
+ "type": "array"
356
+ },
357
+ {
358
+ "id": "tool_output",
359
+ "label": "tool_output",
360
+ "type": "object"
361
+ }
362
+ ],
363
+ "pinDefaults": {
364
+ "permissions": "sandbox"
365
+ },
366
+ "functionName": "transform",
367
+ "codeBody": "r = results[0] if isinstance(results, list) and results else None\nfailure = None\nout = None\nif not isinstance(r, dict):\n failure = \"note_contradictions returned no result.\"\nelif not r.get(\"success\"):\n failure = str(r.get(\"error\") or \"note_contradictions failed.\")\nelse:\n out = r.get(\"output\")\n if not isinstance(out, dict):\n failure = \"note_contradictions returned something other than an object.\"\nif failure is not None:\n raise ValueError(failure)\nreturn dict(out, tool_output=out)\n"
368
+ }
369
+ },
370
+ {
371
+ "id": "resurface_args",
372
+ "type": "code",
373
+ "position": {
374
+ "x": 3360.0,
375
+ "y": 0.0
376
+ },
377
+ "data": {
378
+ "nodeType": "code",
379
+ "label": "Gone quiet: arguments",
380
+ "inputs": [
381
+ {
382
+ "id": "exec-in",
383
+ "label": "",
384
+ "type": "execution"
385
+ },
386
+ {
387
+ "id": "limit",
388
+ "label": "limit",
389
+ "type": "number"
390
+ },
391
+ {
392
+ "id": "since",
393
+ "label": "since",
394
+ "type": "string"
395
+ },
396
+ {
397
+ "id": "permissions",
398
+ "label": "permissions",
399
+ "type": "string"
400
+ }
401
+ ],
402
+ "outputs": [
403
+ {
404
+ "id": "exec-out",
405
+ "label": "",
406
+ "type": "execution"
407
+ },
408
+ {
409
+ "id": "tool_calls",
410
+ "label": "tool_calls",
411
+ "type": "array"
412
+ }
413
+ ],
414
+ "pinDefaults": {
415
+ "permissions": "sandbox"
416
+ },
417
+ "functionName": "transform",
418
+ "codeBody": "arguments = {}\nif limit is not None and limit != \"\":\n arguments[\"limit\"] = limit\nif since is not None and since != \"\":\n arguments[\"since\"] = since\nreturn {\"tool_calls\": [{\"name\": \"note_resurface\", \"call_id\": \"resurface\", \"arguments\": arguments}]}\n"
419
+ }
420
+ },
421
+ {
422
+ "id": "resurface",
423
+ "type": "tool_calls",
424
+ "position": {
425
+ "x": 3840.0,
426
+ "y": 0.0
427
+ },
428
+ "data": {
429
+ "nodeType": "tool_calls",
430
+ "label": "Gone quiet",
431
+ "inputs": [
432
+ {
433
+ "id": "exec-in",
434
+ "label": "",
435
+ "type": "execution"
436
+ },
437
+ {
438
+ "id": "tool_calls",
439
+ "label": "tool_calls",
440
+ "type": "array"
441
+ },
442
+ {
443
+ "id": "allowed_tools",
444
+ "label": "allowed_tools",
445
+ "type": "array"
446
+ }
447
+ ],
448
+ "outputs": [
449
+ {
450
+ "id": "exec-out",
451
+ "label": "",
452
+ "type": "execution"
453
+ },
454
+ {
455
+ "id": "results",
456
+ "label": "results",
457
+ "type": "array"
458
+ },
459
+ {
460
+ "id": "success",
461
+ "label": "success",
462
+ "type": "boolean"
463
+ }
464
+ ],
465
+ "pinDefaults": {
466
+ "allowed_tools": [
467
+ "note_resurface"
468
+ ]
469
+ },
470
+ "effectConfig": {
471
+ "allowed_tools": [
472
+ "note_resurface"
473
+ ]
474
+ }
475
+ }
476
+ },
477
+ {
478
+ "id": "resurface_out",
479
+ "type": "code",
480
+ "position": {
481
+ "x": 4320.0,
482
+ "y": 0.0
483
+ },
484
+ "data": {
485
+ "nodeType": "code",
486
+ "label": "Gone quiet: result",
487
+ "inputs": [
488
+ {
489
+ "id": "exec-in",
490
+ "label": "",
491
+ "type": "execution"
492
+ },
493
+ {
494
+ "id": "results",
495
+ "label": "results",
496
+ "type": "array"
497
+ },
498
+ {
499
+ "id": "permissions",
500
+ "label": "permissions",
501
+ "type": "string"
502
+ }
503
+ ],
504
+ "outputs": [
505
+ {
506
+ "id": "exec-out",
507
+ "label": "",
508
+ "type": "execution"
509
+ },
510
+ {
511
+ "id": "items",
512
+ "label": "items",
513
+ "type": "array"
514
+ },
515
+ {
516
+ "id": "tool_output",
517
+ "label": "tool_output",
518
+ "type": "object"
519
+ }
520
+ ],
521
+ "pinDefaults": {
522
+ "permissions": "sandbox"
523
+ },
524
+ "functionName": "transform",
525
+ "codeBody": "r = results[0] if isinstance(results, list) and results else None\nfailure = None\nout = None\nif not isinstance(r, dict):\n failure = \"note_resurface returned no result.\"\nelif not r.get(\"success\"):\n failure = str(r.get(\"error\") or \"note_resurface failed.\")\nelse:\n out = r.get(\"output\")\n if not isinstance(out, dict):\n failure = \"note_resurface returned something other than an object.\"\nif failure is not None:\n raise ValueError(failure)\nreturn dict(out, tool_output=out)\n"
526
+ }
527
+ },
528
+ {
529
+ "id": "anniversaries_args",
530
+ "type": "code",
531
+ "position": {
532
+ "x": 4800.0,
533
+ "y": 0.0
534
+ },
535
+ "data": {
536
+ "nodeType": "code",
537
+ "label": "Anniversaries: arguments",
538
+ "inputs": [
539
+ {
540
+ "id": "exec-in",
541
+ "label": "",
542
+ "type": "execution"
543
+ },
544
+ {
545
+ "id": "limit",
546
+ "label": "limit",
547
+ "type": "number"
548
+ },
549
+ {
550
+ "id": "since",
551
+ "label": "since",
552
+ "type": "string"
553
+ },
554
+ {
555
+ "id": "permissions",
556
+ "label": "permissions",
557
+ "type": "string"
558
+ }
559
+ ],
560
+ "outputs": [
561
+ {
562
+ "id": "exec-out",
563
+ "label": "",
564
+ "type": "execution"
565
+ },
566
+ {
567
+ "id": "tool_calls",
568
+ "label": "tool_calls",
569
+ "type": "array"
570
+ }
571
+ ],
572
+ "pinDefaults": {
573
+ "permissions": "sandbox"
574
+ },
575
+ "functionName": "transform",
576
+ "codeBody": "arguments = {}\nif limit is not None and limit != \"\":\n arguments[\"limit\"] = limit\nif since is not None and since != \"\":\n arguments[\"since\"] = since\nreturn {\"tool_calls\": [{\"name\": \"note_anniversaries\", \"call_id\": \"anniversaries\", \"arguments\": arguments}]}\n"
577
+ }
578
+ },
579
+ {
580
+ "id": "anniversaries",
581
+ "type": "tool_calls",
582
+ "position": {
583
+ "x": 5280.0,
584
+ "y": 0.0
585
+ },
586
+ "data": {
587
+ "nodeType": "tool_calls",
588
+ "label": "Anniversaries",
589
+ "inputs": [
590
+ {
591
+ "id": "exec-in",
592
+ "label": "",
593
+ "type": "execution"
594
+ },
595
+ {
596
+ "id": "tool_calls",
597
+ "label": "tool_calls",
598
+ "type": "array"
599
+ },
600
+ {
601
+ "id": "allowed_tools",
602
+ "label": "allowed_tools",
603
+ "type": "array"
604
+ }
605
+ ],
606
+ "outputs": [
607
+ {
608
+ "id": "exec-out",
609
+ "label": "",
610
+ "type": "execution"
611
+ },
612
+ {
613
+ "id": "results",
614
+ "label": "results",
615
+ "type": "array"
616
+ },
617
+ {
618
+ "id": "success",
619
+ "label": "success",
620
+ "type": "boolean"
621
+ }
622
+ ],
623
+ "pinDefaults": {
624
+ "allowed_tools": [
625
+ "note_anniversaries"
626
+ ]
627
+ },
628
+ "effectConfig": {
629
+ "allowed_tools": [
630
+ "note_anniversaries"
631
+ ]
632
+ }
633
+ }
634
+ },
635
+ {
636
+ "id": "anniversaries_out",
637
+ "type": "code",
638
+ "position": {
639
+ "x": 5760.0,
640
+ "y": 0.0
641
+ },
642
+ "data": {
643
+ "nodeType": "code",
644
+ "label": "Anniversaries: result",
645
+ "inputs": [
646
+ {
647
+ "id": "exec-in",
648
+ "label": "",
649
+ "type": "execution"
650
+ },
651
+ {
652
+ "id": "results",
653
+ "label": "results",
654
+ "type": "array"
655
+ },
656
+ {
657
+ "id": "permissions",
658
+ "label": "permissions",
659
+ "type": "string"
660
+ }
661
+ ],
662
+ "outputs": [
663
+ {
664
+ "id": "exec-out",
665
+ "label": "",
666
+ "type": "execution"
667
+ },
668
+ {
669
+ "id": "items",
670
+ "label": "items",
671
+ "type": "array"
672
+ },
673
+ {
674
+ "id": "tool_output",
675
+ "label": "tool_output",
676
+ "type": "object"
677
+ }
678
+ ],
679
+ "pinDefaults": {
680
+ "permissions": "sandbox"
681
+ },
682
+ "functionName": "transform",
683
+ "codeBody": "r = results[0] if isinstance(results, list) and results else None\nfailure = None\nout = None\nif not isinstance(r, dict):\n failure = \"note_anniversaries returned no result.\"\nelif not r.get(\"success\"):\n failure = str(r.get(\"error\") or \"note_anniversaries failed.\")\nelse:\n out = r.get(\"output\")\n if not isinstance(out, dict):\n failure = \"note_anniversaries returned something other than an object.\"\nif failure is not None:\n raise ValueError(failure)\nreturn dict(out, tool_output=out)\n"
684
+ }
685
+ },
686
+ {
687
+ "id": "candidates",
688
+ "type": "code",
689
+ "position": {
690
+ "x": 6240.0,
691
+ "y": 0.0
692
+ },
693
+ "data": {
694
+ "nodeType": "code",
695
+ "label": "Candidates",
696
+ "inputs": [
697
+ {
698
+ "id": "exec-in",
699
+ "label": "",
700
+ "type": "execution"
701
+ },
702
+ {
703
+ "id": "open_loops",
704
+ "label": "open_loops",
705
+ "type": "array"
706
+ },
707
+ {
708
+ "id": "contradictions",
709
+ "label": "contradictions",
710
+ "type": "array"
711
+ },
712
+ {
713
+ "id": "resurface",
714
+ "label": "resurface",
715
+ "type": "array"
716
+ },
717
+ {
718
+ "id": "anniversaries",
719
+ "label": "anniversaries",
720
+ "type": "array"
721
+ },
722
+ {
723
+ "id": "permissions",
724
+ "label": "permissions",
725
+ "type": "string"
726
+ }
727
+ ],
728
+ "outputs": [
729
+ {
730
+ "id": "exec-out",
731
+ "label": "",
732
+ "type": "execution"
733
+ },
734
+ {
735
+ "id": "candidates",
736
+ "label": "candidates",
737
+ "type": "array"
738
+ },
739
+ {
740
+ "id": "count",
741
+ "label": "count",
742
+ "type": "number"
743
+ }
744
+ ],
745
+ "pinDefaults": {
746
+ "permissions": "sandbox"
747
+ },
748
+ "functionName": "transform",
749
+ "codeBody": "cands = []\nfor source, items in ((\"open_loops\", open_loops), (\"contradictions\", contradictions),\n (\"resurface\", resurface), (\"anniversaries\", anniversaries)):\n for it in items or []:\n if isinstance(it, dict):\n cands.append(dict(it, index=len(cands), source=source))\nreturn {\"candidates\": cands, \"count\": len(cands)}\n"
750
+ }
751
+ },
752
+ {
753
+ "id": "reflect_prompt",
754
+ "type": "string_template",
755
+ "position": {
756
+ "x": 6240.0,
757
+ "y": 320.0
758
+ },
759
+ "data": {
760
+ "nodeType": "string_template",
761
+ "label": "Reflection prompt",
762
+ "inputs": [
763
+ {
764
+ "id": "template",
765
+ "label": "template",
766
+ "type": "string"
767
+ },
768
+ {
769
+ "id": "candidates",
770
+ "label": "candidates",
771
+ "type": "any"
772
+ },
773
+ {
774
+ "id": "limit",
775
+ "label": "limit",
776
+ "type": "any"
777
+ }
778
+ ],
779
+ "outputs": [
780
+ {
781
+ "id": "result",
782
+ "label": "result",
783
+ "type": "string"
784
+ }
785
+ ],
786
+ "pinDefaults": {
787
+ "template": "You look over candidates drawn from a person's notebook and choose what deserves their attention now.\n\nCandidates (each has an `index` and the `rule` that found it):\n{{candidates}}\n\nChoose at most {{limit}} items. For each, give the `candidate` index, the `kind` (warning, reminder, connection, contradiction or evolution), a short `title`, and a `body` of two or three sentences that says why it matters now and invites the person to add a note about it. Choose nothing when nothing deserves attention.\n\nRules:\n- Use only the candidates above; never invent notes, people or dates.\n- Output JSON only, matching the schema.\n"
788
+ }
789
+ }
790
+ },
791
+ {
792
+ "id": "reflect",
793
+ "type": "llm_call",
794
+ "position": {
795
+ "x": 6720.0,
796
+ "y": 0.0
797
+ },
798
+ "data": {
799
+ "nodeType": "llm_call",
800
+ "label": "Choose what matters",
801
+ "inputs": [
802
+ {
803
+ "id": "exec-in",
804
+ "label": "",
805
+ "type": "execution"
806
+ },
807
+ {
808
+ "id": "provider",
809
+ "label": "provider",
810
+ "type": "provider_text"
811
+ },
812
+ {
813
+ "id": "model",
814
+ "label": "model",
815
+ "type": "model"
816
+ },
817
+ {
818
+ "id": "system",
819
+ "label": "system",
820
+ "type": "string"
821
+ },
822
+ {
823
+ "id": "prompt",
824
+ "label": "prompt",
825
+ "type": "string"
826
+ },
827
+ {
828
+ "id": "tools",
829
+ "label": "tools",
830
+ "type": "tools"
831
+ },
832
+ {
833
+ "id": "temperature",
834
+ "label": "temperature",
835
+ "type": "number"
836
+ },
837
+ {
838
+ "id": "resp_schema",
839
+ "label": "resp_schema",
840
+ "type": "json_schema"
841
+ }
842
+ ],
843
+ "outputs": [
844
+ {
845
+ "id": "exec-out",
846
+ "label": "",
847
+ "type": "execution"
848
+ },
849
+ {
850
+ "id": "response",
851
+ "label": "response",
852
+ "type": "string"
853
+ },
854
+ {
855
+ "id": "data",
856
+ "label": "data",
857
+ "type": "object"
858
+ },
859
+ {
860
+ "id": "success",
861
+ "label": "success",
862
+ "type": "boolean"
863
+ },
864
+ {
865
+ "id": "meta",
866
+ "label": "meta",
867
+ "type": "object"
868
+ },
869
+ {
870
+ "id": "tool_calls",
871
+ "label": "tool_calls",
872
+ "type": "array"
873
+ }
874
+ ],
875
+ "pinDefaults": {
876
+ "tools": [],
877
+ "system": "You file and connect a person's notes. Output JSON only, matching the schema.",
878
+ "temperature": 0.2,
879
+ "resp_schema": {
880
+ "type": "object",
881
+ "properties": {
882
+ "items": {
883
+ "type": "array",
884
+ "items": {
885
+ "type": "object",
886
+ "properties": {
887
+ "candidate": {
888
+ "type": "integer",
889
+ "description": "index in the candidate list"
890
+ },
891
+ "kind": {
892
+ "type": "string",
893
+ "enum": [
894
+ "warning",
895
+ "reminder",
896
+ "connection",
897
+ "contradiction",
898
+ "evolution"
899
+ ]
900
+ },
901
+ "title": {
902
+ "type": "string"
903
+ },
904
+ "body": {
905
+ "type": "string"
906
+ }
907
+ },
908
+ "required": [
909
+ "candidate",
910
+ "kind",
911
+ "title",
912
+ "body"
913
+ ]
914
+ }
915
+ }
916
+ },
917
+ "required": [
918
+ "items"
919
+ ]
920
+ }
921
+ }
922
+ }
923
+ },
924
+ {
925
+ "id": "chosen",
926
+ "type": "code",
927
+ "position": {
928
+ "x": 7200.0,
929
+ "y": 0.0
930
+ },
931
+ "data": {
932
+ "nodeType": "code",
933
+ "label": "Chosen insights",
934
+ "inputs": [
935
+ {
936
+ "id": "exec-in",
937
+ "label": "",
938
+ "type": "execution"
939
+ },
940
+ {
941
+ "id": "data",
942
+ "label": "data",
943
+ "type": "object"
944
+ },
945
+ {
946
+ "id": "candidates",
947
+ "label": "candidates",
948
+ "type": "array"
949
+ },
950
+ {
951
+ "id": "limit",
952
+ "label": "limit",
953
+ "type": "number"
954
+ },
955
+ {
956
+ "id": "permissions",
957
+ "label": "permissions",
958
+ "type": "string"
959
+ }
960
+ ],
961
+ "outputs": [
962
+ {
963
+ "id": "exec-out",
964
+ "label": "",
965
+ "type": "execution"
966
+ },
967
+ {
968
+ "id": "items",
969
+ "label": "items",
970
+ "type": "array"
971
+ },
972
+ {
973
+ "id": "dropped",
974
+ "label": "dropped",
975
+ "type": "number"
976
+ }
977
+ ],
978
+ "pinDefaults": {
979
+ "permissions": "sandbox"
980
+ },
981
+ "functionName": "transform",
982
+ "codeBody": "d = data if isinstance(data, dict) else {}\nby_index = {c.get(\"index\"): c for c in (candidates or []) if isinstance(c, dict)}\nout, dropped = [], 0\nfor it in d.get(\"items\") or []:\n c = by_index.get(it.get(\"candidate\")) if isinstance(it, dict) else None\n if c is None:\n dropped += 1\n continue\n out.append({\"kind\": it.get(\"kind\"), \"title\": str(it.get(\"title\") or \"\"), \"body\": str(it.get(\"body\") or \"\"),\n \"evidence_note_ids\": list(c.get(\"note_ids\") or []), \"entity_ids\": list(c.get(\"entity_ids\") or [])})\ncap = int(limit or 10)\nreturn {\"items\": out[:cap], \"dropped\": dropped}\n"
983
+ }
984
+ },
985
+ {
986
+ "id": "each_insight",
987
+ "type": "loop",
988
+ "position": {
989
+ "x": 7680.0,
990
+ "y": 0.0
991
+ },
992
+ "data": {
993
+ "nodeType": "loop",
994
+ "label": "For each insight",
995
+ "inputs": [
996
+ {
997
+ "id": "exec-in",
998
+ "label": "",
999
+ "type": "execution"
1000
+ },
1001
+ {
1002
+ "id": "items",
1003
+ "label": "items",
1004
+ "type": "array"
1005
+ }
1006
+ ],
1007
+ "outputs": [
1008
+ {
1009
+ "id": "loop",
1010
+ "label": "loop",
1011
+ "type": "execution"
1012
+ },
1013
+ {
1014
+ "id": "done",
1015
+ "label": "done",
1016
+ "type": "execution"
1017
+ },
1018
+ {
1019
+ "id": "item",
1020
+ "label": "item",
1021
+ "type": "any"
1022
+ },
1023
+ {
1024
+ "id": "index",
1025
+ "label": "index",
1026
+ "type": "number"
1027
+ }
1028
+ ]
1029
+ }
1030
+ },
1031
+ {
1032
+ "id": "insight",
1033
+ "type": "break_object",
1034
+ "position": {
1035
+ "x": 7680.0,
1036
+ "y": 320.0
1037
+ },
1038
+ "data": {
1039
+ "nodeType": "break_object",
1040
+ "label": "Insight",
1041
+ "inputs": [
1042
+ {
1043
+ "id": "object",
1044
+ "label": "object",
1045
+ "type": "object"
1046
+ }
1047
+ ],
1048
+ "outputs": [
1049
+ {
1050
+ "id": "kind",
1051
+ "label": "kind",
1052
+ "type": "string"
1053
+ },
1054
+ {
1055
+ "id": "title",
1056
+ "label": "title",
1057
+ "type": "string"
1058
+ },
1059
+ {
1060
+ "id": "body",
1061
+ "label": "body",
1062
+ "type": "string"
1063
+ },
1064
+ {
1065
+ "id": "evidence_note_ids",
1066
+ "label": "evidence_note_ids",
1067
+ "type": "array"
1068
+ },
1069
+ {
1070
+ "id": "entity_ids",
1071
+ "label": "entity_ids",
1072
+ "type": "array"
1073
+ }
1074
+ ],
1075
+ "breakConfig": {
1076
+ "selectedPaths": [
1077
+ "kind",
1078
+ "title",
1079
+ "body",
1080
+ "evidence_note_ids",
1081
+ "entity_ids"
1082
+ ]
1083
+ }
1084
+ }
1085
+ },
1086
+ {
1087
+ "id": "write_args",
1088
+ "type": "code",
1089
+ "position": {
1090
+ "x": 8160.0,
1091
+ "y": 0.0
1092
+ },
1093
+ "data": {
1094
+ "nodeType": "code",
1095
+ "label": "Write the insight: arguments",
1096
+ "inputs": [
1097
+ {
1098
+ "id": "exec-in",
1099
+ "label": "",
1100
+ "type": "execution"
1101
+ },
1102
+ {
1103
+ "id": "kind",
1104
+ "label": "kind",
1105
+ "type": "string"
1106
+ },
1107
+ {
1108
+ "id": "title",
1109
+ "label": "title",
1110
+ "type": "string"
1111
+ },
1112
+ {
1113
+ "id": "body",
1114
+ "label": "body",
1115
+ "type": "string"
1116
+ },
1117
+ {
1118
+ "id": "evidence_note_ids",
1119
+ "label": "evidence_note_ids",
1120
+ "type": "array"
1121
+ },
1122
+ {
1123
+ "id": "entity_ids",
1124
+ "label": "entity_ids",
1125
+ "type": "array"
1126
+ },
1127
+ {
1128
+ "id": "permissions",
1129
+ "label": "permissions",
1130
+ "type": "string"
1131
+ }
1132
+ ],
1133
+ "outputs": [
1134
+ {
1135
+ "id": "exec-out",
1136
+ "label": "",
1137
+ "type": "execution"
1138
+ },
1139
+ {
1140
+ "id": "tool_calls",
1141
+ "label": "tool_calls",
1142
+ "type": "array"
1143
+ }
1144
+ ],
1145
+ "pinDefaults": {
1146
+ "permissions": "sandbox"
1147
+ },
1148
+ "functionName": "transform",
1149
+ "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"
1150
+ }
1151
+ },
1152
+ {
1153
+ "id": "write",
1154
+ "type": "tool_calls",
1155
+ "position": {
1156
+ "x": 8640.0,
1157
+ "y": 0.0
1158
+ },
1159
+ "data": {
1160
+ "nodeType": "tool_calls",
1161
+ "label": "Write the insight",
1162
+ "inputs": [
1163
+ {
1164
+ "id": "exec-in",
1165
+ "label": "",
1166
+ "type": "execution"
1167
+ },
1168
+ {
1169
+ "id": "tool_calls",
1170
+ "label": "tool_calls",
1171
+ "type": "array"
1172
+ },
1173
+ {
1174
+ "id": "allowed_tools",
1175
+ "label": "allowed_tools",
1176
+ "type": "array"
1177
+ }
1178
+ ],
1179
+ "outputs": [
1180
+ {
1181
+ "id": "exec-out",
1182
+ "label": "",
1183
+ "type": "execution"
1184
+ },
1185
+ {
1186
+ "id": "results",
1187
+ "label": "results",
1188
+ "type": "array"
1189
+ },
1190
+ {
1191
+ "id": "success",
1192
+ "label": "success",
1193
+ "type": "boolean"
1194
+ }
1195
+ ],
1196
+ "pinDefaults": {
1197
+ "allowed_tools": [
1198
+ "note_insight_write"
1199
+ ]
1200
+ },
1201
+ "effectConfig": {
1202
+ "allowed_tools": [
1203
+ "note_insight_write"
1204
+ ]
1205
+ }
1206
+ }
1207
+ },
1208
+ {
1209
+ "id": "write_out",
1210
+ "type": "code",
1211
+ "position": {
1212
+ "x": 9120.0,
1213
+ "y": 0.0
1214
+ },
1215
+ "data": {
1216
+ "nodeType": "code",
1217
+ "label": "Write the insight: result",
1218
+ "inputs": [
1219
+ {
1220
+ "id": "exec-in",
1221
+ "label": "",
1222
+ "type": "execution"
1223
+ },
1224
+ {
1225
+ "id": "results",
1226
+ "label": "results",
1227
+ "type": "array"
1228
+ },
1229
+ {
1230
+ "id": "permissions",
1231
+ "label": "permissions",
1232
+ "type": "string"
1233
+ }
1234
+ ],
1235
+ "outputs": [
1236
+ {
1237
+ "id": "exec-out",
1238
+ "label": "",
1239
+ "type": "execution"
1240
+ },
1241
+ {
1242
+ "id": "note_id",
1243
+ "label": "note_id",
1244
+ "type": "string"
1245
+ },
1246
+ {
1247
+ "id": "tool_output",
1248
+ "label": "tool_output",
1249
+ "type": "object"
1250
+ },
1251
+ {
1252
+ "id": "failed",
1253
+ "label": "failed",
1254
+ "type": "boolean"
1255
+ },
1256
+ {
1257
+ "id": "failure",
1258
+ "label": "failure",
1259
+ "type": "string"
1260
+ }
1261
+ ],
1262
+ "pinDefaults": {
1263
+ "permissions": "sandbox"
1264
+ },
1265
+ "functionName": "transform",
1266
+ "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 return {\"failed\": True, \"failure\": failure}\nreturn dict(out, tool_output=out, failed=False, failure=None)\n"
1267
+ }
1268
+ },
1269
+ {
1270
+ "id": "write_failed",
1271
+ "type": "if",
1272
+ "position": {
1273
+ "x": 9600.0,
1274
+ "y": 0.0
1275
+ },
1276
+ "data": {
1277
+ "nodeType": "if",
1278
+ "label": "Write the insight: failed?",
1279
+ "inputs": [
1280
+ {
1281
+ "id": "exec-in",
1282
+ "label": "",
1283
+ "type": "execution"
1284
+ },
1285
+ {
1286
+ "id": "condition",
1287
+ "label": "condition",
1288
+ "type": "boolean"
1289
+ }
1290
+ ],
1291
+ "outputs": [
1292
+ {
1293
+ "id": "true",
1294
+ "label": "true",
1295
+ "type": "execution"
1296
+ },
1297
+ {
1298
+ "id": "false",
1299
+ "label": "false",
1300
+ "type": "execution"
1301
+ }
1302
+ ]
1303
+ }
1304
+ },
1305
+ {
1306
+ "id": "write_stopped",
1307
+ "type": "on_flow_end",
1308
+ "position": {
1309
+ "x": 10080.0,
1310
+ "y": 0.0
1311
+ },
1312
+ "data": {
1313
+ "nodeType": "on_flow_end",
1314
+ "label": "Stopped: write the insight failed",
1315
+ "inputs": [
1316
+ {
1317
+ "id": "exec-in",
1318
+ "label": "",
1319
+ "type": "execution"
1320
+ },
1321
+ {
1322
+ "id": "response",
1323
+ "label": "response",
1324
+ "type": "string"
1325
+ },
1326
+ {
1327
+ "id": "error",
1328
+ "label": "error",
1329
+ "type": "string"
1330
+ },
1331
+ {
1332
+ "id": "success",
1333
+ "label": "success",
1334
+ "type": "boolean"
1335
+ }
1336
+ ],
1337
+ "outputs": [],
1338
+ "pinDefaults": {
1339
+ "success": false
1340
+ }
1341
+ }
1342
+ },
1343
+ {
1344
+ "id": "keep_written",
1345
+ "type": "add_to_list",
1346
+ "position": {
1347
+ "x": 10080.0,
1348
+ "y": 320.0
1349
+ },
1350
+ "data": {
1351
+ "nodeType": "add_to_list",
1352
+ "label": "Remember it",
1353
+ "inputs": [
1354
+ {
1355
+ "id": "exec-in",
1356
+ "label": "",
1357
+ "type": "execution"
1358
+ },
1359
+ {
1360
+ "id": "name",
1361
+ "label": "name",
1362
+ "type": "string"
1363
+ },
1364
+ {
1365
+ "id": "item",
1366
+ "label": "item",
1367
+ "type": "any"
1368
+ },
1369
+ {
1370
+ "id": "items",
1371
+ "label": "items",
1372
+ "type": "array"
1373
+ }
1374
+ ],
1375
+ "outputs": [
1376
+ {
1377
+ "id": "exec-out",
1378
+ "label": "",
1379
+ "type": "execution"
1380
+ },
1381
+ {
1382
+ "id": "list",
1383
+ "label": "list",
1384
+ "type": "array"
1385
+ }
1386
+ ],
1387
+ "pinDefaults": {
1388
+ "name": "reflect_written"
1389
+ }
1390
+ }
1391
+ },
1392
+ {
1393
+ "id": "written",
1394
+ "type": "get_var",
1395
+ "position": {
1396
+ "x": 7680.0,
1397
+ "y": 640.0
1398
+ },
1399
+ "data": {
1400
+ "nodeType": "get_var",
1401
+ "label": "Get reflect_written",
1402
+ "inputs": [
1403
+ {
1404
+ "id": "name",
1405
+ "label": "name",
1406
+ "type": "string"
1407
+ },
1408
+ {
1409
+ "id": "default",
1410
+ "label": "default",
1411
+ "type": "any"
1412
+ }
1413
+ ],
1414
+ "outputs": [
1415
+ {
1416
+ "id": "value",
1417
+ "label": "value",
1418
+ "type": "any"
1419
+ }
1420
+ ],
1421
+ "pinDefaults": {
1422
+ "name": "reflect_written",
1423
+ "default": []
1424
+ }
1425
+ }
1426
+ },
1427
+ {
1428
+ "id": "report",
1429
+ "type": "code",
1430
+ "position": {
1431
+ "x": 8160.0,
1432
+ "y": 346.0
1433
+ },
1434
+ "data": {
1435
+ "nodeType": "code",
1436
+ "label": "Report",
1437
+ "inputs": [
1438
+ {
1439
+ "id": "exec-in",
1440
+ "label": "",
1441
+ "type": "execution"
1442
+ },
1443
+ {
1444
+ "id": "written",
1445
+ "label": "written",
1446
+ "type": "array"
1447
+ },
1448
+ {
1449
+ "id": "count",
1450
+ "label": "count",
1451
+ "type": "number"
1452
+ },
1453
+ {
1454
+ "id": "permissions",
1455
+ "label": "permissions",
1456
+ "type": "string"
1457
+ }
1458
+ ],
1459
+ "outputs": [
1460
+ {
1461
+ "id": "exec-out",
1462
+ "label": "",
1463
+ "type": "execution"
1464
+ },
1465
+ {
1466
+ "id": "message",
1467
+ "label": "message",
1468
+ "type": "string"
1469
+ },
1470
+ {
1471
+ "id": "insight_note_ids",
1472
+ "label": "insight_note_ids",
1473
+ "type": "array"
1474
+ },
1475
+ {
1476
+ "id": "considered",
1477
+ "label": "considered",
1478
+ "type": "number"
1479
+ }
1480
+ ],
1481
+ "pinDefaults": {
1482
+ "permissions": "sandbox"
1483
+ },
1484
+ "functionName": "transform",
1485
+ "codeBody": "n = len(written or [])\nmsg = \"Nothing needs your attention.\" if n == 0 else (\"Wrote \" + str(n) + (\" insight.\" if n == 1 else \" insights.\"))\nreturn {\"message\": msg, \"insight_note_ids\": list(written or []), \"considered\": int(count or 0)}\n"
1486
+ }
1487
+ },
1488
+ {
1489
+ "id": "end",
1490
+ "type": "on_flow_end",
1491
+ "position": {
1492
+ "x": 8640.0,
1493
+ "y": 320.0
1494
+ },
1495
+ "data": {
1496
+ "nodeType": "on_flow_end",
1497
+ "label": "Done",
1498
+ "inputs": [
1499
+ {
1500
+ "id": "exec-in",
1501
+ "label": "",
1502
+ "type": "execution"
1503
+ },
1504
+ {
1505
+ "id": "response",
1506
+ "label": "response",
1507
+ "type": "string"
1508
+ },
1509
+ {
1510
+ "id": "insight_note_ids",
1511
+ "label": "insight_note_ids",
1512
+ "type": "array"
1513
+ },
1514
+ {
1515
+ "id": "considered",
1516
+ "label": "considered",
1517
+ "type": "number"
1518
+ }
1519
+ ],
1520
+ "outputs": []
1521
+ }
1522
+ }
1523
+ ],
1524
+ "edges": [
1525
+ {
1526
+ "id": "e-start-limit-open_loops_args-limit",
1527
+ "source": "start",
1528
+ "sourceHandle": "limit",
1529
+ "target": "open_loops_args",
1530
+ "targetHandle": "limit"
1531
+ },
1532
+ {
1533
+ "id": "e-start-since-open_loops_args-since",
1534
+ "source": "start",
1535
+ "sourceHandle": "since",
1536
+ "target": "open_loops_args",
1537
+ "targetHandle": "since"
1538
+ },
1539
+ {
1540
+ "id": "e-start-exec-out-open_loops_args-exec-in",
1541
+ "source": "start",
1542
+ "sourceHandle": "exec-out",
1543
+ "target": "open_loops_args",
1544
+ "targetHandle": "exec-in"
1545
+ },
1546
+ {
1547
+ "id": "e-open_loops_args-tool_calls-open_loops-tool_calls",
1548
+ "source": "open_loops_args",
1549
+ "sourceHandle": "tool_calls",
1550
+ "target": "open_loops",
1551
+ "targetHandle": "tool_calls"
1552
+ },
1553
+ {
1554
+ "id": "e-open_loops_args-exec-out-open_loops-exec-in",
1555
+ "source": "open_loops_args",
1556
+ "sourceHandle": "exec-out",
1557
+ "target": "open_loops",
1558
+ "targetHandle": "exec-in"
1559
+ },
1560
+ {
1561
+ "id": "e-open_loops-results-open_loops_out-results",
1562
+ "source": "open_loops",
1563
+ "sourceHandle": "results",
1564
+ "target": "open_loops_out",
1565
+ "targetHandle": "results"
1566
+ },
1567
+ {
1568
+ "id": "e-open_loops-exec-out-open_loops_out-exec-in",
1569
+ "source": "open_loops",
1570
+ "sourceHandle": "exec-out",
1571
+ "target": "open_loops_out",
1572
+ "targetHandle": "exec-in"
1573
+ },
1574
+ {
1575
+ "id": "e-start-limit-contradictions_args-limit",
1576
+ "source": "start",
1577
+ "sourceHandle": "limit",
1578
+ "target": "contradictions_args",
1579
+ "targetHandle": "limit"
1580
+ },
1581
+ {
1582
+ "id": "e-start-since-contradictions_args-since",
1583
+ "source": "start",
1584
+ "sourceHandle": "since",
1585
+ "target": "contradictions_args",
1586
+ "targetHandle": "since"
1587
+ },
1588
+ {
1589
+ "id": "e-open_loops_out-exec-out-contradictions_args-exec-in",
1590
+ "source": "open_loops_out",
1591
+ "sourceHandle": "exec-out",
1592
+ "target": "contradictions_args",
1593
+ "targetHandle": "exec-in"
1594
+ },
1595
+ {
1596
+ "id": "e-contradictions_args-tool_calls-contradictions-tool_calls",
1597
+ "source": "contradictions_args",
1598
+ "sourceHandle": "tool_calls",
1599
+ "target": "contradictions",
1600
+ "targetHandle": "tool_calls"
1601
+ },
1602
+ {
1603
+ "id": "e-contradictions_args-exec-out-contradictions-exec-in",
1604
+ "source": "contradictions_args",
1605
+ "sourceHandle": "exec-out",
1606
+ "target": "contradictions",
1607
+ "targetHandle": "exec-in"
1608
+ },
1609
+ {
1610
+ "id": "e-contradictions-results-contradictions_out-results",
1611
+ "source": "contradictions",
1612
+ "sourceHandle": "results",
1613
+ "target": "contradictions_out",
1614
+ "targetHandle": "results"
1615
+ },
1616
+ {
1617
+ "id": "e-contradictions-exec-out-contradictions_out-exec-in",
1618
+ "source": "contradictions",
1619
+ "sourceHandle": "exec-out",
1620
+ "target": "contradictions_out",
1621
+ "targetHandle": "exec-in"
1622
+ },
1623
+ {
1624
+ "id": "e-start-limit-resurface_args-limit",
1625
+ "source": "start",
1626
+ "sourceHandle": "limit",
1627
+ "target": "resurface_args",
1628
+ "targetHandle": "limit"
1629
+ },
1630
+ {
1631
+ "id": "e-start-since-resurface_args-since",
1632
+ "source": "start",
1633
+ "sourceHandle": "since",
1634
+ "target": "resurface_args",
1635
+ "targetHandle": "since"
1636
+ },
1637
+ {
1638
+ "id": "e-contradictions_out-exec-out-resurface_args-exec-in",
1639
+ "source": "contradictions_out",
1640
+ "sourceHandle": "exec-out",
1641
+ "target": "resurface_args",
1642
+ "targetHandle": "exec-in"
1643
+ },
1644
+ {
1645
+ "id": "e-resurface_args-tool_calls-resurface-tool_calls",
1646
+ "source": "resurface_args",
1647
+ "sourceHandle": "tool_calls",
1648
+ "target": "resurface",
1649
+ "targetHandle": "tool_calls"
1650
+ },
1651
+ {
1652
+ "id": "e-resurface_args-exec-out-resurface-exec-in",
1653
+ "source": "resurface_args",
1654
+ "sourceHandle": "exec-out",
1655
+ "target": "resurface",
1656
+ "targetHandle": "exec-in"
1657
+ },
1658
+ {
1659
+ "id": "e-resurface-results-resurface_out-results",
1660
+ "source": "resurface",
1661
+ "sourceHandle": "results",
1662
+ "target": "resurface_out",
1663
+ "targetHandle": "results"
1664
+ },
1665
+ {
1666
+ "id": "e-resurface-exec-out-resurface_out-exec-in",
1667
+ "source": "resurface",
1668
+ "sourceHandle": "exec-out",
1669
+ "target": "resurface_out",
1670
+ "targetHandle": "exec-in"
1671
+ },
1672
+ {
1673
+ "id": "e-start-limit-anniversaries_args-limit",
1674
+ "source": "start",
1675
+ "sourceHandle": "limit",
1676
+ "target": "anniversaries_args",
1677
+ "targetHandle": "limit"
1678
+ },
1679
+ {
1680
+ "id": "e-start-since-anniversaries_args-since",
1681
+ "source": "start",
1682
+ "sourceHandle": "since",
1683
+ "target": "anniversaries_args",
1684
+ "targetHandle": "since"
1685
+ },
1686
+ {
1687
+ "id": "e-resurface_out-exec-out-anniversaries_args-exec-in",
1688
+ "source": "resurface_out",
1689
+ "sourceHandle": "exec-out",
1690
+ "target": "anniversaries_args",
1691
+ "targetHandle": "exec-in"
1692
+ },
1693
+ {
1694
+ "id": "e-anniversaries_args-tool_calls-anniversaries-tool_calls",
1695
+ "source": "anniversaries_args",
1696
+ "sourceHandle": "tool_calls",
1697
+ "target": "anniversaries",
1698
+ "targetHandle": "tool_calls"
1699
+ },
1700
+ {
1701
+ "id": "e-anniversaries_args-exec-out-anniversaries-exec-in",
1702
+ "source": "anniversaries_args",
1703
+ "sourceHandle": "exec-out",
1704
+ "target": "anniversaries",
1705
+ "targetHandle": "exec-in"
1706
+ },
1707
+ {
1708
+ "id": "e-anniversaries-results-anniversaries_out-results",
1709
+ "source": "anniversaries",
1710
+ "sourceHandle": "results",
1711
+ "target": "anniversaries_out",
1712
+ "targetHandle": "results"
1713
+ },
1714
+ {
1715
+ "id": "e-anniversaries-exec-out-anniversaries_out-exec-in",
1716
+ "source": "anniversaries",
1717
+ "sourceHandle": "exec-out",
1718
+ "target": "anniversaries_out",
1719
+ "targetHandle": "exec-in"
1720
+ },
1721
+ {
1722
+ "id": "e-open_loops_out-items-candidates-open_loops",
1723
+ "source": "open_loops_out",
1724
+ "sourceHandle": "items",
1725
+ "target": "candidates",
1726
+ "targetHandle": "open_loops"
1727
+ },
1728
+ {
1729
+ "id": "e-contradictions_out-items-candidates-contradictions",
1730
+ "source": "contradictions_out",
1731
+ "sourceHandle": "items",
1732
+ "target": "candidates",
1733
+ "targetHandle": "contradictions"
1734
+ },
1735
+ {
1736
+ "id": "e-resurface_out-items-candidates-resurface",
1737
+ "source": "resurface_out",
1738
+ "sourceHandle": "items",
1739
+ "target": "candidates",
1740
+ "targetHandle": "resurface"
1741
+ },
1742
+ {
1743
+ "id": "e-anniversaries_out-items-candidates-anniversaries",
1744
+ "source": "anniversaries_out",
1745
+ "sourceHandle": "items",
1746
+ "target": "candidates",
1747
+ "targetHandle": "anniversaries"
1748
+ },
1749
+ {
1750
+ "id": "e-anniversaries_out-exec-out-candidates-exec-in",
1751
+ "source": "anniversaries_out",
1752
+ "sourceHandle": "exec-out",
1753
+ "target": "candidates",
1754
+ "targetHandle": "exec-in"
1755
+ },
1756
+ {
1757
+ "id": "e-candidates-candidates-reflect_prompt-candidates",
1758
+ "source": "candidates",
1759
+ "sourceHandle": "candidates",
1760
+ "target": "reflect_prompt",
1761
+ "targetHandle": "candidates"
1762
+ },
1763
+ {
1764
+ "id": "e-start-limit-reflect_prompt-limit",
1765
+ "source": "start",
1766
+ "sourceHandle": "limit",
1767
+ "target": "reflect_prompt",
1768
+ "targetHandle": "limit"
1769
+ },
1770
+ {
1771
+ "id": "e-reflect_prompt-result-reflect-prompt",
1772
+ "source": "reflect_prompt",
1773
+ "sourceHandle": "result",
1774
+ "target": "reflect",
1775
+ "targetHandle": "prompt"
1776
+ },
1777
+ {
1778
+ "id": "e-start-provider-reflect-provider",
1779
+ "source": "start",
1780
+ "sourceHandle": "provider",
1781
+ "target": "reflect",
1782
+ "targetHandle": "provider"
1783
+ },
1784
+ {
1785
+ "id": "e-start-model-reflect-model",
1786
+ "source": "start",
1787
+ "sourceHandle": "model",
1788
+ "target": "reflect",
1789
+ "targetHandle": "model"
1790
+ },
1791
+ {
1792
+ "id": "e-candidates-exec-out-reflect-exec-in",
1793
+ "source": "candidates",
1794
+ "sourceHandle": "exec-out",
1795
+ "target": "reflect",
1796
+ "targetHandle": "exec-in"
1797
+ },
1798
+ {
1799
+ "id": "e-reflect-data-chosen-data",
1800
+ "source": "reflect",
1801
+ "sourceHandle": "data",
1802
+ "target": "chosen",
1803
+ "targetHandle": "data"
1804
+ },
1805
+ {
1806
+ "id": "e-candidates-candidates-chosen-candidates",
1807
+ "source": "candidates",
1808
+ "sourceHandle": "candidates",
1809
+ "target": "chosen",
1810
+ "targetHandle": "candidates"
1811
+ },
1812
+ {
1813
+ "id": "e-start-limit-chosen-limit",
1814
+ "source": "start",
1815
+ "sourceHandle": "limit",
1816
+ "target": "chosen",
1817
+ "targetHandle": "limit"
1818
+ },
1819
+ {
1820
+ "id": "e-reflect-exec-out-chosen-exec-in",
1821
+ "source": "reflect",
1822
+ "sourceHandle": "exec-out",
1823
+ "target": "chosen",
1824
+ "targetHandle": "exec-in"
1825
+ },
1826
+ {
1827
+ "id": "e-chosen-items-each_insight-items",
1828
+ "source": "chosen",
1829
+ "sourceHandle": "items",
1830
+ "target": "each_insight",
1831
+ "targetHandle": "items"
1832
+ },
1833
+ {
1834
+ "id": "e-chosen-exec-out-each_insight-exec-in",
1835
+ "source": "chosen",
1836
+ "sourceHandle": "exec-out",
1837
+ "target": "each_insight",
1838
+ "targetHandle": "exec-in"
1839
+ },
1840
+ {
1841
+ "id": "e-each_insight-item-insight-object",
1842
+ "source": "each_insight",
1843
+ "sourceHandle": "item",
1844
+ "target": "insight",
1845
+ "targetHandle": "object"
1846
+ },
1847
+ {
1848
+ "id": "e-insight-kind-write_args-kind",
1849
+ "source": "insight",
1850
+ "sourceHandle": "kind",
1851
+ "target": "write_args",
1852
+ "targetHandle": "kind"
1853
+ },
1854
+ {
1855
+ "id": "e-insight-title-write_args-title",
1856
+ "source": "insight",
1857
+ "sourceHandle": "title",
1858
+ "target": "write_args",
1859
+ "targetHandle": "title"
1860
+ },
1861
+ {
1862
+ "id": "e-insight-body-write_args-body",
1863
+ "source": "insight",
1864
+ "sourceHandle": "body",
1865
+ "target": "write_args",
1866
+ "targetHandle": "body"
1867
+ },
1868
+ {
1869
+ "id": "e-insight-evidence_note_ids-write_args-evidence_note_ids",
1870
+ "source": "insight",
1871
+ "sourceHandle": "evidence_note_ids",
1872
+ "target": "write_args",
1873
+ "targetHandle": "evidence_note_ids"
1874
+ },
1875
+ {
1876
+ "id": "e-insight-entity_ids-write_args-entity_ids",
1877
+ "source": "insight",
1878
+ "sourceHandle": "entity_ids",
1879
+ "target": "write_args",
1880
+ "targetHandle": "entity_ids"
1881
+ },
1882
+ {
1883
+ "id": "e-each_insight-loop-write_args-exec-in",
1884
+ "source": "each_insight",
1885
+ "sourceHandle": "loop",
1886
+ "target": "write_args",
1887
+ "targetHandle": "exec-in"
1888
+ },
1889
+ {
1890
+ "id": "e-write_args-tool_calls-write-tool_calls",
1891
+ "source": "write_args",
1892
+ "sourceHandle": "tool_calls",
1893
+ "target": "write",
1894
+ "targetHandle": "tool_calls"
1895
+ },
1896
+ {
1897
+ "id": "e-write_args-exec-out-write-exec-in",
1898
+ "source": "write_args",
1899
+ "sourceHandle": "exec-out",
1900
+ "target": "write",
1901
+ "targetHandle": "exec-in"
1902
+ },
1903
+ {
1904
+ "id": "e-write-results-write_out-results",
1905
+ "source": "write",
1906
+ "sourceHandle": "results",
1907
+ "target": "write_out",
1908
+ "targetHandle": "results"
1909
+ },
1910
+ {
1911
+ "id": "e-write-exec-out-write_out-exec-in",
1912
+ "source": "write",
1913
+ "sourceHandle": "exec-out",
1914
+ "target": "write_out",
1915
+ "targetHandle": "exec-in"
1916
+ },
1917
+ {
1918
+ "id": "e-write_out-failed-write_failed-condition",
1919
+ "source": "write_out",
1920
+ "sourceHandle": "failed",
1921
+ "target": "write_failed",
1922
+ "targetHandle": "condition"
1923
+ },
1924
+ {
1925
+ "id": "e-write_out-exec-out-write_failed-exec-in",
1926
+ "source": "write_out",
1927
+ "sourceHandle": "exec-out",
1928
+ "target": "write_failed",
1929
+ "targetHandle": "exec-in"
1930
+ },
1931
+ {
1932
+ "id": "e-write_out-failure-write_stopped-response",
1933
+ "source": "write_out",
1934
+ "sourceHandle": "failure",
1935
+ "target": "write_stopped",
1936
+ "targetHandle": "response"
1937
+ },
1938
+ {
1939
+ "id": "e-write_out-failure-write_stopped-error",
1940
+ "source": "write_out",
1941
+ "sourceHandle": "failure",
1942
+ "target": "write_stopped",
1943
+ "targetHandle": "error"
1944
+ },
1945
+ {
1946
+ "id": "e-write_failed-true-write_stopped-exec-in",
1947
+ "source": "write_failed",
1948
+ "sourceHandle": "true",
1949
+ "target": "write_stopped",
1950
+ "targetHandle": "exec-in"
1951
+ },
1952
+ {
1953
+ "id": "e-write_out-note_id-keep_written-item",
1954
+ "source": "write_out",
1955
+ "sourceHandle": "note_id",
1956
+ "target": "keep_written",
1957
+ "targetHandle": "item"
1958
+ },
1959
+ {
1960
+ "id": "e-write_failed-false-keep_written-exec-in",
1961
+ "source": "write_failed",
1962
+ "sourceHandle": "false",
1963
+ "target": "keep_written",
1964
+ "targetHandle": "exec-in"
1965
+ },
1966
+ {
1967
+ "id": "e-written-value-report-written",
1968
+ "source": "written",
1969
+ "sourceHandle": "value",
1970
+ "target": "report",
1971
+ "targetHandle": "written"
1972
+ },
1973
+ {
1974
+ "id": "e-candidates-count-report-count",
1975
+ "source": "candidates",
1976
+ "sourceHandle": "count",
1977
+ "target": "report",
1978
+ "targetHandle": "count"
1979
+ },
1980
+ {
1981
+ "id": "e-each_insight-done-report-exec-in",
1982
+ "source": "each_insight",
1983
+ "sourceHandle": "done",
1984
+ "target": "report",
1985
+ "targetHandle": "exec-in"
1986
+ },
1987
+ {
1988
+ "id": "e-report-message-end-response",
1989
+ "source": "report",
1990
+ "sourceHandle": "message",
1991
+ "target": "end",
1992
+ "targetHandle": "response"
1993
+ },
1994
+ {
1995
+ "id": "e-report-insight_note_ids-end-insight_note_ids",
1996
+ "source": "report",
1997
+ "sourceHandle": "insight_note_ids",
1998
+ "target": "end",
1999
+ "targetHandle": "insight_note_ids"
2000
+ },
2001
+ {
2002
+ "id": "e-report-considered-end-considered",
2003
+ "source": "report",
2004
+ "sourceHandle": "considered",
2005
+ "target": "end",
2006
+ "targetHandle": "considered"
2007
+ },
2008
+ {
2009
+ "id": "e-report-exec-out-end-exec-in",
2010
+ "source": "report",
2011
+ "sourceHandle": "exec-out",
2012
+ "target": "end",
2013
+ "targetHandle": "exec-in"
2014
+ }
2015
+ ],
2016
+ "entryNode": "start",
2017
+ "automation_defaults": {
2018
+ "schema_version": 1,
2019
+ "title": "Note reflection",
2020
+ "trigger": {
2021
+ "source_id": "schedule",
2022
+ "source_version": 2,
2023
+ "config": {
2024
+ "kind": "every",
2025
+ "every": "7d"
2026
+ }
2027
+ },
2028
+ "context": {
2029
+ "mode": "independent"
2030
+ },
2031
+ "input_data": {
2032
+ "limit": 10,
2033
+ "_runtime": {
2034
+ "allowed_tools": [
2035
+ "note_capture",
2036
+ "note_file",
2037
+ "note_context",
2038
+ "note_resolve_candidates",
2039
+ "note_apply_revision",
2040
+ "note_queue_lease",
2041
+ "note_queue_ack",
2042
+ "note_queue_stats",
2043
+ "note_search",
2044
+ "note_expand",
2045
+ "note_changes",
2046
+ "note_entity",
2047
+ "note_timeline",
2048
+ "note_open_loops",
2049
+ "note_contradictions",
2050
+ "note_resurface",
2051
+ "note_anniversaries",
2052
+ "note_insight_write"
2053
+ ]
2054
+ }
2055
+ }
2056
+ }
2057
+ }