@almadar/evaluator 2.32.0 → 2.33.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,6 +1,5 @@
1
1
  import { isSExpr, isBinding, getOperator, getArgs, isFieldValue, isEventPayloadValue, isSessionHistoryEntry, isPlanSnapshot, OrbitalZodSchema, safeParseOrbitalSchema } from '@almadar/core';
2
2
  export { CORE_BINDINGS, ExpressionSchema, SExprSchema, collectBindings, getArgs, getOperator, isBinding, isSExpr, isSExprAtom, isSExprCall, isValidBinding, parseBinding, sexpr, walkSExpr } from '@almadar/core';
3
- import { createRequire } from 'module';
4
3
 
5
4
  // types/expression.ts
6
5
 
@@ -104,10 +103,3683 @@ function resolveBinding(binding, ctx) {
104
103
  }
105
104
  return value;
106
105
  }
107
- var require2 = createRequire(import.meta.url);
108
- var canonicalOperators = require2("@almadar/std/canonical-operators.json");
106
+
107
+ // node_modules/.pnpm/@almadar+std@16.142.0/node_modules/@almadar/std/canonical-operators.json
108
+ var canonical_operators_default = {
109
+ operators: {
110
+ "!=": {
111
+ category: "comparison",
112
+ minArity: 2,
113
+ maxArity: 2,
114
+ returnType: "boolean",
115
+ description: "Not equal to",
116
+ module: "core"
117
+ },
118
+ "%": {
119
+ category: "arithmetic",
120
+ minArity: 2,
121
+ maxArity: 2,
122
+ returnType: "number",
123
+ description: "Modulo (remainder)",
124
+ module: "core"
125
+ },
126
+ "*": {
127
+ category: "arithmetic",
128
+ minArity: 2,
129
+ maxArity: null,
130
+ returnType: "number",
131
+ description: "Multiply numbers",
132
+ module: "core"
133
+ },
134
+ "+": {
135
+ category: "arithmetic",
136
+ minArity: 2,
137
+ maxArity: null,
138
+ returnType: "number",
139
+ description: "Add numbers",
140
+ module: "core"
141
+ },
142
+ "-": {
143
+ category: "arithmetic",
144
+ minArity: 1,
145
+ maxArity: 2,
146
+ returnType: "number",
147
+ description: "Subtract or negate",
148
+ module: "core"
149
+ },
150
+ "/": {
151
+ category: "arithmetic",
152
+ minArity: 2,
153
+ maxArity: 2,
154
+ returnType: "number",
155
+ description: "Divide numbers",
156
+ module: "core"
157
+ },
158
+ "<": {
159
+ category: "comparison",
160
+ minArity: 2,
161
+ maxArity: 2,
162
+ returnType: "boolean",
163
+ description: "Less than",
164
+ module: "core"
165
+ },
166
+ "<=": {
167
+ category: "comparison",
168
+ minArity: 2,
169
+ maxArity: 2,
170
+ returnType: "boolean",
171
+ description: "Less than or equal",
172
+ module: "core"
173
+ },
174
+ "=": {
175
+ category: "comparison",
176
+ minArity: 2,
177
+ maxArity: 2,
178
+ returnType: "boolean",
179
+ description: "Equal to",
180
+ module: "core"
181
+ },
182
+ ">": {
183
+ category: "comparison",
184
+ minArity: 2,
185
+ maxArity: 2,
186
+ returnType: "boolean",
187
+ description: "Greater than",
188
+ module: "core"
189
+ },
190
+ ">=": {
191
+ category: "comparison",
192
+ minArity: 2,
193
+ maxArity: 2,
194
+ returnType: "boolean",
195
+ description: "Greater than or equal",
196
+ module: "core"
197
+ },
198
+ and: {
199
+ category: "logic",
200
+ minArity: 2,
201
+ maxArity: null,
202
+ returnType: "boolean",
203
+ description: "Logical AND (returns the last truthy value, NOT a boolean \u2014 short-circuit)",
204
+ module: "core",
205
+ returnSemantics: "last-truthy-of-args"
206
+ },
207
+ "anim/direction-from-delta": {
208
+ category: "std-anim",
209
+ minArity: 2,
210
+ maxArity: 3,
211
+ returnType: "string",
212
+ description: "Facing direction string from (dx,dy); 4-way (default) or 8-way",
213
+ module: "anim"
214
+ },
215
+ "anim/frame-at": {
216
+ category: "std-anim",
217
+ minArity: 3,
218
+ maxArity: 4,
219
+ returnType: "number",
220
+ description: "Frame index for elapsed time; loops by default, else clamps to last",
221
+ module: "anim"
222
+ },
223
+ "anim/sheet-rect": {
224
+ category: "std-anim",
225
+ minArity: 4,
226
+ maxArity: 4,
227
+ returnType: "object",
228
+ description: "Source rect {sx,sy,sw,sh} for a frame index on a sprite sheet",
229
+ module: "anim"
230
+ },
231
+ "array/append": {
232
+ category: "std-array",
233
+ minArity: 2,
234
+ maxArity: 2,
235
+ returnType: "array",
236
+ description: "Add item to end (returns new array)",
237
+ module: "array"
238
+ },
239
+ "array/avg": {
240
+ category: "std-array",
241
+ minArity: 1,
242
+ maxArity: 2,
243
+ returnType: "number",
244
+ description: "Average of values (optionally by field)",
245
+ module: "array"
246
+ },
247
+ "array/concat": {
248
+ category: "std-array",
249
+ minArity: 2,
250
+ maxArity: null,
251
+ returnType: "array",
252
+ description: "Concatenate arrays",
253
+ module: "array"
254
+ },
255
+ "array/count": {
256
+ category: "std-array",
257
+ minArity: 1,
258
+ maxArity: 2,
259
+ returnType: "number",
260
+ description: "Count elements (optionally matching predicate)",
261
+ module: "array"
262
+ },
263
+ "array/drop": {
264
+ category: "std-array",
265
+ minArity: 2,
266
+ maxArity: 2,
267
+ returnType: "array",
268
+ description: "Skip first n elements",
269
+ module: "array"
270
+ },
271
+ "array/dropLast": {
272
+ category: "std-array",
273
+ minArity: 2,
274
+ maxArity: 2,
275
+ returnType: "array",
276
+ description: "Skip last n elements",
277
+ module: "array"
278
+ },
279
+ "array/empty?": {
280
+ category: "std-array",
281
+ minArity: 1,
282
+ maxArity: 1,
283
+ returnType: "boolean",
284
+ description: "Check if array is empty",
285
+ module: "array"
286
+ },
287
+ "array/every": {
288
+ category: "std-array",
289
+ minArity: 2,
290
+ maxArity: 2,
291
+ returnType: "boolean",
292
+ description: "Check if all elements match predicate",
293
+ module: "array"
294
+ },
295
+ "array/filter": {
296
+ category: "std-array",
297
+ minArity: 2,
298
+ maxArity: 2,
299
+ returnType: "array",
300
+ description: "Keep elements matching predicate (returns same array element type as input)",
301
+ module: "array",
302
+ returnSemantics: "identity-of-arg<0>"
303
+ },
304
+ "array/find": {
305
+ category: "std-array",
306
+ minArity: 2,
307
+ maxArity: 2,
308
+ returnType: "any",
309
+ description: "Find first element matching predicate (element type of input array, undefined when no match)",
310
+ module: "array",
311
+ returnSemantics: "element-of-arg<0>?"
312
+ },
313
+ "array/findIndex": {
314
+ category: "std-array",
315
+ minArity: 2,
316
+ maxArity: 2,
317
+ returnType: "number",
318
+ description: "Find index of first element matching predicate (-1 if none)",
319
+ module: "array"
320
+ },
321
+ "array/first": {
322
+ category: "std-array",
323
+ minArity: 1,
324
+ maxArity: 1,
325
+ returnType: "any",
326
+ description: "Get first element (element type of input array, may be undefined when empty)",
327
+ module: "array",
328
+ returnSemantics: "element-of-arg<0>?"
329
+ },
330
+ "array/flatten": {
331
+ category: "std-array",
332
+ minArity: 1,
333
+ maxArity: 1,
334
+ returnType: "array",
335
+ description: "Flatten nested arrays one level",
336
+ module: "array"
337
+ },
338
+ "array/groupBy": {
339
+ category: "std-array",
340
+ minArity: 2,
341
+ maxArity: 2,
342
+ returnType: "any",
343
+ description: "Group elements by field value",
344
+ module: "array"
345
+ },
346
+ "array/includes": {
347
+ category: "std-array",
348
+ minArity: 2,
349
+ maxArity: 2,
350
+ returnType: "boolean",
351
+ description: "Check if array contains item",
352
+ module: "array"
353
+ },
354
+ "array/indexOf": {
355
+ category: "std-array",
356
+ minArity: 2,
357
+ maxArity: 2,
358
+ returnType: "number",
359
+ description: "Find index of item (-1 if not found)",
360
+ module: "array"
361
+ },
362
+ "array/insert": {
363
+ category: "std-array",
364
+ minArity: 3,
365
+ maxArity: 3,
366
+ returnType: "array",
367
+ description: "Insert item at index (returns new array)",
368
+ module: "array"
369
+ },
370
+ "array/last": {
371
+ category: "std-array",
372
+ minArity: 1,
373
+ maxArity: 1,
374
+ returnType: "any",
375
+ description: "Get last element (element type of input array, may be undefined when empty)",
376
+ module: "array",
377
+ returnSemantics: "element-of-arg<0>?"
378
+ },
379
+ "array/len": {
380
+ category: "std-array",
381
+ minArity: 1,
382
+ maxArity: 1,
383
+ returnType: "number",
384
+ description: "Array length",
385
+ module: "array"
386
+ },
387
+ "array/map": {
388
+ category: "std-array",
389
+ minArity: 2,
390
+ maxArity: 2,
391
+ returnType: "array",
392
+ description: "Transform each element (return type wraps the lambda result in an array)",
393
+ module: "array",
394
+ returnSemantics: "lambda-result"
395
+ },
396
+ "array/max": {
397
+ category: "std-array",
398
+ minArity: 1,
399
+ maxArity: 2,
400
+ returnType: "number",
401
+ description: "Maximum value (optionally by field)",
402
+ module: "array"
403
+ },
404
+ "array/min": {
405
+ category: "std-array",
406
+ minArity: 1,
407
+ maxArity: 2,
408
+ returnType: "number",
409
+ description: "Minimum value (optionally by field)",
410
+ module: "array"
411
+ },
412
+ "array/nth": {
413
+ category: "std-array",
414
+ minArity: 2,
415
+ maxArity: 2,
416
+ returnType: "any",
417
+ description: "Get element at index (element type of input array, may be undefined out-of-bounds)",
418
+ module: "array",
419
+ returnSemantics: "element-of-arg<0>?"
420
+ },
421
+ "array/partition": {
422
+ category: "std-array",
423
+ minArity: 2,
424
+ maxArity: 2,
425
+ returnType: "array",
426
+ description: "Split array by predicate into [matches, nonMatches]",
427
+ module: "array"
428
+ },
429
+ "array/prepend": {
430
+ category: "std-array",
431
+ minArity: 2,
432
+ maxArity: 2,
433
+ returnType: "array",
434
+ description: "Add item to start (returns new array)",
435
+ module: "array"
436
+ },
437
+ "array/range": {
438
+ category: "std-array",
439
+ minArity: 1,
440
+ maxArity: 3,
441
+ returnType: "array",
442
+ description: "Generate numbers: (range n) => [0,n); (range start end) => [start,end); optional step",
443
+ module: "array"
444
+ },
445
+ "array/reduce": {
446
+ category: "std-array",
447
+ minArity: 3,
448
+ maxArity: 3,
449
+ returnType: "any",
450
+ description: "Reduce array to single value (return type matches the lambda result / init type)",
451
+ module: "array",
452
+ returnSemantics: "lambda-result"
453
+ },
454
+ "array/reject": {
455
+ category: "std-array",
456
+ minArity: 2,
457
+ maxArity: 2,
458
+ returnType: "array",
459
+ description: "Remove elements matching predicate (returns same array element type as input)",
460
+ module: "array",
461
+ returnSemantics: "identity-of-arg<0>"
462
+ },
463
+ "array/remove": {
464
+ category: "std-array",
465
+ minArity: 2,
466
+ maxArity: 2,
467
+ returnType: "array",
468
+ description: "Remove item at index (returns new array)",
469
+ module: "array"
470
+ },
471
+ "array/removeItem": {
472
+ category: "std-array",
473
+ minArity: 2,
474
+ maxArity: 2,
475
+ returnType: "array",
476
+ description: "Remove first matching item (returns new array)",
477
+ module: "array"
478
+ },
479
+ "array/reverse": {
480
+ category: "std-array",
481
+ minArity: 1,
482
+ maxArity: 1,
483
+ returnType: "array",
484
+ description: "Reverse array order (returns new array)",
485
+ module: "array"
486
+ },
487
+ "array/shuffle": {
488
+ category: "std-array",
489
+ minArity: 1,
490
+ maxArity: 1,
491
+ returnType: "array",
492
+ description: "Randomly shuffle array (returns new array)",
493
+ module: "array"
494
+ },
495
+ "array/slice": {
496
+ category: "std-array",
497
+ minArity: 2,
498
+ maxArity: 3,
499
+ returnType: "array",
500
+ description: "Extract subarray",
501
+ module: "array"
502
+ },
503
+ "array/some": {
504
+ category: "std-array",
505
+ minArity: 2,
506
+ maxArity: 2,
507
+ returnType: "boolean",
508
+ description: "Check if any element matches predicate",
509
+ module: "array"
510
+ },
511
+ "array/sort": {
512
+ category: "std-array",
513
+ minArity: 1,
514
+ maxArity: 3,
515
+ returnType: "array",
516
+ description: "Sort array (returns new array)",
517
+ module: "array"
518
+ },
519
+ "array/sum": {
520
+ category: "std-array",
521
+ minArity: 1,
522
+ maxArity: 2,
523
+ returnType: "number",
524
+ description: "Sum values (optionally by field)",
525
+ module: "array"
526
+ },
527
+ "array/take": {
528
+ category: "std-array",
529
+ minArity: 2,
530
+ maxArity: 2,
531
+ returnType: "array",
532
+ description: "Take first n elements",
533
+ module: "array"
534
+ },
535
+ "array/takeLast": {
536
+ category: "std-array",
537
+ minArity: 2,
538
+ maxArity: 2,
539
+ returnType: "array",
540
+ description: "Take last n elements",
541
+ module: "array"
542
+ },
543
+ "array/unique": {
544
+ category: "std-array",
545
+ minArity: 1,
546
+ maxArity: 1,
547
+ returnType: "array",
548
+ description: "Remove duplicates (returns new array)",
549
+ module: "array"
550
+ },
551
+ "array/zip": {
552
+ category: "std-array",
553
+ minArity: 2,
554
+ maxArity: 2,
555
+ returnType: "array",
556
+ description: "Pair elements from two arrays",
557
+ module: "array"
558
+ },
559
+ "async/all": {
560
+ category: "std-async",
561
+ minArity: 2,
562
+ maxArity: null,
563
+ returnType: "array",
564
+ description: "Execute effects in parallel, wait for all to complete",
565
+ module: "async",
566
+ hasSideEffects: true
567
+ },
568
+ "async/debounce": {
569
+ category: "std-async",
570
+ minArity: 2,
571
+ maxArity: 2,
572
+ returnType: "void",
573
+ description: "Debounce an event (wait for pause in events)",
574
+ module: "async",
575
+ hasSideEffects: true
576
+ },
577
+ "async/delay": {
578
+ category: "std-async",
579
+ minArity: 1,
580
+ maxArity: 2,
581
+ returnType: "any",
582
+ description: "Wait for specified milliseconds, optionally execute an effect after",
583
+ module: "async",
584
+ hasSideEffects: true
585
+ },
586
+ "async/interval": {
587
+ category: "std-async",
588
+ minArity: 2,
589
+ maxArity: 2,
590
+ returnType: "string",
591
+ description: "Execute an effect periodically at a fixed interval",
592
+ module: "async",
593
+ hasSideEffects: true
594
+ },
595
+ "async/race": {
596
+ category: "std-async",
597
+ minArity: 2,
598
+ maxArity: null,
599
+ returnType: "any",
600
+ description: "Execute effects in parallel, return first to complete",
601
+ module: "async",
602
+ hasSideEffects: true
603
+ },
604
+ "async/retry": {
605
+ category: "std-async",
606
+ minArity: 2,
607
+ maxArity: 2,
608
+ returnType: "any",
609
+ description: "Retry an effect with configurable backoff",
610
+ module: "async",
611
+ hasSideEffects: true
612
+ },
613
+ "async/sequence": {
614
+ category: "std-async",
615
+ minArity: 2,
616
+ maxArity: null,
617
+ returnType: "array",
618
+ description: "Execute effects in sequence (one after another)",
619
+ module: "async",
620
+ hasSideEffects: true
621
+ },
622
+ "async/throttle": {
623
+ category: "std-async",
624
+ minArity: 2,
625
+ maxArity: 2,
626
+ returnType: "void",
627
+ description: "Throttle an event (emit at most once per interval)",
628
+ module: "async",
629
+ hasSideEffects: true
630
+ },
631
+ "async/timeout": {
632
+ category: "std-async",
633
+ minArity: 2,
634
+ maxArity: 2,
635
+ returnType: "any",
636
+ description: "Add timeout to an effect",
637
+ module: "async",
638
+ hasSideEffects: true
639
+ },
640
+ "behavior/call": {
641
+ category: "std-behavior",
642
+ minArity: 2,
643
+ maxArity: 3,
644
+ returnType: "ServiceCallResult",
645
+ description: "Call a behavior service action. Returns the ServiceCallResult union \u2014 resolves to the specific member when the (behavior, action) pair is a literal.",
646
+ module: "behavior",
647
+ hasSideEffects: true
648
+ },
649
+ "behavior/compose": {
650
+ category: "std-composition",
651
+ minArity: 1,
652
+ maxArity: 1,
653
+ returnType: "object",
654
+ description: "Compose N orbitals into one application schema. Wires events, picks layout, generates pages.",
655
+ module: "composition"
656
+ },
657
+ "behavior/detect-layout": {
658
+ category: "std-composition",
659
+ minArity: 1,
660
+ maxArity: 2,
661
+ returnType: "string",
662
+ description: "Auto-detect layout from orbital count and wiring topology. Returns single, tabs, sidebar, dashboard, or wizard-flow.",
663
+ module: "composition"
664
+ },
665
+ "behavior/instantiate": {
666
+ category: "std-behavior",
667
+ minArity: 2,
668
+ maxArity: 3,
669
+ returnType: "BuilderResult",
670
+ description: "Instantiate a behavior from the registry at runtime (meta-programming). Equivalent to compile-time `uses` but dynamic \u2014 the behavior name is a runtime value. Applies the same override surface (linkedEntity, events, config, fields).",
671
+ module: "behavior",
672
+ hasSideEffects: true
673
+ },
674
+ "behavior/pipe": {
675
+ category: "std-composition",
676
+ minArity: 2,
677
+ maxArity: null,
678
+ returnType: "any",
679
+ description: "Left-to-right composition. Each step receives the previous result as its first arg.",
680
+ module: "composition"
681
+ },
682
+ "behavior/wire": {
683
+ category: "std-composition",
684
+ minArity: 2,
685
+ maxArity: 2,
686
+ returnType: "array",
687
+ description: "Apply cross-orbital event wiring. Adds external emits/listens to inline traits.",
688
+ module: "composition"
689
+ },
690
+ "browser/clipboard-read": {
691
+ category: "std-browser",
692
+ minArity: 0,
693
+ maxArity: 0,
694
+ returnType: "string",
695
+ description: "Read text from the system clipboard (navigator.clipboard.readText / host clipboard). Requires a user gesture and clipboard permission. Resolves with the clipboard text via the trailing { emit } envelope.",
696
+ module: "browser",
697
+ hasSideEffects: true,
698
+ effect: {
699
+ kind: "custom",
700
+ produces: "string"
701
+ }
702
+ },
703
+ "browser/clipboard-write": {
704
+ category: "std-browser",
705
+ minArity: 1,
706
+ maxArity: 1,
707
+ returnType: "void",
708
+ description: "Write text to the system clipboard (navigator.clipboard.writeText / host clipboard). Requires a user gesture. Emits success/failure via the trailing { emit } envelope.",
709
+ module: "browser",
710
+ hasSideEffects: true,
711
+ effect: {
712
+ kind: "custom",
713
+ produces: "string"
714
+ }
715
+ },
716
+ "browser/geolocation-current": {
717
+ category: "std-browser",
718
+ minArity: 0,
719
+ maxArity: 1,
720
+ returnType: "object",
721
+ description: "Read the current device position (navigator.geolocation.getCurrentPosition / host geolocation). Requires location permission. Resolves with { latitude, longitude, accuracy } via the trailing { emit } envelope.",
722
+ module: "browser",
723
+ hasSideEffects: true,
724
+ effect: {
725
+ kind: "custom",
726
+ produces: {
727
+ kind: "object",
728
+ fields: {
729
+ latitude: "number",
730
+ longitude: "number",
731
+ accuracy: "number"
732
+ }
733
+ }
734
+ }
735
+ },
736
+ "browser/open-file-picker": {
737
+ category: "std-browser",
738
+ minArity: 0,
739
+ maxArity: 1,
740
+ returnType: "array",
741
+ description: "Open the OS file picker (window.showOpenFilePicker / host dialog). Resolves with the selected file metadata list, or emits failure when the user cancels or the capability is denied. Async; use the trailing { emit } envelope for success/failure events.",
742
+ module: "browser",
743
+ hasSideEffects: true,
744
+ effect: {
745
+ kind: "custom",
746
+ produces: {
747
+ kind: "array",
748
+ of: {
749
+ kind: "object",
750
+ fields: {
751
+ name: "string",
752
+ size: "number",
753
+ type: "string",
754
+ lastModified: "number"
755
+ }
756
+ }
757
+ }
758
+ }
759
+ },
760
+ "call-service": {
761
+ category: "effect",
762
+ minArity: 2,
763
+ maxArity: 4,
764
+ returnType: "void",
765
+ description: "Invoke an external service action. Optional trailing { emit: { success, failure } } options object attaches closed-circuit emit routing (V2 frame contract).",
766
+ module: "core",
767
+ hasSideEffects: true,
768
+ effect: {
769
+ kind: "call-service",
770
+ produces: "any"
771
+ }
772
+ },
773
+ "checkpoint/load": {
774
+ category: "ml-effect",
775
+ minArity: 1,
776
+ maxArity: 1,
777
+ returnType: "object",
778
+ description: "Load a model checkpoint (ML effect)",
779
+ module: "train"
780
+ },
781
+ "checkpoint/save": {
782
+ category: "ml-effect",
783
+ minArity: 2,
784
+ maxArity: 2,
785
+ returnType: "void",
786
+ description: "Save a model checkpoint (ML effect)",
787
+ module: "train",
788
+ hasSideEffects: true
789
+ },
790
+ "compose/compose-all": {
791
+ category: "std-behavior",
792
+ minArity: 0,
793
+ maxArity: 0,
794
+ returnType: "ComposeAllResult",
795
+ description: "Compose all orbitals in the workspace into a single schema. Backed by composeBehaviors.",
796
+ module: "behavior",
797
+ hasSideEffects: true
798
+ },
799
+ "compose/compose-children": {
800
+ category: "std-behavior",
801
+ minArity: 1,
802
+ maxArity: 1,
803
+ returnType: "ComposeChildrenResult",
804
+ description: "Compose child orbitals under a parent for recursive builds.",
805
+ module: "behavior",
806
+ hasSideEffects: true
807
+ },
808
+ "contract/clamp-output": {
809
+ category: "ml-contract",
810
+ minArity: 2,
811
+ maxArity: 2,
812
+ returnType: "tensor",
813
+ description: "Clamp output tensor to contract ranges",
814
+ module: "contract"
815
+ },
816
+ "contract/entity-to-tensor": {
817
+ category: "ml-contract",
818
+ minArity: 2,
819
+ maxArity: 2,
820
+ returnType: "tensor",
821
+ description: "Convert entity fields to tensor via contract",
822
+ module: "contract"
823
+ },
824
+ "contract/tensor-to-payload": {
825
+ category: "ml-contract",
826
+ minArity: 2,
827
+ maxArity: 2,
828
+ returnType: "object",
829
+ description: "Convert output tensor to event payload via contract",
830
+ module: "contract"
831
+ },
832
+ "contract/validate-input": {
833
+ category: "ml-contract",
834
+ minArity: 2,
835
+ maxArity: 2,
836
+ returnType: "boolean",
837
+ description: "Validate tensor against input contract",
838
+ module: "contract"
839
+ },
840
+ "contract/validate-output": {
841
+ category: "ml-contract",
842
+ minArity: 2,
843
+ maxArity: 2,
844
+ returnType: "boolean",
845
+ description: "Validate tensor against output contract",
846
+ module: "contract"
847
+ },
848
+ "contract/violations": {
849
+ category: "ml-contract",
850
+ minArity: 2,
851
+ maxArity: 2,
852
+ returnType: "array",
853
+ description: "List contract violations",
854
+ module: "contract"
855
+ },
856
+ "data/augment": {
857
+ category: "ml-data",
858
+ minArity: 2,
859
+ maxArity: 2,
860
+ returnType: "object",
861
+ description: "Apply data augmentation",
862
+ module: "data"
863
+ },
864
+ "data/dataloader": {
865
+ category: "ml-data",
866
+ minArity: 2,
867
+ maxArity: 2,
868
+ returnType: "object",
869
+ description: "Create batched dataloader from dataset",
870
+ module: "data"
871
+ },
872
+ "data/dataset": {
873
+ category: "ml-data",
874
+ minArity: 2,
875
+ maxArity: 2,
876
+ returnType: "object",
877
+ description: "Create dataset from entity collection and contracts",
878
+ module: "data"
879
+ },
880
+ "data/normalize": {
881
+ category: "ml-data",
882
+ minArity: 2,
883
+ maxArity: 2,
884
+ returnType: "tensor",
885
+ description: "Normalize features (mean/std or min/max)",
886
+ module: "data"
887
+ },
888
+ "data/pad": {
889
+ category: "ml-data",
890
+ minArity: 2,
891
+ maxArity: 2,
892
+ returnType: "tensor",
893
+ description: "Pad sequences to uniform length",
894
+ module: "data"
895
+ },
896
+ "data/split": {
897
+ category: "ml-data",
898
+ minArity: 2,
899
+ maxArity: 2,
900
+ returnType: "array",
901
+ description: "Train/val/test split",
902
+ module: "data"
903
+ },
904
+ "data/tokenize": {
905
+ category: "ml-data",
906
+ minArity: 2,
907
+ maxArity: 2,
908
+ returnType: "tensor",
909
+ description: "Tokenize text fields",
910
+ module: "data"
911
+ },
912
+ despawn: {
913
+ category: "effect",
914
+ minArity: 0,
915
+ maxArity: 1,
916
+ returnType: "void",
917
+ description: "Despawn an entity instance (games)",
918
+ module: "core",
919
+ hasSideEffects: true,
920
+ effect: {
921
+ kind: "despawn"
922
+ }
923
+ },
924
+ do: {
925
+ category: "control",
926
+ minArity: 1,
927
+ maxArity: null,
928
+ returnType: "any",
929
+ description: "Sequential execution of multiple effects/expressions",
930
+ module: "core"
931
+ },
932
+ "ease/apply": {
933
+ category: "std-ease",
934
+ minArity: 2,
935
+ maxArity: 2,
936
+ returnType: "number",
937
+ description: "Apply an easing curve to t\u2208[0,1]: linear, in-quad, out-quad, in-out-quad, in-cubic, out-cubic, in-out-cubic, elastic-out, bounce-out (unknown \u2192 linear)",
938
+ module: "ease"
939
+ },
940
+ "ease/smoothstep": {
941
+ category: "std-ease",
942
+ minArity: 3,
943
+ maxArity: 3,
944
+ returnType: "number",
945
+ description: "Smoothstep: clamp((x-edge0)/(edge1-edge0),0,1) then t*t*(3-2*t)",
946
+ module: "ease"
947
+ },
948
+ emit: {
949
+ category: "effect",
950
+ minArity: 1,
951
+ maxArity: 2,
952
+ returnType: "void",
953
+ description: "Emit an event onto the bus",
954
+ module: "core",
955
+ hasSideEffects: true,
956
+ effect: {
957
+ kind: "emit",
958
+ produces: {
959
+ kind: "object",
960
+ fields: {
961
+ event: {
962
+ kind: "eventKey"
963
+ },
964
+ payload: "any"
965
+ },
966
+ open: true
967
+ }
968
+ }
969
+ },
970
+ evaluate: {
971
+ category: "ml-effect",
972
+ minArity: 1,
973
+ maxArity: 2,
974
+ returnType: "object",
975
+ description: "Evaluate a model against test cases (ML effect)",
976
+ module: "train"
977
+ },
978
+ fetch: {
979
+ category: "effect",
980
+ minArity: 1,
981
+ maxArity: 2,
982
+ returnType: "void",
983
+ description: "Fetch an entity (by id) or a collection (by filter) from persistence",
984
+ module: "core",
985
+ hasSideEffects: true,
986
+ effect: {
987
+ kind: "fetch",
988
+ produces: {
989
+ kind: "union",
990
+ of: [
991
+ {
992
+ kind: "entity"
993
+ },
994
+ {
995
+ kind: "array",
996
+ of: {
997
+ kind: "entity"
998
+ }
999
+ }
1000
+ ]
1001
+ }
1002
+ }
1003
+ },
1004
+ "fetch-stream": {
1005
+ category: "effect",
1006
+ minArity: 1,
1007
+ maxArity: 2,
1008
+ returnType: "void",
1009
+ description: "Stream an LLM or HTTP response, emitting on_message per chunk, success on completion, failure on error",
1010
+ module: "core",
1011
+ hasSideEffects: true,
1012
+ effect: {
1013
+ kind: "fetch-stream",
1014
+ produces: {
1015
+ kind: "entity"
1016
+ }
1017
+ }
1018
+ },
1019
+ fn: {
1020
+ category: "control",
1021
+ minArity: 2,
1022
+ maxArity: 2,
1023
+ returnType: "function",
1024
+ description: "Lambda expression (used for per-item renders and transforms)",
1025
+ module: "core"
1026
+ },
1027
+ "format/bytes": {
1028
+ category: "std-format",
1029
+ minArity: 1,
1030
+ maxArity: 1,
1031
+ returnType: "string",
1032
+ description: "Format bytes as human-readable size",
1033
+ module: "format"
1034
+ },
1035
+ "format/creditCard": {
1036
+ category: "std-format",
1037
+ minArity: 1,
1038
+ maxArity: 1,
1039
+ returnType: "string",
1040
+ description: "Format credit card with masked digits",
1041
+ module: "format"
1042
+ },
1043
+ "format/currency": {
1044
+ category: "std-format",
1045
+ minArity: 2,
1046
+ maxArity: 3,
1047
+ returnType: "string",
1048
+ description: "Format as currency",
1049
+ module: "format"
1050
+ },
1051
+ "format/list": {
1052
+ category: "std-format",
1053
+ minArity: 1,
1054
+ maxArity: 2,
1055
+ returnType: "string",
1056
+ description: "Format array as natural language list",
1057
+ module: "format"
1058
+ },
1059
+ "format/number": {
1060
+ category: "std-format",
1061
+ minArity: 1,
1062
+ maxArity: 2,
1063
+ returnType: "string",
1064
+ description: "Format number with locale-aware separators",
1065
+ module: "format"
1066
+ },
1067
+ "format/ordinal": {
1068
+ category: "std-format",
1069
+ minArity: 1,
1070
+ maxArity: 1,
1071
+ returnType: "string",
1072
+ description: "Format number as ordinal (1st, 2nd, 3rd)",
1073
+ module: "format"
1074
+ },
1075
+ "format/percent": {
1076
+ category: "std-format",
1077
+ minArity: 1,
1078
+ maxArity: 2,
1079
+ returnType: "string",
1080
+ description: "Format as percentage",
1081
+ module: "format"
1082
+ },
1083
+ "format/phone": {
1084
+ category: "std-format",
1085
+ minArity: 1,
1086
+ maxArity: 2,
1087
+ returnType: "string",
1088
+ description: "Format phone number",
1089
+ module: "format"
1090
+ },
1091
+ "format/plural": {
1092
+ category: "std-format",
1093
+ minArity: 3,
1094
+ maxArity: 3,
1095
+ returnType: "string",
1096
+ description: "Format count with singular/plural word",
1097
+ module: "format"
1098
+ },
1099
+ forward: {
1100
+ category: "ml-effect",
1101
+ minArity: 2,
1102
+ maxArity: 2,
1103
+ returnType: "tensor",
1104
+ description: "Run a forward pass through a model (ML effect)",
1105
+ module: "nn"
1106
+ },
1107
+ "geo/aabb-overlap": {
1108
+ category: "std-geo",
1109
+ minArity: 2,
1110
+ maxArity: 2,
1111
+ returnType: "boolean",
1112
+ description: "Axis-aligned bounding box overlap test",
1113
+ module: "geo"
1114
+ },
1115
+ "geo/circle-overlap": {
1116
+ category: "std-geo",
1117
+ minArity: 2,
1118
+ maxArity: 2,
1119
+ returnType: "boolean",
1120
+ description: "Circle overlap test: distance(centers) <= a.r+b.r",
1121
+ module: "geo"
1122
+ },
1123
+ "geo/point-in-circle": {
1124
+ category: "std-geo",
1125
+ minArity: 2,
1126
+ maxArity: 2,
1127
+ returnType: "boolean",
1128
+ description: "Point containment in circle (inclusive)",
1129
+ module: "geo"
1130
+ },
1131
+ "geo/point-in-rect": {
1132
+ category: "std-geo",
1133
+ minArity: 2,
1134
+ maxArity: 2,
1135
+ returnType: "boolean",
1136
+ description: "Point containment in rect (inclusive bounds)",
1137
+ module: "geo"
1138
+ },
1139
+ "geo/rect-circle-overlap": {
1140
+ category: "std-geo",
1141
+ minArity: 2,
1142
+ maxArity: 2,
1143
+ returnType: "boolean",
1144
+ description: "Rect-circle overlap via closest point on rect to circle center",
1145
+ module: "geo"
1146
+ },
1147
+ "geo/reflect": {
1148
+ category: "std-geo",
1149
+ minArity: 2,
1150
+ maxArity: 2,
1151
+ returnType: "vector",
1152
+ description: "Reflect vector v across normal n (assumed normalized)",
1153
+ module: "geo"
1154
+ },
1155
+ "geo/segment-intersect": {
1156
+ category: "std-geo",
1157
+ minArity: 2,
1158
+ maxArity: 2,
1159
+ returnType: "point | null",
1160
+ description: "Intersection point of two segments, or null when parallel/none",
1161
+ module: "geo"
1162
+ },
1163
+ "graph/add-self-loops": {
1164
+ category: "ml-graph",
1165
+ minArity: 1,
1166
+ maxArity: 1,
1167
+ returnType: "graph",
1168
+ description: "Add self-loop edges to graph",
1169
+ module: "graph"
1170
+ },
1171
+ "graph/batch": {
1172
+ category: "ml-graph",
1173
+ minArity: 1,
1174
+ maxArity: 1,
1175
+ returnType: "graph",
1176
+ description: "Batch multiple graphs into one",
1177
+ module: "graph"
1178
+ },
1179
+ "graph/degree": {
1180
+ category: "ml-graph",
1181
+ minArity: 1,
1182
+ maxArity: 1,
1183
+ returnType: "tensor",
1184
+ description: "Get node degree tensor",
1185
+ module: "graph"
1186
+ },
1187
+ "graph/edge-features": {
1188
+ category: "ml-graph",
1189
+ minArity: 1,
1190
+ maxArity: 1,
1191
+ returnType: "tensor",
1192
+ description: "Get edge feature matrix",
1193
+ module: "graph"
1194
+ },
1195
+ "graph/edge-index": {
1196
+ category: "ml-graph",
1197
+ minArity: 1,
1198
+ maxArity: 1,
1199
+ returnType: "tensor",
1200
+ description: "Get edge index tensor",
1201
+ module: "graph"
1202
+ },
1203
+ "graph/from-adjacency": {
1204
+ category: "ml-graph",
1205
+ minArity: 2,
1206
+ maxArity: 2,
1207
+ returnType: "graph",
1208
+ description: "Build graph from adjacency matrix and features",
1209
+ module: "graph"
1210
+ },
1211
+ "graph/from-edge-list": {
1212
+ category: "ml-graph",
1213
+ minArity: 2,
1214
+ maxArity: 2,
1215
+ returnType: "graph",
1216
+ description: "Build graph from edge list and features",
1217
+ module: "graph"
1218
+ },
1219
+ "graph/from-entities": {
1220
+ category: "ml-graph",
1221
+ minArity: 1,
1222
+ maxArity: 1,
1223
+ returnType: "graph",
1224
+ description: "Build PyG graph from entity collections",
1225
+ module: "graph"
1226
+ },
1227
+ "graph/k-hop": {
1228
+ category: "ml-graph",
1229
+ minArity: 3,
1230
+ maxArity: 3,
1231
+ returnType: "graph",
1232
+ description: "K-hop neighborhood subgraph",
1233
+ module: "graph"
1234
+ },
1235
+ "graph/node-features": {
1236
+ category: "ml-graph",
1237
+ minArity: 1,
1238
+ maxArity: 1,
1239
+ returnType: "tensor",
1240
+ description: "Get node feature matrix",
1241
+ module: "graph"
1242
+ },
1243
+ "graph/num-edges": {
1244
+ category: "ml-graph",
1245
+ minArity: 1,
1246
+ maxArity: 1,
1247
+ returnType: "number",
1248
+ description: "Get edge count",
1249
+ module: "graph"
1250
+ },
1251
+ "graph/num-nodes": {
1252
+ category: "ml-graph",
1253
+ minArity: 1,
1254
+ maxArity: 1,
1255
+ returnType: "number",
1256
+ description: "Get node count",
1257
+ module: "graph"
1258
+ },
1259
+ "graph/subgraph": {
1260
+ category: "ml-graph",
1261
+ minArity: 2,
1262
+ maxArity: 2,
1263
+ returnType: "graph",
1264
+ description: "Extract subgraph by node mask",
1265
+ module: "graph"
1266
+ },
1267
+ "graph/to-undirected": {
1268
+ category: "ml-graph",
1269
+ minArity: 1,
1270
+ maxArity: 1,
1271
+ returnType: "graph",
1272
+ description: "Convert directed graph to undirected",
1273
+ module: "graph"
1274
+ },
1275
+ "grid/cells-in-radius": {
1276
+ category: "std-grid",
1277
+ minArity: 2,
1278
+ maxArity: 2,
1279
+ returnType: "array",
1280
+ description: "All cells within Euclidean radius r (row-major order)",
1281
+ module: "grid"
1282
+ },
1283
+ "grid/distance": {
1284
+ category: "std-grid",
1285
+ minArity: 2,
1286
+ maxArity: 2,
1287
+ returnType: "number",
1288
+ description: "Chebyshev distance max(|dx|,|dy|)",
1289
+ module: "grid"
1290
+ },
1291
+ "grid/from-world": {
1292
+ category: "std-grid",
1293
+ minArity: 2,
1294
+ maxArity: 2,
1295
+ returnType: "cell",
1296
+ description: "World point to grid cell (floor)",
1297
+ module: "grid"
1298
+ },
1299
+ "grid/in-bounds": {
1300
+ category: "std-grid",
1301
+ minArity: 3,
1302
+ maxArity: 3,
1303
+ returnType: "boolean",
1304
+ description: "Whether cell lies within a w\xD7h grid",
1305
+ module: "grid"
1306
+ },
1307
+ "grid/iso-to-screen": {
1308
+ category: "std-grid",
1309
+ minArity: 3,
1310
+ maxArity: 3,
1311
+ returnType: "point",
1312
+ description: "Isometric cell to screen point",
1313
+ module: "grid"
1314
+ },
1315
+ "grid/line": {
1316
+ category: "std-grid",
1317
+ minArity: 2,
1318
+ maxArity: 2,
1319
+ returnType: "array",
1320
+ description: "Bresenham line cells from a to b, inclusive, in step order",
1321
+ module: "grid"
1322
+ },
1323
+ "grid/manhattan-distance": {
1324
+ category: "std-grid",
1325
+ minArity: 2,
1326
+ maxArity: 2,
1327
+ returnType: "number",
1328
+ description: "Manhattan distance |dx|+|dy|",
1329
+ module: "grid"
1330
+ },
1331
+ "grid/neighbors": {
1332
+ category: "std-grid",
1333
+ minArity: 1,
1334
+ maxArity: 2,
1335
+ returnType: "array",
1336
+ description: "Adjacent cells in order N,E,S,W (+NE,SE,SW,NW if diagonal)",
1337
+ module: "grid"
1338
+ },
1339
+ "grid/screen-to-iso": {
1340
+ category: "std-grid",
1341
+ minArity: 3,
1342
+ maxArity: 3,
1343
+ returnType: "point",
1344
+ description: "Screen point to isometric cell coordinates",
1345
+ module: "grid"
1346
+ },
1347
+ "grid/to-world": {
1348
+ category: "std-grid",
1349
+ minArity: 2,
1350
+ maxArity: 2,
1351
+ returnType: "point",
1352
+ description: "Cell to world-space center point",
1353
+ module: "grid"
1354
+ },
1355
+ if: {
1356
+ category: "logic",
1357
+ minArity: 3,
1358
+ maxArity: 3,
1359
+ returnType: "any",
1360
+ description: "Conditional expression (ternary). Return type is union of branch types.",
1361
+ module: "core",
1362
+ returnSemantics: "branch-union"
1363
+ },
1364
+ "integration/github-create-issue": {
1365
+ category: "std-integration",
1366
+ minArity: 3,
1367
+ maxArity: 3,
1368
+ returnType: "object",
1369
+ description: "Create a GitHub issue. Typed wrapper for the GitHub API.",
1370
+ module: "integration",
1371
+ hasSideEffects: true
1372
+ },
1373
+ "integration/github-get-repo": {
1374
+ category: "std-integration",
1375
+ minArity: 2,
1376
+ maxArity: 2,
1377
+ returnType: "object",
1378
+ description: "Get a GitHub repository. Typed wrapper for the GitHub API.",
1379
+ module: "integration",
1380
+ hasSideEffects: true
1381
+ },
1382
+ "integration/http": {
1383
+ category: "std-integration",
1384
+ minArity: 3,
1385
+ maxArity: 4,
1386
+ returnType: "object",
1387
+ description: "HTTP request with caller-declared response schema. Validates the response against the schema before returning.",
1388
+ module: "integration",
1389
+ hasSideEffects: true
1390
+ },
1391
+ let: {
1392
+ category: "control",
1393
+ minArity: 2,
1394
+ maxArity: 2,
1395
+ returnType: "any",
1396
+ description: "Bind local variables for a body expression",
1397
+ module: "core"
1398
+ },
1399
+ list: {
1400
+ category: "control",
1401
+ minArity: 0,
1402
+ maxArity: null,
1403
+ returnType: "array",
1404
+ description: "Literal array constructor \u2014 evaluates each argument and returns them as an array. Lowering wraps a literal list bound for a literal-array slot in `list` so it is unambiguously data, never a call (disambiguates a list whose first element collides with an operator name, e.g. [path method \u2026]).",
1405
+ module: "core"
1406
+ },
1407
+ "llm/call-tools": {
1408
+ category: "std-llm",
1409
+ minArity: 2,
1410
+ maxArity: 2,
1411
+ returnType: "LlmCallToolsResult",
1412
+ description: "Call the LLM with tool definitions. Returns the assistant response with optional tool calls and token usage.",
1413
+ module: "llm",
1414
+ hasSideEffects: true
1415
+ },
1416
+ "llm/compact": {
1417
+ category: "std-llm",
1418
+ minArity: 0,
1419
+ maxArity: 1,
1420
+ returnType: "object",
1421
+ description: "Compact the context window. Returns before/after token counts.",
1422
+ module: "llm",
1423
+ hasSideEffects: true
1424
+ },
1425
+ "llm/embed": {
1426
+ category: "std-llm",
1427
+ minArity: 1,
1428
+ maxArity: 1,
1429
+ returnType: "array",
1430
+ description: "Generate embeddings for an array of texts. Returns a 2D array of floats.",
1431
+ module: "llm",
1432
+ hasSideEffects: true
1433
+ },
1434
+ "llm/generate": {
1435
+ category: "std-llm",
1436
+ minArity: 1,
1437
+ maxArity: 2,
1438
+ returnType: "string",
1439
+ description: "Generate text from an LLM. Returns the generated string.",
1440
+ module: "llm",
1441
+ hasSideEffects: true
1442
+ },
1443
+ "llm/switch": {
1444
+ category: "std-llm",
1445
+ minArity: 1,
1446
+ maxArity: 2,
1447
+ returnType: "void",
1448
+ description: "Switch the active LLM provider and optionally the model.",
1449
+ module: "llm",
1450
+ hasSideEffects: true
1451
+ },
1452
+ "llm/token-count": {
1453
+ category: "std-llm",
1454
+ minArity: 0,
1455
+ maxArity: 0,
1456
+ returnType: "number",
1457
+ description: "Get the current token count in the context window.",
1458
+ module: "llm"
1459
+ },
1460
+ log: {
1461
+ category: "effect",
1462
+ minArity: 1,
1463
+ maxArity: 1,
1464
+ returnType: "void",
1465
+ description: "Emit a structured info log line (compiled + runtime)",
1466
+ module: "core",
1467
+ hasSideEffects: true,
1468
+ effect: {
1469
+ kind: "log"
1470
+ }
1471
+ },
1472
+ "lolo/emit-body": {
1473
+ category: "std-behavior",
1474
+ minArity: 3,
1475
+ maxArity: 3,
1476
+ returnType: "LoloEmitResult",
1477
+ description: "Emit a .lolo orbital body from the LLM (free-lolo path). Returns the emitted lolo source.",
1478
+ module: "behavior",
1479
+ hasSideEffects: true
1480
+ },
1481
+ "math/abs": {
1482
+ category: "std-math",
1483
+ minArity: 1,
1484
+ maxArity: 1,
1485
+ returnType: "number",
1486
+ description: "Absolute value",
1487
+ module: "math"
1488
+ },
1489
+ "math/acos": {
1490
+ category: "std-math",
1491
+ minArity: 1,
1492
+ maxArity: 1,
1493
+ returnType: "number",
1494
+ description: "Arccosine (inverse cosine) in radians",
1495
+ module: "math"
1496
+ },
1497
+ "math/approach": {
1498
+ category: "std-math",
1499
+ minArity: 3,
1500
+ maxArity: 3,
1501
+ returnType: "number",
1502
+ description: "Move cur toward target by at most maxDelta",
1503
+ module: "math"
1504
+ },
1505
+ "math/asin": {
1506
+ category: "std-math",
1507
+ minArity: 1,
1508
+ maxArity: 1,
1509
+ returnType: "number",
1510
+ description: "Arcsine (inverse sine) in radians",
1511
+ module: "math"
1512
+ },
1513
+ "math/atan": {
1514
+ category: "std-math",
1515
+ minArity: 1,
1516
+ maxArity: 1,
1517
+ returnType: "number",
1518
+ description: "Arctangent (inverse tangent) in radians",
1519
+ module: "math"
1520
+ },
1521
+ "math/atan2": {
1522
+ category: "std-math",
1523
+ minArity: 2,
1524
+ maxArity: 2,
1525
+ returnType: "number",
1526
+ description: "Angle in radians from the positive x-axis to point (x, y)",
1527
+ module: "math"
1528
+ },
1529
+ "math/ceil": {
1530
+ category: "std-math",
1531
+ minArity: 1,
1532
+ maxArity: 1,
1533
+ returnType: "number",
1534
+ description: "Round up to integer",
1535
+ module: "math"
1536
+ },
1537
+ "math/clamp": {
1538
+ category: "std-math",
1539
+ minArity: 3,
1540
+ maxArity: 3,
1541
+ returnType: "number",
1542
+ description: "Constrain value to range [min, max]",
1543
+ module: "math"
1544
+ },
1545
+ "math/cos": {
1546
+ category: "std-math",
1547
+ minArity: 1,
1548
+ maxArity: 1,
1549
+ returnType: "number",
1550
+ description: "Cosine of an angle in radians",
1551
+ module: "math"
1552
+ },
1553
+ "math/default": {
1554
+ category: "std-math",
1555
+ minArity: 2,
1556
+ maxArity: 2,
1557
+ returnType: "number",
1558
+ description: "Return default if value is null, undefined, or NaN",
1559
+ module: "math"
1560
+ },
1561
+ "math/deg-rad": {
1562
+ category: "std-math",
1563
+ minArity: 1,
1564
+ maxArity: 1,
1565
+ returnType: "number",
1566
+ description: "Convert degrees to radians",
1567
+ module: "math"
1568
+ },
1569
+ "math/floor": {
1570
+ category: "std-math",
1571
+ minArity: 1,
1572
+ maxArity: 1,
1573
+ returnType: "number",
1574
+ description: "Round down to integer",
1575
+ module: "math"
1576
+ },
1577
+ "math/hypot": {
1578
+ category: "std-math",
1579
+ minArity: 2,
1580
+ maxArity: 2,
1581
+ returnType: "number",
1582
+ description: "Euclidean length sqrt(a\xB2+b\xB2)",
1583
+ module: "math"
1584
+ },
1585
+ "math/lerp": {
1586
+ category: "std-math",
1587
+ minArity: 3,
1588
+ maxArity: 3,
1589
+ returnType: "number",
1590
+ description: "Linear interpolation between a and b by factor t",
1591
+ module: "math"
1592
+ },
1593
+ "math/map": {
1594
+ category: "std-math",
1595
+ minArity: 5,
1596
+ maxArity: 5,
1597
+ returnType: "number",
1598
+ description: "Map value from one range to another",
1599
+ module: "math"
1600
+ },
1601
+ "math/max": {
1602
+ category: "std-math",
1603
+ minArity: 2,
1604
+ maxArity: null,
1605
+ returnType: "number",
1606
+ description: "Maximum of values",
1607
+ module: "math"
1608
+ },
1609
+ "math/min": {
1610
+ category: "std-math",
1611
+ minArity: 2,
1612
+ maxArity: null,
1613
+ returnType: "number",
1614
+ description: "Minimum of values",
1615
+ module: "math"
1616
+ },
1617
+ "math/mod": {
1618
+ category: "std-math",
1619
+ minArity: 2,
1620
+ maxArity: 2,
1621
+ returnType: "number",
1622
+ description: "Modulo (remainder)",
1623
+ module: "math"
1624
+ },
1625
+ "math/pow": {
1626
+ category: "std-math",
1627
+ minArity: 2,
1628
+ maxArity: 2,
1629
+ returnType: "number",
1630
+ description: "Exponentiation (base^exp)",
1631
+ module: "math"
1632
+ },
1633
+ "math/rad-deg": {
1634
+ category: "std-math",
1635
+ minArity: 1,
1636
+ maxArity: 1,
1637
+ returnType: "number",
1638
+ description: "Convert radians to degrees",
1639
+ module: "math"
1640
+ },
1641
+ "math/random": {
1642
+ category: "std-math",
1643
+ minArity: 0,
1644
+ maxArity: 0,
1645
+ returnType: "number",
1646
+ description: "Random number between 0 (inclusive) and 1 (exclusive)",
1647
+ module: "math"
1648
+ },
1649
+ "math/randomInt": {
1650
+ category: "std-math",
1651
+ minArity: 2,
1652
+ maxArity: 2,
1653
+ returnType: "number",
1654
+ description: "Random integer in range [min, max] (inclusive)",
1655
+ module: "math"
1656
+ },
1657
+ "math/round": {
1658
+ category: "std-math",
1659
+ minArity: 1,
1660
+ maxArity: 2,
1661
+ returnType: "number",
1662
+ description: "Round to nearest integer or specified decimals",
1663
+ module: "math"
1664
+ },
1665
+ "math/sign": {
1666
+ category: "std-math",
1667
+ minArity: 1,
1668
+ maxArity: 1,
1669
+ returnType: "number",
1670
+ description: "Returns -1, 0, or 1 indicating sign",
1671
+ module: "math"
1672
+ },
1673
+ "math/sin": {
1674
+ category: "std-math",
1675
+ minArity: 1,
1676
+ maxArity: 1,
1677
+ returnType: "number",
1678
+ description: "Sine of an angle in radians",
1679
+ module: "math"
1680
+ },
1681
+ "math/sqrt": {
1682
+ category: "std-math",
1683
+ minArity: 1,
1684
+ maxArity: 1,
1685
+ returnType: "number",
1686
+ description: "Square root",
1687
+ module: "math"
1688
+ },
1689
+ "math/tan": {
1690
+ category: "std-math",
1691
+ minArity: 1,
1692
+ maxArity: 1,
1693
+ returnType: "number",
1694
+ description: "Tangent of an angle in radians",
1695
+ module: "math"
1696
+ },
1697
+ "math/wrap": {
1698
+ category: "std-math",
1699
+ minArity: 3,
1700
+ maxArity: 3,
1701
+ returnType: "number",
1702
+ description: "Wrap a value into the half-open range [min, max)",
1703
+ module: "math"
1704
+ },
1705
+ "memory/list": {
1706
+ category: "std-memory",
1707
+ minArity: 0,
1708
+ maxArity: 1,
1709
+ returnType: "array",
1710
+ description: "List all memories, optionally filtered by category.",
1711
+ module: "memory"
1712
+ },
1713
+ "memory/recall": {
1714
+ category: "std-memory",
1715
+ minArity: 1,
1716
+ maxArity: 2,
1717
+ returnType: "array",
1718
+ description: "Search memories by semantic query. Returns matching memory records.",
1719
+ module: "memory"
1720
+ },
1721
+ "memory/store": {
1722
+ category: "std-memory",
1723
+ minArity: 2,
1724
+ maxArity: 3,
1725
+ returnType: "string",
1726
+ description: "Store a new memory. Returns the new memory ID.",
1727
+ module: "memory",
1728
+ hasSideEffects: true
1729
+ },
1730
+ navigate: {
1731
+ category: "effect",
1732
+ minArity: 1,
1733
+ maxArity: 2,
1734
+ returnType: "void",
1735
+ description: "Navigate to a route",
1736
+ module: "core",
1737
+ hasSideEffects: true,
1738
+ effect: {
1739
+ kind: "navigate"
1740
+ }
1741
+ },
1742
+ "nn/batchnorm": {
1743
+ category: "ml-arch",
1744
+ minArity: 1,
1745
+ maxArity: 1,
1746
+ returnType: "nn/layer",
1747
+ description: "Batch normalization layer",
1748
+ module: "nn"
1749
+ },
1750
+ "nn/clone": {
1751
+ category: "ml-arch",
1752
+ minArity: 1,
1753
+ maxArity: 1,
1754
+ returnType: "nn/module",
1755
+ description: "Create a deep copy of the network with same weights",
1756
+ module: "nn"
1757
+ },
1758
+ "nn/dropout": {
1759
+ category: "ml-arch",
1760
+ minArity: 0,
1761
+ maxArity: 1,
1762
+ returnType: "nn/layer",
1763
+ description: "Dropout layer for regularization (randomly zeros elements during training)",
1764
+ module: "nn"
1765
+ },
1766
+ "nn/forward": {
1767
+ category: "ml-effect",
1768
+ minArity: 2,
1769
+ maxArity: 2,
1770
+ returnType: "tensor",
1771
+ description: "Execute forward pass through network",
1772
+ module: "nn"
1773
+ },
1774
+ "nn/getWeights": {
1775
+ category: "ml-arch",
1776
+ minArity: 1,
1777
+ maxArity: 1,
1778
+ returnType: "tensor",
1779
+ description: "Get network weights as a flat tensor",
1780
+ module: "nn"
1781
+ },
1782
+ "nn/layernorm": {
1783
+ category: "ml-arch",
1784
+ minArity: 1,
1785
+ maxArity: 1,
1786
+ returnType: "nn/layer",
1787
+ description: "Layer normalization",
1788
+ module: "nn"
1789
+ },
1790
+ "nn/linear": {
1791
+ category: "ml-arch",
1792
+ minArity: 2,
1793
+ maxArity: 2,
1794
+ returnType: "nn/layer",
1795
+ description: "Fully connected linear layer (output = input * weights + bias)",
1796
+ module: "nn"
1797
+ },
1798
+ "nn/paramCount": {
1799
+ category: "ml-arch",
1800
+ minArity: 1,
1801
+ maxArity: 1,
1802
+ returnType: "number",
1803
+ description: "Get total number of trainable parameters",
1804
+ module: "nn"
1805
+ },
1806
+ "nn/relu": {
1807
+ category: "ml-arch",
1808
+ minArity: 0,
1809
+ maxArity: 0,
1810
+ returnType: "nn/layer",
1811
+ description: "ReLU activation function: max(0, x)",
1812
+ module: "nn"
1813
+ },
1814
+ "nn/sequential": {
1815
+ category: "ml-arch",
1816
+ minArity: 1,
1817
+ maxArity: null,
1818
+ returnType: "nn/module",
1819
+ description: "Create a sequential neural network from layers",
1820
+ module: "nn"
1821
+ },
1822
+ "nn/setWeights": {
1823
+ category: "ml-arch",
1824
+ minArity: 2,
1825
+ maxArity: 2,
1826
+ returnType: "nn/module",
1827
+ description: "Set network weights from a flat tensor",
1828
+ module: "nn",
1829
+ hasSideEffects: true
1830
+ },
1831
+ "nn/sigmoid": {
1832
+ category: "ml-arch",
1833
+ minArity: 0,
1834
+ maxArity: 0,
1835
+ returnType: "nn/layer",
1836
+ description: "Sigmoid activation function: 1 / (1 + e^-x)",
1837
+ module: "nn"
1838
+ },
1839
+ "nn/softmax": {
1840
+ category: "ml-arch",
1841
+ minArity: 0,
1842
+ maxArity: 1,
1843
+ returnType: "nn/layer",
1844
+ description: "Softmax activation function (normalizes to probability distribution)",
1845
+ module: "nn"
1846
+ },
1847
+ "nn/tanh": {
1848
+ category: "ml-arch",
1849
+ minArity: 0,
1850
+ maxArity: 0,
1851
+ returnType: "nn/layer",
1852
+ description: "Tanh activation function: (e^x - e^-x) / (e^x + e^-x)",
1853
+ module: "nn"
1854
+ },
1855
+ "noise/fbm": {
1856
+ category: "std-noise",
1857
+ minArity: 3,
1858
+ maxArity: 4,
1859
+ returnType: "number",
1860
+ description: "Fractal Brownian motion: summed perlin octaves (clamped 1..8); output [-1,1]",
1861
+ module: "noise"
1862
+ },
1863
+ "noise/perlin": {
1864
+ category: "std-noise",
1865
+ minArity: 2,
1866
+ maxArity: 3,
1867
+ returnType: "number",
1868
+ description: "2D Perlin noise at (x,y) with optional seed; output [-1,1]",
1869
+ module: "noise"
1870
+ },
1871
+ "noise/simplex": {
1872
+ category: "std-noise",
1873
+ minArity: 2,
1874
+ maxArity: 3,
1875
+ returnType: "number",
1876
+ description: "Value-coherent noise (perlin-derived) at (x,y) with optional seed; output [-1,1]",
1877
+ module: "noise"
1878
+ },
1879
+ not: {
1880
+ category: "logic",
1881
+ minArity: 1,
1882
+ maxArity: 1,
1883
+ returnType: "boolean",
1884
+ description: "Logical NOT",
1885
+ module: "core"
1886
+ },
1887
+ notify: {
1888
+ category: "effect",
1889
+ minArity: 1,
1890
+ maxArity: 2,
1891
+ returnType: "void",
1892
+ description: "Show a notification (in-app, email, push, sms)",
1893
+ module: "core",
1894
+ hasSideEffects: true,
1895
+ effect: {
1896
+ kind: "notify"
1897
+ }
1898
+ },
1899
+ "object/clone": {
1900
+ category: "std-object",
1901
+ minArity: 1,
1902
+ maxArity: 1,
1903
+ returnType: "any",
1904
+ description: "Shallow clone object",
1905
+ module: "object"
1906
+ },
1907
+ "object/deepClone": {
1908
+ category: "std-object",
1909
+ minArity: 1,
1910
+ maxArity: 1,
1911
+ returnType: "any",
1912
+ description: "Deep clone object",
1913
+ module: "object"
1914
+ },
1915
+ "object/deepMerge": {
1916
+ category: "std-object",
1917
+ minArity: 2,
1918
+ maxArity: null,
1919
+ returnType: "any",
1920
+ description: "Deep merge objects (later wins)",
1921
+ module: "object"
1922
+ },
1923
+ "object/empty?": {
1924
+ category: "std-object",
1925
+ minArity: 1,
1926
+ maxArity: 1,
1927
+ returnType: "boolean",
1928
+ description: "Check if object has no keys",
1929
+ module: "object"
1930
+ },
1931
+ "object/entries": {
1932
+ category: "std-object",
1933
+ minArity: 1,
1934
+ maxArity: 1,
1935
+ returnType: "array",
1936
+ description: "Get [key, value] pairs as array",
1937
+ module: "object"
1938
+ },
1939
+ "object/equals": {
1940
+ category: "std-object",
1941
+ minArity: 2,
1942
+ maxArity: 2,
1943
+ returnType: "boolean",
1944
+ description: "Deep equality check",
1945
+ module: "object"
1946
+ },
1947
+ "object/filter": {
1948
+ category: "std-object",
1949
+ minArity: 2,
1950
+ maxArity: 2,
1951
+ returnType: "any",
1952
+ description: "Filter entries by predicate",
1953
+ module: "object"
1954
+ },
1955
+ "object/fromEntries": {
1956
+ category: "std-object",
1957
+ minArity: 1,
1958
+ maxArity: 1,
1959
+ returnType: "any",
1960
+ description: "Create object from [key, value] pairs",
1961
+ module: "object"
1962
+ },
1963
+ "object/get": {
1964
+ category: "std-object",
1965
+ minArity: 2,
1966
+ maxArity: 3,
1967
+ returnType: "any",
1968
+ description: "Get nested value by path (return type derived from input object shape and key)",
1969
+ module: "object",
1970
+ returnSemantics: "object-key-lookup"
1971
+ },
1972
+ "object/has": {
1973
+ category: "std-object",
1974
+ minArity: 2,
1975
+ maxArity: 2,
1976
+ returnType: "boolean",
1977
+ description: "Check if path exists",
1978
+ module: "object"
1979
+ },
1980
+ "object/keys": {
1981
+ category: "std-object",
1982
+ minArity: 1,
1983
+ maxArity: 1,
1984
+ returnType: "array",
1985
+ description: "Get object keys as array",
1986
+ module: "object"
1987
+ },
1988
+ "object/mapKeys": {
1989
+ category: "std-object",
1990
+ minArity: 2,
1991
+ maxArity: 2,
1992
+ returnType: "any",
1993
+ description: "Transform all keys",
1994
+ module: "object"
1995
+ },
1996
+ "object/mapValues": {
1997
+ category: "std-object",
1998
+ minArity: 2,
1999
+ maxArity: 2,
2000
+ returnType: "any",
2001
+ description: "Transform all values",
2002
+ module: "object"
2003
+ },
2004
+ "object/merge": {
2005
+ category: "std-object",
2006
+ minArity: 2,
2007
+ maxArity: null,
2008
+ returnType: "any",
2009
+ description: "Shallow merge objects (later wins)",
2010
+ module: "object"
2011
+ },
2012
+ "object/omit": {
2013
+ category: "std-object",
2014
+ minArity: 2,
2015
+ maxArity: 2,
2016
+ returnType: "any",
2017
+ description: "Exclude specified keys",
2018
+ module: "object"
2019
+ },
2020
+ "object/pick": {
2021
+ category: "std-object",
2022
+ minArity: 2,
2023
+ maxArity: 2,
2024
+ returnType: "any",
2025
+ description: "Select only specified keys (return type is subset of input object shape)",
2026
+ module: "object",
2027
+ returnSemantics: "object-key-lookup"
2028
+ },
2029
+ "object/set": {
2030
+ category: "std-object",
2031
+ minArity: 3,
2032
+ maxArity: 3,
2033
+ returnType: "any",
2034
+ description: "Set nested value by path (returns new object)",
2035
+ module: "object"
2036
+ },
2037
+ "object/values": {
2038
+ category: "std-object",
2039
+ minArity: 1,
2040
+ maxArity: 1,
2041
+ returnType: "array",
2042
+ description: "Get object values as array",
2043
+ module: "object"
2044
+ },
2045
+ or: {
2046
+ category: "logic",
2047
+ minArity: 2,
2048
+ maxArity: null,
2049
+ returnType: "boolean",
2050
+ description: "Logical OR (returns the first truthy value, NOT a boolean \u2014 short-circuit)",
2051
+ module: "core",
2052
+ returnSemantics: "first-truthy-of-args"
2053
+ },
2054
+ "os/debounce": {
2055
+ category: "std-os",
2056
+ minArity: 2,
2057
+ maxArity: 2,
2058
+ returnType: "void",
2059
+ description: "Configure debounce interval for an OS event type. Prevents trigger storms during rapid changes.",
2060
+ module: "os",
2061
+ hasSideEffects: true
2062
+ },
2063
+ "os/watch-cron": {
2064
+ category: "std-os",
2065
+ minArity: 1,
2066
+ maxArity: 1,
2067
+ returnType: "void",
2068
+ description: "Register cron schedule. Emits OS_CRON_FIRE events with { expression, timestamp } payload.",
2069
+ module: "os",
2070
+ hasSideEffects: true
2071
+ },
2072
+ "os/watch-env": {
2073
+ category: "std-os",
2074
+ minArity: 1,
2075
+ maxArity: 1,
2076
+ returnType: "void",
2077
+ description: "Register environment variable watcher. Emits OS_ENV_CHANGED events with { variable, oldValue, newValue } payload.",
2078
+ module: "os",
2079
+ hasSideEffects: true
2080
+ },
2081
+ "os/watch-files": {
2082
+ category: "std-os",
2083
+ minArity: 1,
2084
+ maxArity: 2,
2085
+ returnType: "void",
2086
+ description: "Register file system watcher. Emits OS_FILE_MODIFIED, OS_FILE_CREATED, OS_FILE_DELETED events with { path, name, dir, timestamp } payload.",
2087
+ module: "os",
2088
+ hasSideEffects: true
2089
+ },
2090
+ "os/watch-http": {
2091
+ category: "std-os",
2092
+ minArity: 1,
2093
+ maxArity: 2,
2094
+ returnType: "void",
2095
+ description: "Register HTTP response interceptor. Emits OS_HTTP_RESPONSE events with { url, method, status, headers, body, duration } payload.",
2096
+ module: "os",
2097
+ hasSideEffects: true
2098
+ },
2099
+ "os/watch-port": {
2100
+ category: "std-os",
2101
+ minArity: 1,
2102
+ maxArity: 2,
2103
+ returnType: "void",
2104
+ description: "Register port monitor. Emits OS_PORT_OPENED, OS_PORT_CLOSED events with { port, protocol, pid, address } payload.",
2105
+ module: "os",
2106
+ hasSideEffects: true
2107
+ },
2108
+ "os/watch-process": {
2109
+ category: "std-os",
2110
+ minArity: 1,
2111
+ maxArity: 2,
2112
+ returnType: "void",
2113
+ description: "Register process monitor. Emits OS_PROCESS_EXITED, OS_PROCESS_STARTED events with { pid, name, exitCode, signal, args, duration } payload.",
2114
+ module: "os",
2115
+ hasSideEffects: true
2116
+ },
2117
+ "os/watch-signal": {
2118
+ category: "std-os",
2119
+ minArity: 1,
2120
+ maxArity: 1,
2121
+ returnType: "void",
2122
+ description: "Register OS signal handler. Emits OS_SIGNAL_USR1, OS_SIGNAL_HUP, etc. with { pid, timestamp } payload.",
2123
+ module: "os",
2124
+ hasSideEffects: true
2125
+ },
2126
+ path: {
2127
+ category: "std-object",
2128
+ minArity: 1,
2129
+ maxArity: null,
2130
+ returnType: "string",
2131
+ description: "Build a dot-separated path string from segments. Used with set effect for dynamic field paths.",
2132
+ module: "object"
2133
+ },
2134
+ "path/astar": {
2135
+ category: "std-path",
2136
+ minArity: 5,
2137
+ maxArity: 6,
2138
+ returnType: "array",
2139
+ description: "A* shortest path on a w\xD7h grid; returns cells start\u2192goal (incl. both) or [] if none",
2140
+ module: "path"
2141
+ },
2142
+ "path/reachable": {
2143
+ category: "std-path",
2144
+ minArity: 5,
2145
+ maxArity: 6,
2146
+ returnType: "array",
2147
+ description: "BFS cells reachable within N moves from start (incl. start); sorted row-major",
2148
+ module: "path"
2149
+ },
2150
+ persist: {
2151
+ category: "effect",
2152
+ minArity: 2,
2153
+ maxArity: 4,
2154
+ returnType: "void",
2155
+ description: "Create, update, delete, clear, or batch entity records. Optional trailing { emit: { success, failure } } options object attaches closed-circuit emit routing.",
2156
+ module: "core",
2157
+ hasSideEffects: true,
2158
+ effect: {
2159
+ kind: "persist",
2160
+ produces: {
2161
+ kind: "union",
2162
+ of: [
2163
+ {
2164
+ kind: "entity"
2165
+ },
2166
+ {
2167
+ kind: "object",
2168
+ fields: {
2169
+ id: "string",
2170
+ deleted: "boolean"
2171
+ },
2172
+ open: false
2173
+ },
2174
+ {
2175
+ kind: "object",
2176
+ fields: {
2177
+ operations: {
2178
+ kind: "array",
2179
+ of: "any"
2180
+ },
2181
+ completedCount: "number",
2182
+ totalCount: "number"
2183
+ },
2184
+ open: false
2185
+ }
2186
+ ]
2187
+ }
2188
+ }
2189
+ },
2190
+ "prob/beta": {
2191
+ category: "std-prob",
2192
+ minArity: 2,
2193
+ maxArity: 2,
2194
+ returnType: "number",
2195
+ description: "Sample from a Beta(alpha, beta) distribution",
2196
+ module: "prob"
2197
+ },
2198
+ "prob/categorical": {
2199
+ category: "std-prob",
2200
+ minArity: 2,
2201
+ maxArity: 2,
2202
+ returnType: "any",
2203
+ description: "Weighted random selection from items",
2204
+ module: "prob"
2205
+ },
2206
+ "prob/condition": {
2207
+ category: "std-prob",
2208
+ minArity: 1,
2209
+ maxArity: 1,
2210
+ returnType: "void",
2211
+ description: "Mark current sample as rejected if predicate is false",
2212
+ module: "prob",
2213
+ hasSideEffects: true
2214
+ },
2215
+ "prob/credible-interval": {
2216
+ category: "std-prob",
2217
+ minArity: 2,
2218
+ maxArity: 2,
2219
+ returnType: "array",
2220
+ description: "Compute symmetric credible interval from samples",
2221
+ module: "prob"
2222
+ },
2223
+ "prob/expected-value": {
2224
+ category: "std-prob",
2225
+ minArity: 1,
2226
+ maxArity: 1,
2227
+ returnType: "number",
2228
+ description: "Mean of numeric samples",
2229
+ module: "prob"
2230
+ },
2231
+ "prob/flip": {
2232
+ category: "std-prob",
2233
+ minArity: 1,
2234
+ maxArity: 1,
2235
+ returnType: "boolean",
2236
+ description: "Bernoulli trial: returns true with probability p",
2237
+ module: "prob"
2238
+ },
2239
+ "prob/gaussian": {
2240
+ category: "std-prob",
2241
+ minArity: 2,
2242
+ maxArity: 2,
2243
+ returnType: "number",
2244
+ description: "Sample from a Gaussian (normal) distribution",
2245
+ module: "prob"
2246
+ },
2247
+ "prob/histogram": {
2248
+ category: "std-prob",
2249
+ minArity: 2,
2250
+ maxArity: 2,
2251
+ returnType: "object",
2252
+ description: "Bin numeric samples into a histogram",
2253
+ module: "prob"
2254
+ },
2255
+ "prob/infer": {
2256
+ category: "std-prob",
2257
+ minArity: 4,
2258
+ maxArity: 4,
2259
+ returnType: "object",
2260
+ description: "Like posterior but returns {mean, variance, samples, acceptRate}",
2261
+ module: "prob"
2262
+ },
2263
+ "prob/percentile": {
2264
+ category: "std-prob",
2265
+ minArity: 2,
2266
+ maxArity: 2,
2267
+ returnType: "number",
2268
+ description: "Get the p-th percentile (0-100) from samples",
2269
+ module: "prob"
2270
+ },
2271
+ "prob/poisson": {
2272
+ category: "std-prob",
2273
+ minArity: 1,
2274
+ maxArity: 1,
2275
+ returnType: "number",
2276
+ description: "Sample from a Poisson distribution",
2277
+ module: "prob"
2278
+ },
2279
+ "prob/posterior": {
2280
+ category: "std-prob",
2281
+ minArity: 4,
2282
+ maxArity: 4,
2283
+ returnType: "array",
2284
+ description: "Rejection sampling: returns accepted query values",
2285
+ module: "prob"
2286
+ },
2287
+ "prob/sample": {
2288
+ category: "std-prob",
2289
+ minArity: 2,
2290
+ maxArity: 2,
2291
+ returnType: "array",
2292
+ description: "Evaluate an expression n times and collect results",
2293
+ module: "prob"
2294
+ },
2295
+ "prob/seed": {
2296
+ category: "std-prob",
2297
+ minArity: 1,
2298
+ maxArity: 1,
2299
+ returnType: "void",
2300
+ description: "Set seeded PRNG for deterministic probabilistic sampling",
2301
+ module: "prob",
2302
+ hasSideEffects: true
2303
+ },
2304
+ "prob/uniform": {
2305
+ category: "std-prob",
2306
+ minArity: 2,
2307
+ maxArity: 2,
2308
+ returnType: "number",
2309
+ description: "Sample from a uniform distribution [lo, hi)",
2310
+ module: "prob"
2311
+ },
2312
+ "prob/variance": {
2313
+ category: "std-prob",
2314
+ minArity: 1,
2315
+ maxArity: 1,
2316
+ returnType: "number",
2317
+ description: "Population variance of numeric samples",
2318
+ module: "prob"
2319
+ },
2320
+ ref: {
2321
+ category: "effect",
2322
+ minArity: 1,
2323
+ maxArity: 2,
2324
+ returnType: "void",
2325
+ description: "Reactive entity reference (deprecated, use fetch with listens in V2)",
2326
+ module: "core",
2327
+ hasSideEffects: true,
2328
+ effect: {
2329
+ kind: "ref",
2330
+ produces: {
2331
+ kind: "union",
2332
+ of: [
2333
+ {
2334
+ kind: "entity"
2335
+ },
2336
+ {
2337
+ kind: "array",
2338
+ of: {
2339
+ kind: "entity"
2340
+ }
2341
+ }
2342
+ ]
2343
+ }
2344
+ }
2345
+ },
2346
+ "render-ui": {
2347
+ category: "effect",
2348
+ minArity: 2,
2349
+ maxArity: 3,
2350
+ returnType: "void",
2351
+ description: "Render a pattern into a UI slot",
2352
+ module: "core",
2353
+ hasSideEffects: true,
2354
+ effect: {
2355
+ kind: "render-ui"
2356
+ }
2357
+ },
2358
+ "send-server": {
2359
+ category: "effect",
2360
+ minArity: 1,
2361
+ maxArity: 2,
2362
+ returnType: "void",
2363
+ description: "Send an orbital event to the server over WebSocket (client-side; chat/real-time trigger)",
2364
+ module: "core",
2365
+ hasSideEffects: true,
2366
+ effect: {
2367
+ kind: "send-server"
2368
+ }
2369
+ },
2370
+ "session/append-history": {
2371
+ category: "std-session",
2372
+ minArity: 2,
2373
+ maxArity: 2,
2374
+ returnType: "void",
2375
+ description: "Append an entry to the per-orbital conversation history.",
2376
+ module: "session",
2377
+ hasSideEffects: true
2378
+ },
2379
+ "session/read-analysis": {
2380
+ category: "std-session",
2381
+ minArity: 0,
2382
+ maxArity: 0,
2383
+ returnType: "object",
2384
+ description: "Read the pre-computed analysis result.",
2385
+ module: "session"
2386
+ },
2387
+ "session/read-errors": {
2388
+ category: "std-session",
2389
+ minArity: 1,
2390
+ maxArity: 1,
2391
+ returnType: "array",
2392
+ description: "Read validation errors for an orbital.",
2393
+ module: "session"
2394
+ },
2395
+ "session/read-history": {
2396
+ category: "std-session",
2397
+ minArity: 1,
2398
+ maxArity: 1,
2399
+ returnType: "array",
2400
+ description: "Read the per-orbital conversation history.",
2401
+ module: "session"
2402
+ },
2403
+ "session/read-memory": {
2404
+ category: "std-session",
2405
+ minArity: 1,
2406
+ maxArity: 1,
2407
+ returnType: "object",
2408
+ description: "Read the per-orbital memory from the session store.",
2409
+ module: "session"
2410
+ },
2411
+ "session/read-spec": {
2412
+ category: "std-session",
2413
+ minArity: 1,
2414
+ maxArity: 1,
2415
+ returnType: "object",
2416
+ description: "Read the per-orbital spec.json from the session store.",
2417
+ module: "session"
2418
+ },
2419
+ "session/write-errors": {
2420
+ category: "std-session",
2421
+ minArity: 2,
2422
+ maxArity: 2,
2423
+ returnType: "void",
2424
+ description: "Write validation errors for an orbital.",
2425
+ module: "session",
2426
+ hasSideEffects: true
2427
+ },
2428
+ "session/write-memory": {
2429
+ category: "std-session",
2430
+ minArity: 2,
2431
+ maxArity: 2,
2432
+ returnType: "void",
2433
+ description: "Write per-orbital memory to the session store.",
2434
+ module: "session",
2435
+ hasSideEffects: true
2436
+ },
2437
+ "session/write-spec": {
2438
+ category: "std-session",
2439
+ minArity: 2,
2440
+ maxArity: 2,
2441
+ returnType: "void",
2442
+ description: "Write the per-orbital spec.json to the session store.",
2443
+ module: "session",
2444
+ hasSideEffects: true
2445
+ },
2446
+ set: {
2447
+ category: "effect",
2448
+ minArity: 2,
2449
+ maxArity: 2,
2450
+ returnType: "void",
2451
+ description: "Set a binding to a value",
2452
+ module: "core",
2453
+ hasSideEffects: true,
2454
+ effect: {
2455
+ kind: "set",
2456
+ produces: "any",
2457
+ config: {
2458
+ operation: {
2459
+ kind: "union",
2460
+ of: [
2461
+ {
2462
+ kind: "literal",
2463
+ value: "increment"
2464
+ },
2465
+ {
2466
+ kind: "literal",
2467
+ value: "decrement"
2468
+ },
2469
+ {
2470
+ kind: "literal",
2471
+ value: "multiply"
2472
+ },
2473
+ {
2474
+ kind: "literal",
2475
+ value: "append"
2476
+ },
2477
+ {
2478
+ kind: "literal",
2479
+ value: "remove"
2480
+ }
2481
+ ]
2482
+ }
2483
+ }
2484
+ }
2485
+ },
2486
+ spawn: {
2487
+ category: "effect",
2488
+ minArity: 1,
2489
+ maxArity: 2,
2490
+ returnType: "void",
2491
+ description: "Spawn a new entity instance (games)",
2492
+ module: "core",
2493
+ hasSideEffects: true,
2494
+ effect: {
2495
+ kind: "spawn"
2496
+ }
2497
+ },
2498
+ "str/camelCase": {
2499
+ category: "std-str",
2500
+ minArity: 1,
2501
+ maxArity: 1,
2502
+ returnType: "string",
2503
+ description: "Convert to camelCase",
2504
+ module: "str"
2505
+ },
2506
+ "str/capitalize": {
2507
+ category: "std-str",
2508
+ minArity: 1,
2509
+ maxArity: 1,
2510
+ returnType: "string",
2511
+ description: "Capitalize first character",
2512
+ module: "str"
2513
+ },
2514
+ "str/concat": {
2515
+ category: "std-str",
2516
+ minArity: 1,
2517
+ maxArity: 99,
2518
+ returnType: "string",
2519
+ description: "Concatenate strings together",
2520
+ module: "str"
2521
+ },
2522
+ "str/default": {
2523
+ category: "std-str",
2524
+ minArity: 2,
2525
+ maxArity: 2,
2526
+ returnType: "string",
2527
+ description: "Return default if value is null/undefined/empty",
2528
+ module: "str"
2529
+ },
2530
+ "str/endsWith": {
2531
+ category: "std-str",
2532
+ minArity: 2,
2533
+ maxArity: 2,
2534
+ returnType: "boolean",
2535
+ description: "Check if string ends with suffix",
2536
+ module: "str"
2537
+ },
2538
+ "str/includes": {
2539
+ category: "std-str",
2540
+ minArity: 2,
2541
+ maxArity: 2,
2542
+ returnType: "boolean",
2543
+ description: "Check if string contains substring",
2544
+ module: "str"
2545
+ },
2546
+ "str/join": {
2547
+ category: "std-str",
2548
+ minArity: 2,
2549
+ maxArity: 2,
2550
+ returnType: "string",
2551
+ description: "Join array elements into string",
2552
+ module: "str"
2553
+ },
2554
+ "str/kebabCase": {
2555
+ category: "std-str",
2556
+ minArity: 1,
2557
+ maxArity: 1,
2558
+ returnType: "string",
2559
+ description: "Convert to kebab-case",
2560
+ module: "str"
2561
+ },
2562
+ "str/len": {
2563
+ category: "std-str",
2564
+ minArity: 1,
2565
+ maxArity: 1,
2566
+ returnType: "number",
2567
+ description: "String length",
2568
+ module: "str"
2569
+ },
2570
+ "str/lower": {
2571
+ category: "std-str",
2572
+ minArity: 1,
2573
+ maxArity: 1,
2574
+ returnType: "string",
2575
+ description: "Convert to lowercase",
2576
+ module: "str"
2577
+ },
2578
+ "str/padEnd": {
2579
+ category: "std-str",
2580
+ minArity: 2,
2581
+ maxArity: 3,
2582
+ returnType: "string",
2583
+ description: "Pad string from end to target length",
2584
+ module: "str"
2585
+ },
2586
+ "str/padStart": {
2587
+ category: "std-str",
2588
+ minArity: 2,
2589
+ maxArity: 3,
2590
+ returnType: "string",
2591
+ description: "Pad string from start to target length",
2592
+ module: "str"
2593
+ },
2594
+ "str/repeat": {
2595
+ category: "std-str",
2596
+ minArity: 2,
2597
+ maxArity: 2,
2598
+ returnType: "string",
2599
+ description: "Repeat string n times",
2600
+ module: "str"
2601
+ },
2602
+ "str/replace": {
2603
+ category: "std-str",
2604
+ minArity: 3,
2605
+ maxArity: 3,
2606
+ returnType: "string",
2607
+ description: "Replace first occurrence",
2608
+ module: "str"
2609
+ },
2610
+ "str/replaceAll": {
2611
+ category: "std-str",
2612
+ minArity: 3,
2613
+ maxArity: 3,
2614
+ returnType: "string",
2615
+ description: "Replace all occurrences",
2616
+ module: "str"
2617
+ },
2618
+ "str/reverse": {
2619
+ category: "std-str",
2620
+ minArity: 1,
2621
+ maxArity: 1,
2622
+ returnType: "string",
2623
+ description: "Reverse string",
2624
+ module: "str"
2625
+ },
2626
+ "str/slice": {
2627
+ category: "std-str",
2628
+ minArity: 2,
2629
+ maxArity: 3,
2630
+ returnType: "string",
2631
+ description: "Extract substring",
2632
+ module: "str"
2633
+ },
2634
+ "str/snakeCase": {
2635
+ category: "std-str",
2636
+ minArity: 1,
2637
+ maxArity: 1,
2638
+ returnType: "string",
2639
+ description: "Convert to snake_case",
2640
+ module: "str"
2641
+ },
2642
+ "str/split": {
2643
+ category: "std-str",
2644
+ minArity: 2,
2645
+ maxArity: 2,
2646
+ returnType: "array",
2647
+ description: "Split string into array by delimiter",
2648
+ module: "str"
2649
+ },
2650
+ "str/startsWith": {
2651
+ category: "std-str",
2652
+ minArity: 2,
2653
+ maxArity: 2,
2654
+ returnType: "boolean",
2655
+ description: "Check if string starts with prefix",
2656
+ module: "str"
2657
+ },
2658
+ "str/template": {
2659
+ category: "std-str",
2660
+ minArity: 2,
2661
+ maxArity: 2,
2662
+ returnType: "string",
2663
+ description: "Variable substitution in template string",
2664
+ module: "str"
2665
+ },
2666
+ "str/titleCase": {
2667
+ category: "std-str",
2668
+ minArity: 1,
2669
+ maxArity: 1,
2670
+ returnType: "string",
2671
+ description: "Convert to Title Case",
2672
+ module: "str"
2673
+ },
2674
+ "str/trim": {
2675
+ category: "std-str",
2676
+ minArity: 1,
2677
+ maxArity: 1,
2678
+ returnType: "string",
2679
+ description: "Remove leading and trailing whitespace",
2680
+ module: "str"
2681
+ },
2682
+ "str/trimEnd": {
2683
+ category: "std-str",
2684
+ minArity: 1,
2685
+ maxArity: 1,
2686
+ returnType: "string",
2687
+ description: "Remove trailing whitespace",
2688
+ module: "str"
2689
+ },
2690
+ "str/trimStart": {
2691
+ category: "std-str",
2692
+ minArity: 1,
2693
+ maxArity: 1,
2694
+ returnType: "string",
2695
+ description: "Remove leading whitespace",
2696
+ module: "str"
2697
+ },
2698
+ "str/truncate": {
2699
+ category: "std-str",
2700
+ minArity: 2,
2701
+ maxArity: 3,
2702
+ returnType: "string",
2703
+ description: "Truncate string with optional suffix",
2704
+ module: "str"
2705
+ },
2706
+ "str/upper": {
2707
+ category: "std-str",
2708
+ minArity: 1,
2709
+ maxArity: 1,
2710
+ returnType: "string",
2711
+ description: "Convert to uppercase",
2712
+ module: "str"
2713
+ },
2714
+ "tensor/add": {
2715
+ category: "ml-tensor",
2716
+ minArity: 2,
2717
+ maxArity: 2,
2718
+ returnType: "tensor",
2719
+ description: "Element-wise addition",
2720
+ module: "tensor"
2721
+ },
2722
+ "tensor/allInRange": {
2723
+ category: "ml-tensor",
2724
+ minArity: 2,
2725
+ maxArity: 2,
2726
+ returnType: "boolean",
2727
+ description: "Check if all elements are within range [min, max]",
2728
+ module: "tensor"
2729
+ },
2730
+ "tensor/argmax": {
2731
+ category: "ml-tensor",
2732
+ minArity: 1,
2733
+ maxArity: 2,
2734
+ returnType: "number | tensor",
2735
+ description: "Index of maximum value",
2736
+ module: "tensor"
2737
+ },
2738
+ "tensor/cat": {
2739
+ category: "ml-tensor",
2740
+ minArity: 2,
2741
+ maxArity: 2,
2742
+ returnType: "tensor",
2743
+ description: "Concatenate two tensors along the last dimension",
2744
+ module: "tensor"
2745
+ },
2746
+ "tensor/clamp": {
2747
+ category: "ml-tensor",
2748
+ minArity: 3,
2749
+ maxArity: 3,
2750
+ returnType: "tensor",
2751
+ description: "Clamp all elements to range [min, max]",
2752
+ module: "tensor"
2753
+ },
2754
+ "tensor/clampPerDim": {
2755
+ category: "ml-tensor",
2756
+ minArity: 2,
2757
+ maxArity: 2,
2758
+ returnType: "tensor",
2759
+ description: "Clamp each dimension to its specified range",
2760
+ module: "tensor"
2761
+ },
2762
+ "tensor/div": {
2763
+ category: "ml-tensor",
2764
+ minArity: 2,
2765
+ maxArity: 2,
2766
+ returnType: "tensor",
2767
+ description: "Element-wise division",
2768
+ module: "tensor"
2769
+ },
2770
+ "tensor/dot": {
2771
+ category: "ml-tensor",
2772
+ minArity: 2,
2773
+ maxArity: 2,
2774
+ returnType: "number",
2775
+ description: "Dot product of two 1D tensors",
2776
+ module: "tensor"
2777
+ },
2778
+ "tensor/flatten": {
2779
+ category: "ml-tensor",
2780
+ minArity: 1,
2781
+ maxArity: 1,
2782
+ returnType: "tensor",
2783
+ description: "Flatten tensor to 1D",
2784
+ module: "tensor"
2785
+ },
2786
+ "tensor/from": {
2787
+ category: "ml-tensor",
2788
+ minArity: 1,
2789
+ maxArity: 1,
2790
+ returnType: "tensor",
2791
+ description: "Create tensor from array",
2792
+ module: "tensor"
2793
+ },
2794
+ "tensor/get": {
2795
+ category: "ml-tensor",
2796
+ minArity: 2,
2797
+ maxArity: 2,
2798
+ returnType: "number",
2799
+ description: "Get element at index",
2800
+ module: "tensor"
2801
+ },
2802
+ "tensor/matmul": {
2803
+ category: "ml-tensor",
2804
+ minArity: 2,
2805
+ maxArity: 2,
2806
+ returnType: "tensor",
2807
+ description: "Matrix multiplication",
2808
+ module: "tensor"
2809
+ },
2810
+ "tensor/max": {
2811
+ category: "ml-tensor",
2812
+ minArity: 1,
2813
+ maxArity: 2,
2814
+ returnType: "number | tensor",
2815
+ description: "Maximum value in tensor",
2816
+ module: "tensor"
2817
+ },
2818
+ "tensor/mean": {
2819
+ category: "ml-tensor",
2820
+ minArity: 1,
2821
+ maxArity: 2,
2822
+ returnType: "number | tensor",
2823
+ description: "Mean of tensor elements",
2824
+ module: "tensor"
2825
+ },
2826
+ "tensor/min": {
2827
+ category: "ml-tensor",
2828
+ minArity: 1,
2829
+ maxArity: 2,
2830
+ returnType: "number | tensor",
2831
+ description: "Minimum value in tensor",
2832
+ module: "tensor"
2833
+ },
2834
+ "tensor/mul": {
2835
+ category: "ml-tensor",
2836
+ minArity: 2,
2837
+ maxArity: 2,
2838
+ returnType: "tensor",
2839
+ description: "Element-wise multiplication",
2840
+ module: "tensor"
2841
+ },
2842
+ "tensor/norm": {
2843
+ category: "ml-tensor",
2844
+ minArity: 1,
2845
+ maxArity: 2,
2846
+ returnType: "number",
2847
+ description: "L2 norm of tensor",
2848
+ module: "tensor"
2849
+ },
2850
+ "tensor/ones": {
2851
+ category: "ml-tensor",
2852
+ minArity: 1,
2853
+ maxArity: 1,
2854
+ returnType: "tensor",
2855
+ description: "Create tensor filled with ones",
2856
+ module: "tensor"
2857
+ },
2858
+ "tensor/outOfRangeDims": {
2859
+ category: "ml-tensor",
2860
+ minArity: 2,
2861
+ maxArity: 2,
2862
+ returnType: "array",
2863
+ description: "Get dimensions that exceed their specified ranges",
2864
+ module: "tensor"
2865
+ },
2866
+ "tensor/outOfRangeIndices": {
2867
+ category: "ml-tensor",
2868
+ minArity: 2,
2869
+ maxArity: 2,
2870
+ returnType: "number[]",
2871
+ description: "Get indices of elements outside range",
2872
+ module: "tensor"
2873
+ },
2874
+ "tensor/rand": {
2875
+ category: "ml-tensor",
2876
+ minArity: 1,
2877
+ maxArity: 1,
2878
+ returnType: "tensor",
2879
+ description: "Create tensor with random values in [0, 1)",
2880
+ module: "tensor"
2881
+ },
2882
+ "tensor/randn": {
2883
+ category: "ml-tensor",
2884
+ minArity: 1,
2885
+ maxArity: 1,
2886
+ returnType: "tensor",
2887
+ description: "Create tensor with random values from standard normal distribution",
2888
+ module: "tensor"
2889
+ },
2890
+ "tensor/reshape": {
2891
+ category: "ml-tensor",
2892
+ minArity: 2,
2893
+ maxArity: 2,
2894
+ returnType: "tensor",
2895
+ description: "Reshape tensor to new shape (total elements must match)",
2896
+ module: "tensor"
2897
+ },
2898
+ "tensor/shape": {
2899
+ category: "ml-tensor",
2900
+ minArity: 1,
2901
+ maxArity: 1,
2902
+ returnType: "number[]",
2903
+ description: "Get tensor shape as array",
2904
+ module: "tensor"
2905
+ },
2906
+ "tensor/slice": {
2907
+ category: "ml-tensor",
2908
+ minArity: 3,
2909
+ maxArity: 3,
2910
+ returnType: "tensor",
2911
+ description: "Get slice of tensor",
2912
+ module: "tensor"
2913
+ },
2914
+ "tensor/squeeze": {
2915
+ category: "ml-tensor",
2916
+ minArity: 1,
2917
+ maxArity: 1,
2918
+ returnType: "tensor",
2919
+ description: "Remove all dimensions of size one",
2920
+ module: "tensor"
2921
+ },
2922
+ "tensor/stack": {
2923
+ category: "ml-tensor",
2924
+ minArity: 2,
2925
+ maxArity: 2,
2926
+ returnType: "tensor",
2927
+ description: "Stack two tensors along a new leading dimension",
2928
+ module: "tensor"
2929
+ },
2930
+ "tensor/sub": {
2931
+ category: "ml-tensor",
2932
+ minArity: 2,
2933
+ maxArity: 2,
2934
+ returnType: "tensor",
2935
+ description: "Element-wise subtraction",
2936
+ module: "tensor"
2937
+ },
2938
+ "tensor/sum": {
2939
+ category: "ml-tensor",
2940
+ minArity: 1,
2941
+ maxArity: 2,
2942
+ returnType: "number | tensor",
2943
+ description: "Sum of tensor elements",
2944
+ module: "tensor"
2945
+ },
2946
+ "tensor/toArray": {
2947
+ category: "ml-tensor",
2948
+ minArity: 1,
2949
+ maxArity: 1,
2950
+ returnType: "array",
2951
+ description: "Convert tensor to nested array",
2952
+ module: "tensor"
2953
+ },
2954
+ "tensor/toList": {
2955
+ category: "ml-tensor",
2956
+ minArity: 1,
2957
+ maxArity: 1,
2958
+ returnType: "number[]",
2959
+ description: "Convert 1D tensor to flat array",
2960
+ module: "tensor"
2961
+ },
2962
+ "tensor/transpose": {
2963
+ category: "ml-tensor",
2964
+ minArity: 1,
2965
+ maxArity: 3,
2966
+ returnType: "tensor",
2967
+ description: "Transpose a tensor (optionally swapping two named dimensions)",
2968
+ module: "tensor"
2969
+ },
2970
+ "tensor/unsqueeze": {
2971
+ category: "ml-tensor",
2972
+ minArity: 2,
2973
+ maxArity: 2,
2974
+ returnType: "tensor",
2975
+ description: "Insert a dimension of size one at the given position",
2976
+ module: "tensor"
2977
+ },
2978
+ "tensor/zeros": {
2979
+ category: "ml-tensor",
2980
+ minArity: 1,
2981
+ maxArity: 1,
2982
+ returnType: "tensor",
2983
+ description: "Create tensor filled with zeros",
2984
+ module: "tensor"
2985
+ },
2986
+ "time/add": {
2987
+ category: "std-time",
2988
+ minArity: 3,
2989
+ maxArity: 3,
2990
+ returnType: "number",
2991
+ description: "Add time to timestamp",
2992
+ module: "time"
2993
+ },
2994
+ "time/day": {
2995
+ category: "std-time",
2996
+ minArity: 1,
2997
+ maxArity: 1,
2998
+ returnType: "number",
2999
+ description: "Get day of month from timestamp (1-31)",
3000
+ module: "time"
3001
+ },
3002
+ "time/diff": {
3003
+ category: "std-time",
3004
+ minArity: 2,
3005
+ maxArity: 3,
3006
+ returnType: "number",
3007
+ description: "Difference between timestamps",
3008
+ module: "time"
3009
+ },
3010
+ "time/duration": {
3011
+ category: "std-time",
3012
+ minArity: 1,
3013
+ maxArity: 1,
3014
+ returnType: "string",
3015
+ description: 'Format milliseconds as duration ("2h 30m")',
3016
+ module: "time"
3017
+ },
3018
+ "time/endOf": {
3019
+ category: "std-time",
3020
+ minArity: 2,
3021
+ maxArity: 2,
3022
+ returnType: "number",
3023
+ description: "Get end of time period",
3024
+ module: "time"
3025
+ },
3026
+ "time/format": {
3027
+ category: "std-time",
3028
+ minArity: 2,
3029
+ maxArity: 2,
3030
+ returnType: "string",
3031
+ description: "Format timestamp to string",
3032
+ module: "time"
3033
+ },
3034
+ "time/hour": {
3035
+ category: "std-time",
3036
+ minArity: 1,
3037
+ maxArity: 1,
3038
+ returnType: "number",
3039
+ description: "Get hour from timestamp (0-23)",
3040
+ module: "time"
3041
+ },
3042
+ "time/isAfter": {
3043
+ category: "std-time",
3044
+ minArity: 2,
3045
+ maxArity: 2,
3046
+ returnType: "boolean",
3047
+ description: "Check if a is after b",
3048
+ module: "time"
3049
+ },
3050
+ "time/isBefore": {
3051
+ category: "std-time",
3052
+ minArity: 2,
3053
+ maxArity: 2,
3054
+ returnType: "boolean",
3055
+ description: "Check if a is before b",
3056
+ module: "time"
3057
+ },
3058
+ "time/isBetween": {
3059
+ category: "std-time",
3060
+ minArity: 3,
3061
+ maxArity: 3,
3062
+ returnType: "boolean",
3063
+ description: "Check if date is between start and end",
3064
+ module: "time"
3065
+ },
3066
+ "time/isFuture": {
3067
+ category: "std-time",
3068
+ minArity: 1,
3069
+ maxArity: 1,
3070
+ returnType: "boolean",
3071
+ description: "Check if timestamp is in the future",
3072
+ module: "time"
3073
+ },
3074
+ "time/isPast": {
3075
+ category: "std-time",
3076
+ minArity: 1,
3077
+ maxArity: 1,
3078
+ returnType: "boolean",
3079
+ description: "Check if timestamp is in the past",
3080
+ module: "time"
3081
+ },
3082
+ "time/isSame": {
3083
+ category: "std-time",
3084
+ minArity: 2,
3085
+ maxArity: 3,
3086
+ returnType: "boolean",
3087
+ description: "Check if timestamps are same (optionally by unit)",
3088
+ module: "time"
3089
+ },
3090
+ "time/isToday": {
3091
+ category: "std-time",
3092
+ minArity: 1,
3093
+ maxArity: 1,
3094
+ returnType: "boolean",
3095
+ description: "Check if timestamp is today",
3096
+ module: "time"
3097
+ },
3098
+ "time/minute": {
3099
+ category: "std-time",
3100
+ minArity: 1,
3101
+ maxArity: 1,
3102
+ returnType: "number",
3103
+ description: "Get minute from timestamp (0-59)",
3104
+ module: "time"
3105
+ },
3106
+ "time/month": {
3107
+ category: "std-time",
3108
+ minArity: 1,
3109
+ maxArity: 1,
3110
+ returnType: "number",
3111
+ description: "Get month from timestamp (1-12)",
3112
+ module: "time"
3113
+ },
3114
+ "time/now": {
3115
+ category: "std-time",
3116
+ minArity: 0,
3117
+ maxArity: 0,
3118
+ returnType: "number",
3119
+ description: "Current timestamp",
3120
+ module: "time"
3121
+ },
3122
+ "time/parse": {
3123
+ category: "std-time",
3124
+ minArity: 1,
3125
+ maxArity: 2,
3126
+ returnType: "number",
3127
+ description: "Parse string to timestamp",
3128
+ module: "time"
3129
+ },
3130
+ "time/relative": {
3131
+ category: "std-time",
3132
+ minArity: 1,
3133
+ maxArity: 1,
3134
+ returnType: "string",
3135
+ description: 'Format as relative time ("2 hours ago", "in 3 days")',
3136
+ module: "time"
3137
+ },
3138
+ "time/second": {
3139
+ category: "std-time",
3140
+ minArity: 1,
3141
+ maxArity: 1,
3142
+ returnType: "number",
3143
+ description: "Get second from timestamp (0-59)",
3144
+ module: "time"
3145
+ },
3146
+ "time/startOf": {
3147
+ category: "std-time",
3148
+ minArity: 2,
3149
+ maxArity: 2,
3150
+ returnType: "number",
3151
+ description: "Get start of time period",
3152
+ module: "time"
3153
+ },
3154
+ "time/subtract": {
3155
+ category: "std-time",
3156
+ minArity: 3,
3157
+ maxArity: 3,
3158
+ returnType: "number",
3159
+ description: "Subtract time from timestamp",
3160
+ module: "time"
3161
+ },
3162
+ "time/today": {
3163
+ category: "std-time",
3164
+ minArity: 0,
3165
+ maxArity: 0,
3166
+ returnType: "number",
3167
+ description: "Today at midnight (local time)",
3168
+ module: "time"
3169
+ },
3170
+ "time/weekday": {
3171
+ category: "std-time",
3172
+ minArity: 1,
3173
+ maxArity: 1,
3174
+ returnType: "number",
3175
+ description: "Get day of week (0=Sunday, 6=Saturday)",
3176
+ module: "time"
3177
+ },
3178
+ "time/year": {
3179
+ category: "std-time",
3180
+ minArity: 1,
3181
+ maxArity: 1,
3182
+ returnType: "number",
3183
+ description: "Get year from timestamp",
3184
+ module: "time"
3185
+ },
3186
+ "trace/emit": {
3187
+ category: "std-trace",
3188
+ minArity: 1,
3189
+ maxArity: 2,
3190
+ returnType: "void",
3191
+ description: "Emit a structured trace event for observability (115 call sites in rabit today).",
3192
+ module: "trace",
3193
+ hasSideEffects: true
3194
+ },
3195
+ "trace/log": {
3196
+ category: "std-trace",
3197
+ minArity: 2,
3198
+ maxArity: 2,
3199
+ returnType: "void",
3200
+ description: "Log a message at the given level.",
3201
+ module: "trace",
3202
+ hasSideEffects: true
3203
+ },
3204
+ train: {
3205
+ category: "ml-effect",
3206
+ minArity: 1,
3207
+ maxArity: 3,
3208
+ returnType: "object",
3209
+ description: "Train a model over a dataset (ML effect)",
3210
+ module: "train",
3211
+ hasSideEffects: true
3212
+ },
3213
+ "train/adam": {
3214
+ category: "ml-effect",
3215
+ minArity: 2,
3216
+ maxArity: 4,
3217
+ returnType: "void",
3218
+ description: "Adam optimizer step",
3219
+ module: "train",
3220
+ hasSideEffects: true
3221
+ },
3222
+ "train/checkConstraints": {
3223
+ category: "ml-effect",
3224
+ minArity: 2,
3225
+ maxArity: 2,
3226
+ returnType: "train/constraintResult",
3227
+ description: "Check if network weights satisfy all constraints",
3228
+ module: "train"
3229
+ },
3230
+ "train/checkForbiddenOutputs": {
3231
+ category: "ml-effect",
3232
+ minArity: 3,
3233
+ maxArity: 3,
3234
+ returnType: "train/forbiddenResult",
3235
+ description: "Check if model produces outputs in forbidden regions",
3236
+ module: "train"
3237
+ },
3238
+ "train/checkRegression": {
3239
+ category: "ml-effect",
3240
+ minArity: 3,
3241
+ maxArity: 3,
3242
+ returnType: "train/regressionResult",
3243
+ description: "Check if new model regresses on required invariants",
3244
+ module: "train"
3245
+ },
3246
+ "train/checkWeightMagnitude": {
3247
+ category: "ml-effect",
3248
+ minArity: 2,
3249
+ maxArity: 2,
3250
+ returnType: "boolean",
3251
+ description: "Check if all weights are within magnitude limit",
3252
+ module: "train"
3253
+ },
3254
+ "train/clipGradients": {
3255
+ category: "ml-effect",
3256
+ minArity: 2,
3257
+ maxArity: 2,
3258
+ returnType: "number",
3259
+ description: "Clip gradients to max norm (modifies in place)",
3260
+ module: "train",
3261
+ hasSideEffects: true
3262
+ },
3263
+ "train/clipWeights": {
3264
+ category: "ml-effect",
3265
+ minArity: 2,
3266
+ maxArity: 2,
3267
+ returnType: "void",
3268
+ description: "Clip weights to max magnitude (modifies in place)",
3269
+ module: "train",
3270
+ hasSideEffects: true
3271
+ },
3272
+ "train/computeAdvantages": {
3273
+ category: "ml-effect",
3274
+ minArity: 3,
3275
+ maxArity: 3,
3276
+ returnType: "tensor",
3277
+ description: "Compute GAE advantages for policy gradient",
3278
+ module: "train"
3279
+ },
3280
+ "train/computeReturns": {
3281
+ category: "ml-effect",
3282
+ minArity: 2,
3283
+ maxArity: 2,
3284
+ returnType: "tensor",
3285
+ description: "Compute discounted returns from rewards",
3286
+ module: "train"
3287
+ },
3288
+ "train/crossEntropy": {
3289
+ category: "ml-effect",
3290
+ minArity: 2,
3291
+ maxArity: 2,
3292
+ returnType: "number",
3293
+ description: "Cross-entropy loss for classification",
3294
+ module: "train"
3295
+ },
3296
+ "train/getGradientNorm": {
3297
+ category: "ml-effect",
3298
+ minArity: 1,
3299
+ maxArity: 1,
3300
+ returnType: "number",
3301
+ description: "Get current gradient norm",
3302
+ module: "train"
3303
+ },
3304
+ "train/getMaxWeightMagnitude": {
3305
+ category: "ml-effect",
3306
+ minArity: 1,
3307
+ maxArity: 1,
3308
+ returnType: "number",
3309
+ description: "Get maximum weight magnitude in network",
3310
+ module: "train"
3311
+ },
3312
+ "train/huber": {
3313
+ category: "ml-effect",
3314
+ minArity: 2,
3315
+ maxArity: 3,
3316
+ returnType: "number",
3317
+ description: "Huber loss (smooth L1, robust to outliers)",
3318
+ module: "train"
3319
+ },
3320
+ "train/loop": {
3321
+ category: "ml-effect",
3322
+ minArity: 3,
3323
+ maxArity: 3,
3324
+ returnType: "train/result",
3325
+ description: "Execute training loop with constraints",
3326
+ module: "train",
3327
+ hasSideEffects: true
3328
+ },
3329
+ "train/mse": {
3330
+ category: "ml-effect",
3331
+ minArity: 2,
3332
+ maxArity: 2,
3333
+ returnType: "number",
3334
+ description: "Mean squared error loss",
3335
+ module: "train"
3336
+ },
3337
+ "train/sampleBatch": {
3338
+ category: "ml-effect",
3339
+ minArity: 2,
3340
+ maxArity: 2,
3341
+ returnType: "array",
3342
+ description: "Sample random batch from experience buffer",
3343
+ module: "train"
3344
+ },
3345
+ "train/sgd": {
3346
+ category: "ml-effect",
3347
+ minArity: 2,
3348
+ maxArity: 3,
3349
+ returnType: "void",
3350
+ description: "Stochastic gradient descent optimizer step",
3351
+ module: "train",
3352
+ hasSideEffects: true
3353
+ },
3354
+ "train/step": {
3355
+ category: "ml-effect",
3356
+ minArity: 4,
3357
+ maxArity: 4,
3358
+ returnType: "train/stepResult",
3359
+ description: "Execute single training step (forward, loss, backward, update)",
3360
+ module: "train",
3361
+ hasSideEffects: true
3362
+ },
3363
+ "train/validate": {
3364
+ category: "ml-effect",
3365
+ minArity: 2,
3366
+ maxArity: 2,
3367
+ returnType: "train/validationResult",
3368
+ description: "Validate model on test cases, returns pass/fail metrics",
3369
+ module: "train"
3370
+ },
3371
+ "validate/array": {
3372
+ category: "std-validate",
3373
+ minArity: 1,
3374
+ maxArity: 1,
3375
+ returnType: "boolean",
3376
+ description: "Check if value is an array",
3377
+ module: "validate"
3378
+ },
3379
+ "validate/boolean": {
3380
+ category: "std-validate",
3381
+ minArity: 1,
3382
+ maxArity: 1,
3383
+ returnType: "boolean",
3384
+ description: "Check if value is a boolean",
3385
+ module: "validate"
3386
+ },
3387
+ "validate/check": {
3388
+ category: "std-validate",
3389
+ minArity: 2,
3390
+ maxArity: 2,
3391
+ returnType: "any",
3392
+ description: "Run multiple validation rules, return { valid, errors }",
3393
+ module: "validate"
3394
+ },
3395
+ "validate/creditCard": {
3396
+ category: "std-validate",
3397
+ minArity: 1,
3398
+ maxArity: 1,
3399
+ returnType: "boolean",
3400
+ description: "Check if value is a valid credit card number (Luhn algorithm)",
3401
+ module: "validate"
3402
+ },
3403
+ "validate/date": {
3404
+ category: "std-validate",
3405
+ minArity: 1,
3406
+ maxArity: 1,
3407
+ returnType: "boolean",
3408
+ description: "Check if value is a valid date",
3409
+ module: "validate"
3410
+ },
3411
+ "validate/email": {
3412
+ category: "std-validate",
3413
+ minArity: 1,
3414
+ maxArity: 1,
3415
+ returnType: "boolean",
3416
+ description: "Check if value is a valid email format",
3417
+ module: "validate"
3418
+ },
3419
+ "validate/equals": {
3420
+ category: "std-validate",
3421
+ minArity: 2,
3422
+ maxArity: 2,
3423
+ returnType: "boolean",
3424
+ description: "Deep equality check",
3425
+ module: "validate"
3426
+ },
3427
+ "validate/length": {
3428
+ category: "std-validate",
3429
+ minArity: 2,
3430
+ maxArity: 2,
3431
+ returnType: "boolean",
3432
+ description: "Check if string/array has exact length",
3433
+ module: "validate"
3434
+ },
3435
+ "validate/max": {
3436
+ category: "std-validate",
3437
+ minArity: 2,
3438
+ maxArity: 2,
3439
+ returnType: "boolean",
3440
+ description: "Check if number is <= maximum",
3441
+ module: "validate"
3442
+ },
3443
+ "validate/maxLength": {
3444
+ category: "std-validate",
3445
+ minArity: 2,
3446
+ maxArity: 2,
3447
+ returnType: "boolean",
3448
+ description: "Check if string/array has maximum length",
3449
+ module: "validate"
3450
+ },
3451
+ "validate/min": {
3452
+ category: "std-validate",
3453
+ minArity: 2,
3454
+ maxArity: 2,
3455
+ returnType: "boolean",
3456
+ description: "Check if number is >= minimum",
3457
+ module: "validate"
3458
+ },
3459
+ "validate/minLength": {
3460
+ category: "std-validate",
3461
+ minArity: 2,
3462
+ maxArity: 2,
3463
+ returnType: "boolean",
3464
+ description: "Check if string/array has minimum length",
3465
+ module: "validate"
3466
+ },
3467
+ "validate/noneOf": {
3468
+ category: "std-validate",
3469
+ minArity: 2,
3470
+ maxArity: 2,
3471
+ returnType: "boolean",
3472
+ description: "Check if value is not in list of disallowed values",
3473
+ module: "validate"
3474
+ },
3475
+ "validate/number": {
3476
+ category: "std-validate",
3477
+ minArity: 1,
3478
+ maxArity: 1,
3479
+ returnType: "boolean",
3480
+ description: "Check if value is a number",
3481
+ module: "validate"
3482
+ },
3483
+ "validate/object": {
3484
+ category: "std-validate",
3485
+ minArity: 1,
3486
+ maxArity: 1,
3487
+ returnType: "boolean",
3488
+ description: "Check if value is an object",
3489
+ module: "validate"
3490
+ },
3491
+ "validate/oneOf": {
3492
+ category: "std-validate",
3493
+ minArity: 2,
3494
+ maxArity: 2,
3495
+ returnType: "boolean",
3496
+ description: "Check if value is in list of allowed values",
3497
+ module: "validate"
3498
+ },
3499
+ "validate/pattern": {
3500
+ category: "std-validate",
3501
+ minArity: 2,
3502
+ maxArity: 2,
3503
+ returnType: "boolean",
3504
+ description: "Check if string matches regex pattern",
3505
+ module: "validate"
3506
+ },
3507
+ "validate/phone": {
3508
+ category: "std-validate",
3509
+ minArity: 1,
3510
+ maxArity: 1,
3511
+ returnType: "boolean",
3512
+ description: "Check if value is a valid phone number",
3513
+ module: "validate"
3514
+ },
3515
+ "validate/range": {
3516
+ category: "std-validate",
3517
+ minArity: 3,
3518
+ maxArity: 3,
3519
+ returnType: "boolean",
3520
+ description: "Check if number is within range [min, max]",
3521
+ module: "validate"
3522
+ },
3523
+ "validate/required": {
3524
+ category: "std-validate",
3525
+ minArity: 1,
3526
+ maxArity: 1,
3527
+ returnType: "boolean",
3528
+ description: "Check if value is not null, undefined, or empty string",
3529
+ module: "validate"
3530
+ },
3531
+ "validate/string": {
3532
+ category: "std-validate",
3533
+ minArity: 1,
3534
+ maxArity: 1,
3535
+ returnType: "boolean",
3536
+ description: "Check if value is a string",
3537
+ module: "validate"
3538
+ },
3539
+ "validate/url": {
3540
+ category: "std-validate",
3541
+ minArity: 1,
3542
+ maxArity: 1,
3543
+ returnType: "boolean",
3544
+ description: "Check if value is a valid URL format",
3545
+ module: "validate"
3546
+ },
3547
+ "validate/uuid": {
3548
+ category: "std-validate",
3549
+ minArity: 1,
3550
+ maxArity: 1,
3551
+ returnType: "boolean",
3552
+ description: "Check if value is a valid UUID",
3553
+ module: "validate"
3554
+ },
3555
+ "validate/validate": {
3556
+ category: "std-behavior",
3557
+ minArity: 1,
3558
+ maxArity: 2,
3559
+ returnType: "ValidateResult",
3560
+ description: "Validate an orbital or the composed schema using orb validate.",
3561
+ module: "behavior",
3562
+ hasSideEffects: true
3563
+ },
3564
+ "vec/add": {
3565
+ category: "std-vec",
3566
+ minArity: 2,
3567
+ maxArity: 2,
3568
+ returnType: "vector",
3569
+ description: "Componentwise vector addition a+b",
3570
+ module: "vec"
3571
+ },
3572
+ "vec/angle": {
3573
+ category: "std-vec",
3574
+ minArity: 1,
3575
+ maxArity: 2,
3576
+ returnType: "number",
3577
+ description: "Heading atan2(y,x) (1 arg) or angle between two vectors (2 args), radians",
3578
+ module: "vec"
3579
+ },
3580
+ "vec/clamp-length": {
3581
+ category: "std-vec",
3582
+ minArity: 2,
3583
+ maxArity: 2,
3584
+ returnType: "vector",
3585
+ description: "Clamp magnitude to max (preserves direction)",
3586
+ module: "vec"
3587
+ },
3588
+ "vec/cross": {
3589
+ category: "std-vec",
3590
+ minArity: 2,
3591
+ maxArity: 2,
3592
+ returnType: "vector | number",
3593
+ description: "3D cross product \u2192 vector; 2D \u2192 scalar ax\xB7by-ay\xB7bx",
3594
+ module: "vec"
3595
+ },
3596
+ "vec/distance": {
3597
+ category: "std-vec",
3598
+ minArity: 2,
3599
+ maxArity: 2,
3600
+ returnType: "number",
3601
+ description: "Euclidean distance length(sub(a,b))",
3602
+ module: "vec"
3603
+ },
3604
+ "vec/distance-sq": {
3605
+ category: "std-vec",
3606
+ minArity: 2,
3607
+ maxArity: 2,
3608
+ returnType: "number",
3609
+ description: "Squared distance length-sq(sub(a,b))",
3610
+ module: "vec"
3611
+ },
3612
+ "vec/dot": {
3613
+ category: "std-vec",
3614
+ minArity: 2,
3615
+ maxArity: 2,
3616
+ returnType: "number",
3617
+ description: "Dot product ax\xB7bx+ay\xB7by(+az\xB7bz)",
3618
+ module: "vec"
3619
+ },
3620
+ "vec/length": {
3621
+ category: "std-vec",
3622
+ minArity: 1,
3623
+ maxArity: 1,
3624
+ returnType: "number",
3625
+ description: "Vector magnitude sqrt(dot(a,a))",
3626
+ module: "vec"
3627
+ },
3628
+ "vec/length-sq": {
3629
+ category: "std-vec",
3630
+ minArity: 1,
3631
+ maxArity: 1,
3632
+ returnType: "number",
3633
+ description: "Squared magnitude dot(a,a)",
3634
+ module: "vec"
3635
+ },
3636
+ "vec/lerp": {
3637
+ category: "std-vec",
3638
+ minArity: 3,
3639
+ maxArity: 3,
3640
+ returnType: "vector",
3641
+ description: "Componentwise linear interpolation a+(b-a)*t",
3642
+ module: "vec"
3643
+ },
3644
+ "vec/normalize": {
3645
+ category: "std-vec",
3646
+ minArity: 1,
3647
+ maxArity: 1,
3648
+ returnType: "vector",
3649
+ description: "Unit vector a/len; zero-length \u2192 zero vector (same dim)",
3650
+ module: "vec"
3651
+ },
3652
+ "vec/rotate": {
3653
+ category: "std-vec",
3654
+ minArity: 2,
3655
+ maxArity: 2,
3656
+ returnType: "vector",
3657
+ description: "2D rotate by rad (z preserved): x'=x\xB7cos-y\xB7sin, y'=x\xB7sin+y\xB7cos",
3658
+ module: "vec"
3659
+ },
3660
+ "vec/scale": {
3661
+ category: "std-vec",
3662
+ minArity: 2,
3663
+ maxArity: 2,
3664
+ returnType: "vector",
3665
+ description: "Componentwise scalar multiply a*k",
3666
+ module: "vec"
3667
+ },
3668
+ "vec/sub": {
3669
+ category: "std-vec",
3670
+ minArity: 2,
3671
+ maxArity: 2,
3672
+ returnType: "vector",
3673
+ description: "Componentwise vector subtraction a-b",
3674
+ module: "vec"
3675
+ },
3676
+ when: {
3677
+ category: "control",
3678
+ minArity: 2,
3679
+ maxArity: 2,
3680
+ returnType: "void",
3681
+ description: "Conditional effect without an else branch",
3682
+ module: "core"
3683
+ },
3684
+ "workspace/archive-orbital": {
3685
+ category: "std-workspace",
3686
+ minArity: 1,
3687
+ maxArity: 1,
3688
+ returnType: "void",
3689
+ description: "Archive (remove from active set) an orbital from the workspace.",
3690
+ module: "workspace",
3691
+ hasSideEffects: true
3692
+ },
3693
+ "workspace/exists": {
3694
+ category: "std-workspace",
3695
+ minArity: 1,
3696
+ maxArity: 1,
3697
+ returnType: "boolean",
3698
+ description: "Check if a file exists in the workspace.",
3699
+ module: "workspace"
3700
+ },
3701
+ "workspace/list-orbitals": {
3702
+ category: "std-workspace",
3703
+ minArity: 0,
3704
+ maxArity: 0,
3705
+ returnType: "array",
3706
+ description: "List all orbital names in the workspace.",
3707
+ module: "workspace"
3708
+ },
3709
+ "workspace/read-file": {
3710
+ category: "std-workspace",
3711
+ minArity: 1,
3712
+ maxArity: 1,
3713
+ returnType: "string",
3714
+ description: "Read a file from the workspace.",
3715
+ module: "workspace"
3716
+ },
3717
+ "workspace/read-orbital": {
3718
+ category: "std-workspace",
3719
+ minArity: 1,
3720
+ maxArity: 1,
3721
+ returnType: "object",
3722
+ description: "Read an orbital definition from the workspace by name.",
3723
+ module: "workspace"
3724
+ },
3725
+ "workspace/read-plan": {
3726
+ category: "std-workspace",
3727
+ minArity: 0,
3728
+ maxArity: 0,
3729
+ returnType: "object",
3730
+ description: "Read the plan snapshot from the workspace.",
3731
+ module: "workspace"
3732
+ },
3733
+ "workspace/read-schema": {
3734
+ category: "std-workspace",
3735
+ minArity: 0,
3736
+ maxArity: 0,
3737
+ returnType: "object",
3738
+ description: "Read the composed schema.orb from the workspace.",
3739
+ module: "workspace"
3740
+ },
3741
+ "workspace/write-file": {
3742
+ category: "std-workspace",
3743
+ minArity: 2,
3744
+ maxArity: 2,
3745
+ returnType: "void",
3746
+ description: "Write a file to the workspace.",
3747
+ module: "workspace",
3748
+ hasSideEffects: true
3749
+ },
3750
+ "workspace/write-orbital": {
3751
+ category: "std-workspace",
3752
+ minArity: 2,
3753
+ maxArity: 2,
3754
+ returnType: "void",
3755
+ description: "Write an orbital definition to the workspace.",
3756
+ module: "workspace",
3757
+ hasSideEffects: true
3758
+ },
3759
+ "workspace/write-plan": {
3760
+ category: "std-workspace",
3761
+ minArity: 1,
3762
+ maxArity: 1,
3763
+ returnType: "void",
3764
+ description: "Write the plan snapshot to the workspace.",
3765
+ module: "workspace",
3766
+ hasSideEffects: true
3767
+ },
3768
+ "workspace/write-schema": {
3769
+ category: "std-workspace",
3770
+ minArity: 1,
3771
+ maxArity: 1,
3772
+ returnType: "void",
3773
+ description: "Write the composed schema.orb to the workspace.",
3774
+ module: "workspace",
3775
+ hasSideEffects: true
3776
+ }
3777
+ }
3778
+ };
3779
+
3780
+ // operator-arity.ts
109
3781
  var ARITY = new Map(
110
- Object.entries(canonicalOperators.operators).map(
3782
+ Object.entries(canonical_operators_default.operators).map(
111
3783
  ([name, meta]) => [
112
3784
  name,
113
3785
  { min: meta.minArity ?? 0, max: meta.maxArity === void 0 ? null : meta.maxArity }