@almadar/std 16.213.0 → 16.215.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/canonical-operators.json +300 -198
- package/dist/behaviors-embeddings.hash.json +1 -1
- package/dist/index.js +222 -215
- package/dist/knob-embeddings.hash.json +1 -1
- package/dist/modules/array.js +22 -22
- package/dist/modules/behavior.js +2 -2
- package/dist/modules/browser.js +1 -1
- package/dist/modules/contract.js +6 -6
- package/dist/modules/core.js +43 -32
- package/dist/modules/data.js +7 -7
- package/dist/modules/graph.js +14 -14
- package/dist/modules/index.js +222 -215
- package/dist/modules/integration.js +1 -1
- package/dist/modules/llm.js +2 -2
- package/dist/modules/nn.js +6 -6
- package/dist/modules/object.js +11 -11
- package/dist/modules/prob.js +4 -4
- package/dist/modules/session.js +4 -4
- package/dist/modules/str.js +1 -1
- package/dist/modules/tensor.js +29 -29
- package/dist/modules/time.js +17 -17
- package/dist/modules/trace.js +1 -1
- package/dist/modules/train.js +23 -23
- package/dist/modules/validate.js +23 -27
- package/dist/modules/workspace.js +5 -5
- package/dist/registry.js +222 -215
- package/package.json +1 -1
package/dist/registry.js
CHANGED
|
@@ -164,7 +164,7 @@ var CORE_OPERATORS = {
|
|
|
164
164
|
{ name: "a", type: ANY, description: "Left operand" },
|
|
165
165
|
{ name: "b", type: ANY, description: "Right operand" }
|
|
166
166
|
],
|
|
167
|
-
example: '["=", "
|
|
167
|
+
example: '["=", "active", "active"]'
|
|
168
168
|
},
|
|
169
169
|
"==": {
|
|
170
170
|
module: "core",
|
|
@@ -178,7 +178,7 @@ var CORE_OPERATORS = {
|
|
|
178
178
|
{ name: "a", type: ANY, description: "Left operand" },
|
|
179
179
|
{ name: "b", type: ANY, description: "Right operand" }
|
|
180
180
|
],
|
|
181
|
-
example: '["==", "
|
|
181
|
+
example: '["==", "active", "active"]'
|
|
182
182
|
},
|
|
183
183
|
"!=": {
|
|
184
184
|
module: "core",
|
|
@@ -192,7 +192,7 @@ var CORE_OPERATORS = {
|
|
|
192
192
|
{ name: "a", type: ANY, description: "Left operand" },
|
|
193
193
|
{ name: "b", type: ANY, description: "Right operand" }
|
|
194
194
|
],
|
|
195
|
-
example: '["!=",
|
|
195
|
+
example: '["!=", 1, null]'
|
|
196
196
|
},
|
|
197
197
|
"<": {
|
|
198
198
|
module: "core",
|
|
@@ -206,7 +206,7 @@ var CORE_OPERATORS = {
|
|
|
206
206
|
{ name: "a", type: NUMBER, description: "Left operand" },
|
|
207
207
|
{ name: "b", type: NUMBER, description: "Right operand" }
|
|
208
208
|
],
|
|
209
|
-
example: '["<",
|
|
209
|
+
example: '["<", 5, 10]'
|
|
210
210
|
},
|
|
211
211
|
">": {
|
|
212
212
|
module: "core",
|
|
@@ -220,7 +220,7 @@ var CORE_OPERATORS = {
|
|
|
220
220
|
{ name: "a", type: NUMBER, description: "Left operand" },
|
|
221
221
|
{ name: "b", type: NUMBER, description: "Right operand" }
|
|
222
222
|
],
|
|
223
|
-
example: '[">",
|
|
223
|
+
example: '[">", 10, 0]'
|
|
224
224
|
},
|
|
225
225
|
"<=": {
|
|
226
226
|
module: "core",
|
|
@@ -234,7 +234,7 @@ var CORE_OPERATORS = {
|
|
|
234
234
|
{ name: "a", type: NUMBER, description: "Left operand" },
|
|
235
235
|
{ name: "b", type: NUMBER, description: "Right operand" }
|
|
236
236
|
],
|
|
237
|
-
example: '["<=",
|
|
237
|
+
example: '["<=", 100, 100]'
|
|
238
238
|
},
|
|
239
239
|
">=": {
|
|
240
240
|
module: "core",
|
|
@@ -248,7 +248,7 @@ var CORE_OPERATORS = {
|
|
|
248
248
|
{ name: "a", type: NUMBER, description: "Left operand" },
|
|
249
249
|
{ name: "b", type: NUMBER, description: "Right operand" }
|
|
250
250
|
],
|
|
251
|
-
example: '[">=",
|
|
251
|
+
example: '[">=", 18, 18]'
|
|
252
252
|
},
|
|
253
253
|
// --- logic ------------------------------------------------------------------
|
|
254
254
|
and: {
|
|
@@ -261,7 +261,7 @@ var CORE_OPERATORS = {
|
|
|
261
261
|
returnType: "boolean",
|
|
262
262
|
returnSemantics: "last-truthy-of-args",
|
|
263
263
|
params: [{ name: "...conds", type: BOOLEAN, description: "Boolean expressions to AND" }],
|
|
264
|
-
example: '["and", ["=", "
|
|
264
|
+
example: '["and", ["=", "active", "active"], [">", 5, 0]]'
|
|
265
265
|
},
|
|
266
266
|
or: {
|
|
267
267
|
module: "core",
|
|
@@ -273,7 +273,7 @@ var CORE_OPERATORS = {
|
|
|
273
273
|
returnType: "boolean",
|
|
274
274
|
returnSemantics: "first-truthy-of-args",
|
|
275
275
|
params: [{ name: "...conds", type: BOOLEAN, description: "Boolean expressions to OR" }],
|
|
276
|
-
example: '["or", ["=", "
|
|
276
|
+
example: '["or", ["=", "admin", "user"], ["=", "admin", "owner"]]'
|
|
277
277
|
},
|
|
278
278
|
not: {
|
|
279
279
|
module: "core",
|
|
@@ -284,7 +284,7 @@ var CORE_OPERATORS = {
|
|
|
284
284
|
hasSideEffects: false,
|
|
285
285
|
returnType: "boolean",
|
|
286
286
|
params: [{ name: "cond", type: BOOLEAN, description: "Boolean to negate" }],
|
|
287
|
-
example: '["not",
|
|
287
|
+
example: '["not", false]'
|
|
288
288
|
},
|
|
289
289
|
if: {
|
|
290
290
|
module: "core",
|
|
@@ -300,7 +300,7 @@ var CORE_OPERATORS = {
|
|
|
300
300
|
{ name: "then", type: ANY, description: "Value or effect if true" },
|
|
301
301
|
{ name: "else", type: ANY, description: "Value or effect if false" }
|
|
302
302
|
],
|
|
303
|
-
example: '["if", [">",
|
|
303
|
+
example: '["if", [">", 5, 0], "alive", "dead"]'
|
|
304
304
|
},
|
|
305
305
|
// --- control ----------------------------------------------------------------
|
|
306
306
|
let: {
|
|
@@ -408,7 +408,7 @@ var CORE_OPERATORS = {
|
|
|
408
408
|
{ name: "event", type: EVENT_KEY, description: "Event key" },
|
|
409
409
|
{ name: "payload", type: ENTITY_REF, description: "Optional payload", optional: true }
|
|
410
410
|
],
|
|
411
|
-
example: '["emit", "PLAYER_DIED", { "playerId": "
|
|
411
|
+
example: '["emit", "PLAYER_DIED", { "playerId": "p1" }]',
|
|
412
412
|
effect: {
|
|
413
413
|
kind: "emit",
|
|
414
414
|
produces: {
|
|
@@ -443,7 +443,7 @@ var CORE_OPERATORS = {
|
|
|
443
443
|
optional: true
|
|
444
444
|
}
|
|
445
445
|
],
|
|
446
|
-
example: '["persist", "create", "Task", { "title": "
|
|
446
|
+
example: '["persist", "create", "Task", { "title": "Buy milk" }, { "emit": { "success": "TASK_CREATED" } }]',
|
|
447
447
|
effect: {
|
|
448
448
|
kind: "persist",
|
|
449
449
|
// Action-discriminated union. The compiler narrows at the call site
|
|
@@ -497,7 +497,7 @@ var CORE_OPERATORS = {
|
|
|
497
497
|
optional: true
|
|
498
498
|
}
|
|
499
499
|
],
|
|
500
|
-
example: '["navigate", "/tasks/:id", { "id": "
|
|
500
|
+
example: '["navigate", "/tasks/:id", { "id": "t1" }]',
|
|
501
501
|
effect: { kind: "navigate" }
|
|
502
502
|
},
|
|
503
503
|
"navigate-back": {
|
|
@@ -554,7 +554,7 @@ var CORE_OPERATORS = {
|
|
|
554
554
|
optional: true
|
|
555
555
|
}
|
|
556
556
|
],
|
|
557
|
-
example: '["spawn", "Bullet", { "x":
|
|
557
|
+
example: '["spawn", "Bullet", { "x": 10, "y": 20 }]',
|
|
558
558
|
effect: { kind: "spawn" }
|
|
559
559
|
},
|
|
560
560
|
despawn: {
|
|
@@ -599,18 +599,22 @@ var CORE_OPERATORS = {
|
|
|
599
599
|
optional: true
|
|
600
600
|
}
|
|
601
601
|
],
|
|
602
|
-
example: '["fetch", "Task", { "id": "
|
|
602
|
+
example: '["fetch", "Task", { "id": "t1", "emit": { "success": "TASK_LOADED" } }]',
|
|
603
603
|
effect: {
|
|
604
604
|
kind: "fetch",
|
|
605
|
-
// Call-site-discriminated union: options.id present -> single entity;
|
|
606
|
-
// otherwise -> array of entity. The compiler narrows at the call site
|
|
607
|
-
// when checking emit.success against the declared event payload.
|
|
608
605
|
produces: {
|
|
609
|
-
kind: "
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
606
|
+
kind: "object",
|
|
607
|
+
fields: {
|
|
608
|
+
data: {
|
|
609
|
+
kind: "union",
|
|
610
|
+
of: [
|
|
611
|
+
{ kind: "entity" },
|
|
612
|
+
{ kind: "array", of: { kind: "entity" } }
|
|
613
|
+
]
|
|
614
|
+
},
|
|
615
|
+
totalCount: "number"
|
|
616
|
+
},
|
|
617
|
+
open: false
|
|
614
618
|
}
|
|
615
619
|
}
|
|
616
620
|
},
|
|
@@ -662,7 +666,7 @@ var CORE_OPERATORS = {
|
|
|
662
666
|
optional: true
|
|
663
667
|
}
|
|
664
668
|
],
|
|
665
|
-
example: '["send-server", "CHAT_MESSAGE", { "text": "
|
|
669
|
+
example: '["send-server", "CHAT_MESSAGE", { "text": "hello" }]',
|
|
666
670
|
effect: { kind: "send-server" }
|
|
667
671
|
},
|
|
668
672
|
ref: {
|
|
@@ -694,14 +698,21 @@ var CORE_OPERATORS = {
|
|
|
694
698
|
example: '["ref", "Task"]',
|
|
695
699
|
effect: {
|
|
696
700
|
kind: "ref",
|
|
697
|
-
// Same
|
|
701
|
+
// Same wrapper fetch emits. Kept for the V2 transition period;
|
|
698
702
|
// scheduled for deprecation in a later phase (see Almadar_Entity_V2_Plan.md).
|
|
699
703
|
produces: {
|
|
700
|
-
kind: "
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
704
|
+
kind: "object",
|
|
705
|
+
fields: {
|
|
706
|
+
data: {
|
|
707
|
+
kind: "union",
|
|
708
|
+
of: [
|
|
709
|
+
{ kind: "entity" },
|
|
710
|
+
{ kind: "array", of: { kind: "entity" } }
|
|
711
|
+
]
|
|
712
|
+
},
|
|
713
|
+
totalCount: "number"
|
|
714
|
+
},
|
|
715
|
+
open: false
|
|
705
716
|
}
|
|
706
717
|
}
|
|
707
718
|
},
|
|
@@ -729,7 +740,7 @@ var CORE_OPERATORS = {
|
|
|
729
740
|
optional: true
|
|
730
741
|
}
|
|
731
742
|
],
|
|
732
|
-
example: '["call-service", "llm", "generate", { "userPrompt": "
|
|
743
|
+
example: '["call-service", "llm", "generate", { "userPrompt": "Hello" }, { "emit": { "success": "LlmCompleted", "failure": "LlmFailed" } }]',
|
|
733
744
|
effect: {
|
|
734
745
|
kind: "call-service",
|
|
735
746
|
// TODO(entity-v2): narrow to the declared service return type once
|
|
@@ -1148,7 +1159,7 @@ var STR_OPERATORS = {
|
|
|
1148
1159
|
hasSideEffects: false,
|
|
1149
1160
|
returnType: "string",
|
|
1150
1161
|
params: [{ name: "strings", type: "string", description: "Strings to concatenate" }],
|
|
1151
|
-
example: '["str/concat", "/users/", "
|
|
1162
|
+
example: '["str/concat", "/users/", "123"] // => "/users/123"'
|
|
1152
1163
|
},
|
|
1153
1164
|
"str/upper": {
|
|
1154
1165
|
module: "str",
|
|
@@ -1663,7 +1674,7 @@ var ARRAY_OPERATORS = {
|
|
|
1663
1674
|
{ name: "key", type: "string", description: "Field to sort by (for objects)", optional: true },
|
|
1664
1675
|
{ name: "dir", type: "string", description: '"asc" or "desc"', optional: true, defaultValue: "asc" }
|
|
1665
1676
|
],
|
|
1666
|
-
example: '["array/sort", "
|
|
1677
|
+
example: '["array/sort", [{"price": 3}, {"price": 9}, {"price": 5}], "price", "desc"]'
|
|
1667
1678
|
},
|
|
1668
1679
|
"array/shuffle": {
|
|
1669
1680
|
module: "array",
|
|
@@ -1755,7 +1766,7 @@ var ARRAY_OPERATORS = {
|
|
|
1755
1766
|
{ name: "arr", type: "array", description: "The array" },
|
|
1756
1767
|
{ name: "pred", type: "lambda", description: "Predicate function" }
|
|
1757
1768
|
],
|
|
1758
|
-
example: '["array/find", "
|
|
1769
|
+
example: '["array/find", [{"status": "active"}, {"status": "archived"}], ["fn", "x", ["=", "@x.status", "active"]]]'
|
|
1759
1770
|
},
|
|
1760
1771
|
"array/findIndex": {
|
|
1761
1772
|
module: "array",
|
|
@@ -1771,7 +1782,7 @@ var ARRAY_OPERATORS = {
|
|
|
1771
1782
|
{ name: "arr", type: "array", description: "The array" },
|
|
1772
1783
|
{ name: "pred", type: "lambda", description: "Predicate function" }
|
|
1773
1784
|
],
|
|
1774
|
-
example: '["array/findIndex", "
|
|
1785
|
+
example: '["array/findIndex", [{"status": "active"}, {"status": "archived"}], ["fn", "x", ["=", "@x.status", "active"]]]'
|
|
1775
1786
|
},
|
|
1776
1787
|
"array/filter": {
|
|
1777
1788
|
module: "array",
|
|
@@ -1788,7 +1799,7 @@ var ARRAY_OPERATORS = {
|
|
|
1788
1799
|
{ name: "arr", type: "array", description: "The array" },
|
|
1789
1800
|
{ name: "pred", type: "lambda", description: "Predicate function" }
|
|
1790
1801
|
],
|
|
1791
|
-
example: '["array/filter", "
|
|
1802
|
+
example: '["array/filter", [{"price": 50}, {"price": 150}], ["fn", "x", [">", "@x.price", 100]]]'
|
|
1792
1803
|
},
|
|
1793
1804
|
"array/reject": {
|
|
1794
1805
|
module: "array",
|
|
@@ -1805,7 +1816,7 @@ var ARRAY_OPERATORS = {
|
|
|
1805
1816
|
{ name: "arr", type: "array", description: "The array" },
|
|
1806
1817
|
{ name: "pred", type: "lambda", description: "Predicate function" }
|
|
1807
1818
|
],
|
|
1808
|
-
example: '["array/reject", "
|
|
1819
|
+
example: '["array/reject", [{"status": "active"}, {"status": "deleted"}], ["fn", "x", ["=", "@x.status", "deleted"]]]'
|
|
1809
1820
|
},
|
|
1810
1821
|
"array/map": {
|
|
1811
1822
|
module: "array",
|
|
@@ -1822,7 +1833,7 @@ var ARRAY_OPERATORS = {
|
|
|
1822
1833
|
{ name: "arr", type: "array", description: "The array" },
|
|
1823
1834
|
{ name: "fn", type: "lambda", description: "Transform function" }
|
|
1824
1835
|
],
|
|
1825
|
-
example: '["array/map", "
|
|
1836
|
+
example: '["array/map", [{"price": 100}, {"price": 200}], ["fn", "x", ["*", "@x.price", 1.1]]]'
|
|
1826
1837
|
},
|
|
1827
1838
|
"array/reduce": {
|
|
1828
1839
|
module: "array",
|
|
@@ -1840,7 +1851,7 @@ var ARRAY_OPERATORS = {
|
|
|
1840
1851
|
{ name: "init", type: "any", description: "Initial accumulator value" },
|
|
1841
1852
|
{ name: "fn", type: "lambda", description: "Reducer function (acc, item) => newAcc" }
|
|
1842
1853
|
],
|
|
1843
|
-
example: '["array/reduce", "
|
|
1854
|
+
example: '["array/reduce", [{"price": 10}, {"price": 25}], 0, ["fn", ["acc", "x"], ["+", "@acc", "@x.price"]]]'
|
|
1844
1855
|
},
|
|
1845
1856
|
"array/every": {
|
|
1846
1857
|
module: "array",
|
|
@@ -1856,7 +1867,7 @@ var ARRAY_OPERATORS = {
|
|
|
1856
1867
|
{ name: "arr", type: "array", description: "The array" },
|
|
1857
1868
|
{ name: "pred", type: "lambda", description: "Predicate function" }
|
|
1858
1869
|
],
|
|
1859
|
-
example: '["array/every", "
|
|
1870
|
+
example: '["array/every", [{"price": 5}, {"price": 10}], ["fn", "x", [">", "@x.price", 0]]]'
|
|
1860
1871
|
},
|
|
1861
1872
|
"array/some": {
|
|
1862
1873
|
module: "array",
|
|
@@ -1872,7 +1883,7 @@ var ARRAY_OPERATORS = {
|
|
|
1872
1883
|
{ name: "arr", type: "array", description: "The array" },
|
|
1873
1884
|
{ name: "pred", type: "lambda", description: "Predicate function" }
|
|
1874
1885
|
],
|
|
1875
|
-
example: '["array/some", "
|
|
1886
|
+
example: '["array/some", [{"status": "archived"}, {"status": "active"}], ["fn", "x", ["=", "@x.status", "active"]]]'
|
|
1876
1887
|
},
|
|
1877
1888
|
"array/count": {
|
|
1878
1889
|
module: "array",
|
|
@@ -1888,7 +1899,7 @@ var ARRAY_OPERATORS = {
|
|
|
1888
1899
|
{ name: "arr", type: "array", description: "The array" },
|
|
1889
1900
|
{ name: "pred", type: "lambda", description: "Predicate function", optional: true }
|
|
1890
1901
|
],
|
|
1891
|
-
example: '["array/count", "
|
|
1902
|
+
example: '["array/count", [{"status": "done"}, {"status": "todo"}], ["fn", "t", ["=", "@t.status", "done"]]]'
|
|
1892
1903
|
},
|
|
1893
1904
|
"array/sum": {
|
|
1894
1905
|
module: "array",
|
|
@@ -1902,7 +1913,7 @@ var ARRAY_OPERATORS = {
|
|
|
1902
1913
|
{ name: "arr", type: "array", description: "The array" },
|
|
1903
1914
|
{ name: "key", type: "string", description: "Field to sum", optional: true }
|
|
1904
1915
|
],
|
|
1905
|
-
example: '["array/sum", "
|
|
1916
|
+
example: '["array/sum", [{"price": 10}, {"price": 25}], "price"]'
|
|
1906
1917
|
},
|
|
1907
1918
|
"array/avg": {
|
|
1908
1919
|
module: "array",
|
|
@@ -1916,7 +1927,7 @@ var ARRAY_OPERATORS = {
|
|
|
1916
1927
|
{ name: "arr", type: "array", description: "The array" },
|
|
1917
1928
|
{ name: "key", type: "string", description: "Field to average", optional: true }
|
|
1918
1929
|
],
|
|
1919
|
-
example: '["array/avg", "
|
|
1930
|
+
example: '["array/avg", [{"score": 80}, {"score": 90}], "score"]'
|
|
1920
1931
|
},
|
|
1921
1932
|
"array/min": {
|
|
1922
1933
|
module: "array",
|
|
@@ -1930,7 +1941,7 @@ var ARRAY_OPERATORS = {
|
|
|
1930
1941
|
{ name: "arr", type: "array", description: "The array" },
|
|
1931
1942
|
{ name: "key", type: "string", description: "Field to compare", optional: true }
|
|
1932
1943
|
],
|
|
1933
|
-
example: '["array/min", "
|
|
1944
|
+
example: '["array/min", [{"price": 3}, {"price": 9}], "price"]'
|
|
1934
1945
|
},
|
|
1935
1946
|
"array/max": {
|
|
1936
1947
|
module: "array",
|
|
@@ -1944,7 +1955,7 @@ var ARRAY_OPERATORS = {
|
|
|
1944
1955
|
{ name: "arr", type: "array", description: "The array" },
|
|
1945
1956
|
{ name: "key", type: "string", description: "Field to compare", optional: true }
|
|
1946
1957
|
],
|
|
1947
|
-
example: '["array/max", "
|
|
1958
|
+
example: '["array/max", [{"price": 3}, {"price": 9}], "price"]'
|
|
1948
1959
|
},
|
|
1949
1960
|
"array/groupBy": {
|
|
1950
1961
|
module: "array",
|
|
@@ -1958,7 +1969,7 @@ var ARRAY_OPERATORS = {
|
|
|
1958
1969
|
{ name: "arr", type: "array", description: "The array" },
|
|
1959
1970
|
{ name: "key", type: "string", description: "Field to group by" }
|
|
1960
1971
|
],
|
|
1961
|
-
example: '["array/groupBy", "
|
|
1972
|
+
example: '["array/groupBy", [{"status": "new"}, {"status": "done"}], "status"]'
|
|
1962
1973
|
},
|
|
1963
1974
|
"array/partition": {
|
|
1964
1975
|
module: "array",
|
|
@@ -1974,7 +1985,7 @@ var ARRAY_OPERATORS = {
|
|
|
1974
1985
|
{ name: "arr", type: "array", description: "The array" },
|
|
1975
1986
|
{ name: "pred", type: "lambda", description: "Predicate function" }
|
|
1976
1987
|
],
|
|
1977
|
-
example: '["array/partition", "
|
|
1988
|
+
example: '["array/partition", [{"price": 30}, {"price": 80}], ["fn", "x", [">", "@x.price", 50]]]'
|
|
1978
1989
|
},
|
|
1979
1990
|
"array/take": {
|
|
1980
1991
|
module: "array",
|
|
@@ -1988,7 +1999,7 @@ var ARRAY_OPERATORS = {
|
|
|
1988
1999
|
{ name: "arr", type: "array", description: "The array" },
|
|
1989
2000
|
{ name: "n", type: "number", description: "Number of elements" }
|
|
1990
2001
|
],
|
|
1991
|
-
example: '["array/take",
|
|
2002
|
+
example: '["array/take", [1, 2, 3, 4, 5, 6, 7], 5]'
|
|
1992
2003
|
},
|
|
1993
2004
|
"array/drop": {
|
|
1994
2005
|
module: "array",
|
|
@@ -2002,7 +2013,7 @@ var ARRAY_OPERATORS = {
|
|
|
2002
2013
|
{ name: "arr", type: "array", description: "The array" },
|
|
2003
2014
|
{ name: "n", type: "number", description: "Number of elements to skip" }
|
|
2004
2015
|
],
|
|
2005
|
-
example: '["array/drop",
|
|
2016
|
+
example: '["array/drop", [1, 2, 3, 4, 5, 6, 7], 5]'
|
|
2006
2017
|
},
|
|
2007
2018
|
"array/takeLast": {
|
|
2008
2019
|
module: "array",
|
|
@@ -2016,7 +2027,7 @@ var ARRAY_OPERATORS = {
|
|
|
2016
2027
|
{ name: "arr", type: "array", description: "The array" },
|
|
2017
2028
|
{ name: "n", type: "number", description: "Number of elements" }
|
|
2018
2029
|
],
|
|
2019
|
-
example: '["array/takeLast",
|
|
2030
|
+
example: '["array/takeLast", [1, 2, 3, 4, 5], 3]'
|
|
2020
2031
|
},
|
|
2021
2032
|
"array/dropLast": {
|
|
2022
2033
|
module: "array",
|
|
@@ -2030,7 +2041,7 @@ var ARRAY_OPERATORS = {
|
|
|
2030
2041
|
{ name: "arr", type: "array", description: "The array" },
|
|
2031
2042
|
{ name: "n", type: "number", description: "Number of elements to skip" }
|
|
2032
2043
|
],
|
|
2033
|
-
example: '["array/dropLast",
|
|
2044
|
+
example: '["array/dropLast", [1, 2, 3, 4, 5], 2]'
|
|
2034
2045
|
},
|
|
2035
2046
|
"array/cosine": {
|
|
2036
2047
|
module: "array",
|
|
@@ -2044,7 +2055,7 @@ var ARRAY_OPERATORS = {
|
|
|
2044
2055
|
{ name: "a", type: { kind: "array", of: "number" }, description: "First vector" },
|
|
2045
2056
|
{ name: "b", type: { kind: "array", of: "number" }, description: "Second vector" }
|
|
2046
2057
|
],
|
|
2047
|
-
example: '["array/cosine",
|
|
2058
|
+
example: '["array/cosine", [1, 0], [0, 1]]'
|
|
2048
2059
|
},
|
|
2049
2060
|
"array/nearest": {
|
|
2050
2061
|
module: "array",
|
|
@@ -2058,7 +2069,7 @@ var ARRAY_OPERATORS = {
|
|
|
2058
2069
|
{ name: "query", type: { kind: "array", of: "number" }, description: "Query vector" },
|
|
2059
2070
|
{ name: "candidates", type: { kind: "array", of: { kind: "array", of: "number" } }, description: "Candidate vectors to search" }
|
|
2060
2071
|
],
|
|
2061
|
-
example: '["array/nearest",
|
|
2072
|
+
example: '["array/nearest", [1, 0], [[1, 0], [0, 1]]]'
|
|
2062
2073
|
}
|
|
2063
2074
|
};
|
|
2064
2075
|
|
|
@@ -2122,7 +2133,7 @@ var OBJECT_OPERATORS = {
|
|
|
2122
2133
|
{ name: "path", type: "string", description: 'Dot-separated path (e.g., "user.name")' },
|
|
2123
2134
|
{ name: "default", type: "any", description: "Default if path not found", optional: true }
|
|
2124
2135
|
],
|
|
2125
|
-
example: '["object/get", "
|
|
2136
|
+
example: '["object/get", {"profile": {"name": "Ann"}}, "profile.name", "Anonymous"]'
|
|
2126
2137
|
},
|
|
2127
2138
|
"object/set": {
|
|
2128
2139
|
module: "object",
|
|
@@ -2137,7 +2148,7 @@ var OBJECT_OPERATORS = {
|
|
|
2137
2148
|
{ name: "path", type: "string", description: "Dot-separated path" },
|
|
2138
2149
|
{ name: "value", type: "any", description: "Value to set" }
|
|
2139
2150
|
],
|
|
2140
|
-
example: '["object/set", "
|
|
2151
|
+
example: '["object/set", {"profile": {"name": "Ann"}}, "profile.name", "John"]'
|
|
2141
2152
|
},
|
|
2142
2153
|
"object/has": {
|
|
2143
2154
|
module: "object",
|
|
@@ -2151,7 +2162,7 @@ var OBJECT_OPERATORS = {
|
|
|
2151
2162
|
{ name: "obj", type: "object", description: "The object" },
|
|
2152
2163
|
{ name: "path", type: "string", description: "Dot-separated path" }
|
|
2153
2164
|
],
|
|
2154
|
-
example: '["object/has", "
|
|
2165
|
+
example: '["object/has", {"profile": {"name": "Ann"}}, "profile.name"]'
|
|
2155
2166
|
},
|
|
2156
2167
|
"object/merge": {
|
|
2157
2168
|
module: "object",
|
|
@@ -2188,7 +2199,7 @@ var OBJECT_OPERATORS = {
|
|
|
2188
2199
|
{ name: "obj", type: "object", description: "The object" },
|
|
2189
2200
|
{ name: "keys", type: "array", description: "Keys to keep" }
|
|
2190
2201
|
],
|
|
2191
|
-
example: '["object/pick", "@
|
|
2202
|
+
example: '["object/pick", {"name": "Ann", "email": "ann@example.com", "age": 30}, ["name", "email"]]'
|
|
2192
2203
|
},
|
|
2193
2204
|
"object/omit": {
|
|
2194
2205
|
module: "object",
|
|
@@ -2202,7 +2213,7 @@ var OBJECT_OPERATORS = {
|
|
|
2202
2213
|
{ name: "obj", type: "object", description: "The object" },
|
|
2203
2214
|
{ name: "keys", type: "array", description: "Keys to exclude" }
|
|
2204
2215
|
],
|
|
2205
|
-
example: '["object/omit", "
|
|
2216
|
+
example: '["object/omit", {"name": "Ann", "password": "x"}, ["password"]]'
|
|
2206
2217
|
},
|
|
2207
2218
|
"object/mapValues": {
|
|
2208
2219
|
module: "object",
|
|
@@ -2218,7 +2229,7 @@ var OBJECT_OPERATORS = {
|
|
|
2218
2229
|
{ name: "obj", type: "object", description: "The object" },
|
|
2219
2230
|
{ name: "fn", type: "lambda", description: "Transform function" }
|
|
2220
2231
|
],
|
|
2221
|
-
example: '["object/mapValues", "
|
|
2232
|
+
example: '["object/mapValues", {"a": 0.5, "b": 0.25}, ["fn", "v", ["*", "@v", 100]]]'
|
|
2222
2233
|
},
|
|
2223
2234
|
"object/mapKeys": {
|
|
2224
2235
|
module: "object",
|
|
@@ -2234,7 +2245,7 @@ var OBJECT_OPERATORS = {
|
|
|
2234
2245
|
{ name: "obj", type: "object", description: "The object" },
|
|
2235
2246
|
{ name: "fn", type: "lambda", description: "Transform function" }
|
|
2236
2247
|
],
|
|
2237
|
-
example: '["object/mapKeys", "
|
|
2248
|
+
example: '["object/mapKeys", {"a": 1, "b": 2}, ["fn", "k", ["str/upper", "@k"]]]'
|
|
2238
2249
|
},
|
|
2239
2250
|
"object/filter": {
|
|
2240
2251
|
module: "object",
|
|
@@ -2250,7 +2261,7 @@ var OBJECT_OPERATORS = {
|
|
|
2250
2261
|
{ name: "obj", type: "object", description: "The object" },
|
|
2251
2262
|
{ name: "pred", type: "lambda", description: "Predicate (key, value) => boolean" }
|
|
2252
2263
|
],
|
|
2253
|
-
example: '["object/filter", "
|
|
2264
|
+
example: '["object/filter", {"a": 1, "b": null}, ["fn", ["k", "v"], ["!=", "@v", null]]]'
|
|
2254
2265
|
},
|
|
2255
2266
|
"object/equals": {
|
|
2256
2267
|
module: "object",
|
|
@@ -2275,7 +2286,7 @@ var OBJECT_OPERATORS = {
|
|
|
2275
2286
|
hasSideEffects: false,
|
|
2276
2287
|
returnType: "any",
|
|
2277
2288
|
params: [{ name: "obj", type: "object", description: "The object" }],
|
|
2278
|
-
example: '["object/clone", "
|
|
2289
|
+
example: '["object/clone", {"a": 1, "b": 2}]'
|
|
2279
2290
|
},
|
|
2280
2291
|
"object/deepClone": {
|
|
2281
2292
|
module: "object",
|
|
@@ -2286,7 +2297,7 @@ var OBJECT_OPERATORS = {
|
|
|
2286
2297
|
hasSideEffects: false,
|
|
2287
2298
|
returnType: "any",
|
|
2288
2299
|
params: [{ name: "obj", type: "object", description: "The object" }],
|
|
2289
|
-
example: '["object/deepClone", "
|
|
2300
|
+
example: '["object/deepClone", {"a": {"b": 2}}]'
|
|
2290
2301
|
},
|
|
2291
2302
|
"path": {
|
|
2292
2303
|
module: "object",
|
|
@@ -2300,7 +2311,7 @@ var OBJECT_OPERATORS = {
|
|
|
2300
2311
|
params: [
|
|
2301
2312
|
{ name: "...segments", type: "string[]", description: "Path segments to join with dots" }
|
|
2302
2313
|
],
|
|
2303
|
-
example: '["path", "formValues", "
|
|
2314
|
+
example: '["path", "formValues", "customerName"] // => "formValues.customerName"'
|
|
2304
2315
|
}
|
|
2305
2316
|
};
|
|
2306
2317
|
|
|
@@ -2354,7 +2365,7 @@ var TIME_OPERATORS = {
|
|
|
2354
2365
|
{ name: "date", type: "number", description: "Timestamp" },
|
|
2355
2366
|
{ name: "format", type: "string", description: "Format pattern" }
|
|
2356
2367
|
],
|
|
2357
|
-
example: '["time/format",
|
|
2368
|
+
example: '["time/format", 1700000000000, "MMM DD, YYYY"]'
|
|
2358
2369
|
},
|
|
2359
2370
|
"time/year": {
|
|
2360
2371
|
module: "time",
|
|
@@ -2365,7 +2376,7 @@ var TIME_OPERATORS = {
|
|
|
2365
2376
|
hasSideEffects: false,
|
|
2366
2377
|
returnType: "number",
|
|
2367
2378
|
params: [{ name: "date", type: "number", description: "Timestamp" }],
|
|
2368
|
-
example: '["time/year",
|
|
2379
|
+
example: '["time/year", 1700000000000] // => 2023'
|
|
2369
2380
|
},
|
|
2370
2381
|
"time/month": {
|
|
2371
2382
|
module: "time",
|
|
@@ -2376,7 +2387,7 @@ var TIME_OPERATORS = {
|
|
|
2376
2387
|
hasSideEffects: false,
|
|
2377
2388
|
returnType: "number",
|
|
2378
2389
|
params: [{ name: "date", type: "number", description: "Timestamp" }],
|
|
2379
|
-
example: '["time/month",
|
|
2390
|
+
example: '["time/month", 1700000000000] // => 11'
|
|
2380
2391
|
},
|
|
2381
2392
|
"time/day": {
|
|
2382
2393
|
module: "time",
|
|
@@ -2387,7 +2398,7 @@ var TIME_OPERATORS = {
|
|
|
2387
2398
|
hasSideEffects: false,
|
|
2388
2399
|
returnType: "number",
|
|
2389
2400
|
params: [{ name: "date", type: "number", description: "Timestamp" }],
|
|
2390
|
-
example: '["time/day",
|
|
2401
|
+
example: '["time/day", 1700000000000] // => 14'
|
|
2391
2402
|
},
|
|
2392
2403
|
"time/weekday": {
|
|
2393
2404
|
module: "time",
|
|
@@ -2398,7 +2409,7 @@ var TIME_OPERATORS = {
|
|
|
2398
2409
|
hasSideEffects: false,
|
|
2399
2410
|
returnType: "number",
|
|
2400
2411
|
params: [{ name: "date", type: "number", description: "Timestamp" }],
|
|
2401
|
-
example: '["time/weekday",
|
|
2412
|
+
example: '["time/weekday", 1700000000000] // => 2 (Tuesday)'
|
|
2402
2413
|
},
|
|
2403
2414
|
"time/hour": {
|
|
2404
2415
|
module: "time",
|
|
@@ -2409,7 +2420,7 @@ var TIME_OPERATORS = {
|
|
|
2409
2420
|
hasSideEffects: false,
|
|
2410
2421
|
returnType: "number",
|
|
2411
2422
|
params: [{ name: "date", type: "number", description: "Timestamp" }],
|
|
2412
|
-
example: '["time/hour",
|
|
2423
|
+
example: '["time/hour", 1700000000000]'
|
|
2413
2424
|
},
|
|
2414
2425
|
"time/minute": {
|
|
2415
2426
|
module: "time",
|
|
@@ -2420,7 +2431,7 @@ var TIME_OPERATORS = {
|
|
|
2420
2431
|
hasSideEffects: false,
|
|
2421
2432
|
returnType: "number",
|
|
2422
2433
|
params: [{ name: "date", type: "number", description: "Timestamp" }],
|
|
2423
|
-
example: '["time/minute",
|
|
2434
|
+
example: '["time/minute", 1700000000000]'
|
|
2424
2435
|
},
|
|
2425
2436
|
"time/second": {
|
|
2426
2437
|
module: "time",
|
|
@@ -2431,7 +2442,7 @@ var TIME_OPERATORS = {
|
|
|
2431
2442
|
hasSideEffects: false,
|
|
2432
2443
|
returnType: "number",
|
|
2433
2444
|
params: [{ name: "date", type: "number", description: "Timestamp" }],
|
|
2434
|
-
example: '["time/second",
|
|
2445
|
+
example: '["time/second", 1700000000000]'
|
|
2435
2446
|
},
|
|
2436
2447
|
"time/add": {
|
|
2437
2448
|
module: "time",
|
|
@@ -2476,7 +2487,7 @@ var TIME_OPERATORS = {
|
|
|
2476
2487
|
{ name: "b", type: "number", description: "Second timestamp" },
|
|
2477
2488
|
{ name: "unit", type: "string", description: "Result unit", optional: true, defaultValue: "ms" }
|
|
2478
2489
|
],
|
|
2479
|
-
example: '["time/diff",
|
|
2490
|
+
example: '["time/diff", 1700000000000, ["time/now"], "year"]'
|
|
2480
2491
|
},
|
|
2481
2492
|
"time/startOf": {
|
|
2482
2493
|
module: "time",
|
|
@@ -2518,7 +2529,7 @@ var TIME_OPERATORS = {
|
|
|
2518
2529
|
{ name: "a", type: "number", description: "First timestamp" },
|
|
2519
2530
|
{ name: "b", type: "number", description: "Second timestamp" }
|
|
2520
2531
|
],
|
|
2521
|
-
example: '["time/isBefore",
|
|
2532
|
+
example: '["time/isBefore", 1700000000000, 1700086400000]'
|
|
2522
2533
|
},
|
|
2523
2534
|
"time/isAfter": {
|
|
2524
2535
|
module: "time",
|
|
@@ -2532,7 +2543,7 @@ var TIME_OPERATORS = {
|
|
|
2532
2543
|
{ name: "a", type: "number", description: "First timestamp" },
|
|
2533
2544
|
{ name: "b", type: "number", description: "Second timestamp" }
|
|
2534
2545
|
],
|
|
2535
|
-
example: '["time/isAfter", ["time/now"],
|
|
2546
|
+
example: '["time/isAfter", ["time/now"], 1700000000000]'
|
|
2536
2547
|
},
|
|
2537
2548
|
"time/isBetween": {
|
|
2538
2549
|
module: "time",
|
|
@@ -2547,7 +2558,7 @@ var TIME_OPERATORS = {
|
|
|
2547
2558
|
{ name: "start", type: "number", description: "Range start" },
|
|
2548
2559
|
{ name: "end", type: "number", description: "Range end" }
|
|
2549
2560
|
],
|
|
2550
|
-
example: '["time/isBetween", ["time/now"],
|
|
2561
|
+
example: '["time/isBetween", ["time/now"], 1700000000000, 2000000000000]'
|
|
2551
2562
|
},
|
|
2552
2563
|
"time/isSame": {
|
|
2553
2564
|
module: "time",
|
|
@@ -2562,7 +2573,7 @@ var TIME_OPERATORS = {
|
|
|
2562
2573
|
{ name: "b", type: "number", description: "Second timestamp" },
|
|
2563
2574
|
{ name: "unit", type: "string", description: "Comparison unit", optional: true }
|
|
2564
2575
|
],
|
|
2565
|
-
example: '["time/isSame",
|
|
2576
|
+
example: '["time/isSame", 1700000000000, 1700001000000, "day"]'
|
|
2566
2577
|
},
|
|
2567
2578
|
"time/isPast": {
|
|
2568
2579
|
module: "time",
|
|
@@ -2573,7 +2584,7 @@ var TIME_OPERATORS = {
|
|
|
2573
2584
|
hasSideEffects: false,
|
|
2574
2585
|
returnType: "boolean",
|
|
2575
2586
|
params: [{ name: "date", type: "number", description: "Timestamp" }],
|
|
2576
|
-
example: '["time/isPast",
|
|
2587
|
+
example: '["time/isPast", 1700000000000]'
|
|
2577
2588
|
},
|
|
2578
2589
|
"time/isFuture": {
|
|
2579
2590
|
module: "time",
|
|
@@ -2584,7 +2595,7 @@ var TIME_OPERATORS = {
|
|
|
2584
2595
|
hasSideEffects: false,
|
|
2585
2596
|
returnType: "boolean",
|
|
2586
2597
|
params: [{ name: "date", type: "number", description: "Timestamp" }],
|
|
2587
|
-
example: '["time/isFuture",
|
|
2598
|
+
example: '["time/isFuture", 2000000000000]'
|
|
2588
2599
|
},
|
|
2589
2600
|
"time/isToday": {
|
|
2590
2601
|
module: "time",
|
|
@@ -2595,7 +2606,7 @@ var TIME_OPERATORS = {
|
|
|
2595
2606
|
hasSideEffects: false,
|
|
2596
2607
|
returnType: "boolean",
|
|
2597
2608
|
params: [{ name: "date", type: "number", description: "Timestamp" }],
|
|
2598
|
-
example: '["time/isToday", "
|
|
2609
|
+
example: '["time/isToday", ["time/now"]]'
|
|
2599
2610
|
},
|
|
2600
2611
|
"time/relative": {
|
|
2601
2612
|
module: "time",
|
|
@@ -2606,7 +2617,7 @@ var TIME_OPERATORS = {
|
|
|
2606
2617
|
hasSideEffects: false,
|
|
2607
2618
|
returnType: "string",
|
|
2608
2619
|
params: [{ name: "date", type: "number", description: "Timestamp" }],
|
|
2609
|
-
example: '["time/relative",
|
|
2620
|
+
example: '["time/relative", 1700000000000] // => "2 years ago"'
|
|
2610
2621
|
},
|
|
2611
2622
|
"time/duration": {
|
|
2612
2623
|
module: "time",
|
|
@@ -2632,7 +2643,7 @@ var VALIDATE_OPERATORS = {
|
|
|
2632
2643
|
hasSideEffects: false,
|
|
2633
2644
|
returnType: "boolean",
|
|
2634
2645
|
params: [{ name: "value", type: "any", description: "Value to check" }],
|
|
2635
|
-
example: '["validate/required", "
|
|
2646
|
+
example: '["validate/required", "Ann"]'
|
|
2636
2647
|
},
|
|
2637
2648
|
"validate/string": {
|
|
2638
2649
|
module: "validate",
|
|
@@ -2643,7 +2654,7 @@ var VALIDATE_OPERATORS = {
|
|
|
2643
2654
|
hasSideEffects: false,
|
|
2644
2655
|
returnType: "boolean",
|
|
2645
2656
|
params: [{ name: "value", type: "any", description: "Value to check" }],
|
|
2646
|
-
example: '["validate/string", "
|
|
2657
|
+
example: '["validate/string", "Ann"]'
|
|
2647
2658
|
},
|
|
2648
2659
|
"validate/number": {
|
|
2649
2660
|
module: "validate",
|
|
@@ -2654,7 +2665,7 @@ var VALIDATE_OPERATORS = {
|
|
|
2654
2665
|
hasSideEffects: false,
|
|
2655
2666
|
returnType: "boolean",
|
|
2656
2667
|
params: [{ name: "value", type: "any", description: "Value to check" }],
|
|
2657
|
-
example: '["validate/number",
|
|
2668
|
+
example: '["validate/number", 42]'
|
|
2658
2669
|
},
|
|
2659
2670
|
"validate/boolean": {
|
|
2660
2671
|
module: "validate",
|
|
@@ -2665,7 +2676,7 @@ var VALIDATE_OPERATORS = {
|
|
|
2665
2676
|
hasSideEffects: false,
|
|
2666
2677
|
returnType: "boolean",
|
|
2667
2678
|
params: [{ name: "value", type: "any", description: "Value to check" }],
|
|
2668
|
-
example: '["validate/boolean",
|
|
2679
|
+
example: '["validate/boolean", true]'
|
|
2669
2680
|
},
|
|
2670
2681
|
"validate/array": {
|
|
2671
2682
|
module: "validate",
|
|
@@ -2676,7 +2687,7 @@ var VALIDATE_OPERATORS = {
|
|
|
2676
2687
|
hasSideEffects: false,
|
|
2677
2688
|
returnType: "boolean",
|
|
2678
2689
|
params: [{ name: "value", type: "any", description: "Value to check" }],
|
|
2679
|
-
example: '["validate/array",
|
|
2690
|
+
example: '["validate/array", [1, 2]]'
|
|
2680
2691
|
},
|
|
2681
2692
|
"validate/object": {
|
|
2682
2693
|
module: "validate",
|
|
@@ -2687,7 +2698,7 @@ var VALIDATE_OPERATORS = {
|
|
|
2687
2698
|
hasSideEffects: false,
|
|
2688
2699
|
returnType: "boolean",
|
|
2689
2700
|
params: [{ name: "value", type: "any", description: "Value to check" }],
|
|
2690
|
-
example: '["validate/object", "
|
|
2701
|
+
example: '["validate/object", {"a": 1}]'
|
|
2691
2702
|
},
|
|
2692
2703
|
"validate/email": {
|
|
2693
2704
|
module: "validate",
|
|
@@ -2698,7 +2709,7 @@ var VALIDATE_OPERATORS = {
|
|
|
2698
2709
|
hasSideEffects: false,
|
|
2699
2710
|
returnType: "boolean",
|
|
2700
2711
|
params: [{ name: "value", type: "string", description: "Email to validate" }],
|
|
2701
|
-
example: '["validate/email", "@
|
|
2712
|
+
example: '["validate/email", "ann@example.com"]'
|
|
2702
2713
|
},
|
|
2703
2714
|
"validate/url": {
|
|
2704
2715
|
module: "validate",
|
|
@@ -2709,7 +2720,7 @@ var VALIDATE_OPERATORS = {
|
|
|
2709
2720
|
hasSideEffects: false,
|
|
2710
2721
|
returnType: "boolean",
|
|
2711
2722
|
params: [{ name: "value", type: "string", description: "URL to validate" }],
|
|
2712
|
-
example: '["validate/url", "
|
|
2723
|
+
example: '["validate/url", "https://example.com"]'
|
|
2713
2724
|
},
|
|
2714
2725
|
"validate/uuid": {
|
|
2715
2726
|
module: "validate",
|
|
@@ -2720,7 +2731,7 @@ var VALIDATE_OPERATORS = {
|
|
|
2720
2731
|
hasSideEffects: false,
|
|
2721
2732
|
returnType: "boolean",
|
|
2722
2733
|
params: [{ name: "value", type: "string", description: "UUID to validate" }],
|
|
2723
|
-
example: '["validate/uuid", "
|
|
2734
|
+
example: '["validate/uuid", "550e8400-e29b-41d4-a716-446655440000"]'
|
|
2724
2735
|
},
|
|
2725
2736
|
"validate/phone": {
|
|
2726
2737
|
module: "validate",
|
|
@@ -2731,7 +2742,7 @@ var VALIDATE_OPERATORS = {
|
|
|
2731
2742
|
hasSideEffects: false,
|
|
2732
2743
|
returnType: "boolean",
|
|
2733
2744
|
params: [{ name: "value", type: "string", description: "Phone number to validate" }],
|
|
2734
|
-
example: '["validate/phone", "
|
|
2745
|
+
example: '["validate/phone", "+15551234567"]'
|
|
2735
2746
|
},
|
|
2736
2747
|
"validate/creditCard": {
|
|
2737
2748
|
module: "validate",
|
|
@@ -2742,7 +2753,7 @@ var VALIDATE_OPERATORS = {
|
|
|
2742
2753
|
hasSideEffects: false,
|
|
2743
2754
|
returnType: "boolean",
|
|
2744
2755
|
params: [{ name: "value", type: "string", description: "Card number to validate" }],
|
|
2745
|
-
example: '["validate/creditCard", "
|
|
2756
|
+
example: '["validate/creditCard", "4111111111111111"]'
|
|
2746
2757
|
},
|
|
2747
2758
|
"validate/date": {
|
|
2748
2759
|
module: "validate",
|
|
@@ -2753,7 +2764,7 @@ var VALIDATE_OPERATORS = {
|
|
|
2753
2764
|
hasSideEffects: false,
|
|
2754
2765
|
returnType: "boolean",
|
|
2755
2766
|
params: [{ name: "value", type: "any", description: "Value to check" }],
|
|
2756
|
-
example: '["validate/date", "
|
|
2767
|
+
example: '["validate/date", "2024-01-18"]'
|
|
2757
2768
|
},
|
|
2758
2769
|
"validate/minLength": {
|
|
2759
2770
|
module: "validate",
|
|
@@ -2767,7 +2778,7 @@ var VALIDATE_OPERATORS = {
|
|
|
2767
2778
|
{ name: "value", type: "string | array", description: "Value to check" },
|
|
2768
2779
|
{ name: "min", type: "number", description: "Minimum length" }
|
|
2769
2780
|
],
|
|
2770
|
-
example: '["validate/minLength", "
|
|
2781
|
+
example: '["validate/minLength", "password123", 8]'
|
|
2771
2782
|
},
|
|
2772
2783
|
"validate/maxLength": {
|
|
2773
2784
|
module: "validate",
|
|
@@ -2781,7 +2792,7 @@ var VALIDATE_OPERATORS = {
|
|
|
2781
2792
|
{ name: "value", type: "string | array", description: "Value to check" },
|
|
2782
2793
|
{ name: "max", type: "number", description: "Maximum length" }
|
|
2783
2794
|
],
|
|
2784
|
-
example: '["validate/maxLength", "
|
|
2795
|
+
example: '["validate/maxLength", "Ann", 50]'
|
|
2785
2796
|
},
|
|
2786
2797
|
"validate/length": {
|
|
2787
2798
|
module: "validate",
|
|
@@ -2795,7 +2806,7 @@ var VALIDATE_OPERATORS = {
|
|
|
2795
2806
|
{ name: "value", type: "string | array", description: "Value to check" },
|
|
2796
2807
|
{ name: "exact", type: "number", description: "Required length" }
|
|
2797
2808
|
],
|
|
2798
|
-
example: '["validate/length", "
|
|
2809
|
+
example: '["validate/length", "ABC123", 6]'
|
|
2799
2810
|
},
|
|
2800
2811
|
"validate/min": {
|
|
2801
2812
|
module: "validate",
|
|
@@ -2809,7 +2820,7 @@ var VALIDATE_OPERATORS = {
|
|
|
2809
2820
|
{ name: "value", type: "number", description: "Number to check" },
|
|
2810
2821
|
{ name: "min", type: "number", description: "Minimum value" }
|
|
2811
2822
|
],
|
|
2812
|
-
example: '["validate/min",
|
|
2823
|
+
example: '["validate/min", 21, 18]'
|
|
2813
2824
|
},
|
|
2814
2825
|
"validate/max": {
|
|
2815
2826
|
module: "validate",
|
|
@@ -2823,7 +2834,7 @@ var VALIDATE_OPERATORS = {
|
|
|
2823
2834
|
{ name: "value", type: "number", description: "Number to check" },
|
|
2824
2835
|
{ name: "max", type: "number", description: "Maximum value" }
|
|
2825
2836
|
],
|
|
2826
|
-
example: '["validate/max",
|
|
2837
|
+
example: '["validate/max", 50, 100]'
|
|
2827
2838
|
},
|
|
2828
2839
|
"validate/range": {
|
|
2829
2840
|
module: "validate",
|
|
@@ -2838,7 +2849,7 @@ var VALIDATE_OPERATORS = {
|
|
|
2838
2849
|
{ name: "min", type: "number", description: "Minimum value" },
|
|
2839
2850
|
{ name: "max", type: "number", description: "Maximum value" }
|
|
2840
2851
|
],
|
|
2841
|
-
example: '["validate/range",
|
|
2852
|
+
example: '["validate/range", 4, 1, 5]'
|
|
2842
2853
|
},
|
|
2843
2854
|
"validate/pattern": {
|
|
2844
2855
|
module: "validate",
|
|
@@ -2852,7 +2863,7 @@ var VALIDATE_OPERATORS = {
|
|
|
2852
2863
|
{ name: "value", type: "string", description: "String to check" },
|
|
2853
2864
|
{ name: "regex", type: "string", description: "Regex pattern" }
|
|
2854
2865
|
],
|
|
2855
|
-
example: '["validate/pattern", "
|
|
2866
|
+
example: '["validate/pattern", "ABC123", "^[A-Z]{3}[0-9]{3}$"]'
|
|
2856
2867
|
},
|
|
2857
2868
|
"validate/oneOf": {
|
|
2858
2869
|
module: "validate",
|
|
@@ -2866,7 +2877,7 @@ var VALIDATE_OPERATORS = {
|
|
|
2866
2877
|
{ name: "value", type: "any", description: "Value to check" },
|
|
2867
2878
|
{ name: "options", type: "array", description: "Allowed values" }
|
|
2868
2879
|
],
|
|
2869
|
-
example: '["validate/oneOf", "
|
|
2880
|
+
example: '["validate/oneOf", "admin", ["admin", "user", "guest"]]'
|
|
2870
2881
|
},
|
|
2871
2882
|
"validate/noneOf": {
|
|
2872
2883
|
module: "validate",
|
|
@@ -2880,7 +2891,7 @@ var VALIDATE_OPERATORS = {
|
|
|
2880
2891
|
{ name: "value", type: "any", description: "Value to check" },
|
|
2881
2892
|
{ name: "options", type: "array", description: "Disallowed values" }
|
|
2882
2893
|
],
|
|
2883
|
-
example: '["validate/noneOf", "
|
|
2894
|
+
example: '["validate/noneOf", "alice", ["admin", "root", "system"]]'
|
|
2884
2895
|
},
|
|
2885
2896
|
"validate/equals": {
|
|
2886
2897
|
module: "validate",
|
|
@@ -2894,7 +2905,7 @@ var VALIDATE_OPERATORS = {
|
|
|
2894
2905
|
{ name: "a", type: "any", description: "First value" },
|
|
2895
2906
|
{ name: "b", type: "any", description: "Second value" }
|
|
2896
2907
|
],
|
|
2897
|
-
example: '["validate/equals", "
|
|
2908
|
+
example: '["validate/equals", "secret", "secret"]'
|
|
2898
2909
|
},
|
|
2899
2910
|
"validate/check": {
|
|
2900
2911
|
module: "validate",
|
|
@@ -2908,11 +2919,7 @@ var VALIDATE_OPERATORS = {
|
|
|
2908
2919
|
{ name: "value", type: "any", description: "Value or object to validate" },
|
|
2909
2920
|
{ name: "rules", type: "object", description: "Validation rules by field" }
|
|
2910
2921
|
],
|
|
2911
|
-
example:
|
|
2912
|
-
"name": [["required"], ["minLength", 2], ["maxLength", 50]],
|
|
2913
|
-
"email": [["required"], ["email"]],
|
|
2914
|
-
"age": [["number"], ["min", 18]]
|
|
2915
|
-
}]`
|
|
2922
|
+
example: '["validate/check", {"name": "Ann", "email": "ann@example.com", "age": 20}, {"name": [["required"], ["minLength", 2], ["maxLength", 50]], "email": [["required"], ["email"]], "age": [["number"]]}]'
|
|
2916
2923
|
}
|
|
2917
2924
|
};
|
|
2918
2925
|
|
|
@@ -3288,7 +3295,7 @@ var NN_OPERATORS = {
|
|
|
3288
3295
|
{ name: "module", type: "nn/module", description: "The neural network module" },
|
|
3289
3296
|
{ name: "input", type: "tensor", description: "Input tensor" }
|
|
3290
3297
|
],
|
|
3291
|
-
example: '["nn/forward", "
|
|
3298
|
+
example: '["nn/forward", {"layers": [{"type": "dense", "units": 2}]}, [0.1, 0.2]]'
|
|
3292
3299
|
},
|
|
3293
3300
|
"nn/getWeights": {
|
|
3294
3301
|
module: "nn",
|
|
@@ -3301,7 +3308,7 @@ var NN_OPERATORS = {
|
|
|
3301
3308
|
params: [
|
|
3302
3309
|
{ name: "module", type: "nn/module", description: "The neural network module" }
|
|
3303
3310
|
],
|
|
3304
|
-
example: '["nn/getWeights", "
|
|
3311
|
+
example: '["nn/getWeights", {"layers": [{"type": "dense", "units": 2}]}]'
|
|
3305
3312
|
},
|
|
3306
3313
|
"nn/setWeights": {
|
|
3307
3314
|
module: "nn",
|
|
@@ -3315,7 +3322,7 @@ var NN_OPERATORS = {
|
|
|
3315
3322
|
{ name: "module", type: "nn/module", description: "The neural network module" },
|
|
3316
3323
|
{ name: "weights", type: "tensor", description: "New weights as flat tensor" }
|
|
3317
3324
|
],
|
|
3318
|
-
example: '["nn/setWeights", "
|
|
3325
|
+
example: '["nn/setWeights", {"layers": [{"type": "dense", "units": 2}]}, [0.1, 0.2, 0.3]]'
|
|
3319
3326
|
},
|
|
3320
3327
|
"nn/paramCount": {
|
|
3321
3328
|
module: "nn",
|
|
@@ -3328,7 +3335,7 @@ var NN_OPERATORS = {
|
|
|
3328
3335
|
params: [
|
|
3329
3336
|
{ name: "module", type: "nn/module", description: "The neural network module" }
|
|
3330
3337
|
],
|
|
3331
|
-
example: '["nn/paramCount", "
|
|
3338
|
+
example: '["nn/paramCount", {"layers": [{"type": "dense", "units": 2}]}]'
|
|
3332
3339
|
},
|
|
3333
3340
|
"nn/clone": {
|
|
3334
3341
|
module: "nn",
|
|
@@ -3341,7 +3348,7 @@ var NN_OPERATORS = {
|
|
|
3341
3348
|
params: [
|
|
3342
3349
|
{ name: "module", type: "nn/module", description: "The neural network module to clone" }
|
|
3343
3350
|
],
|
|
3344
|
-
example: '["nn/clone", "
|
|
3351
|
+
example: '["nn/clone", {"layers": [{"type": "dense", "units": 2}]}]'
|
|
3345
3352
|
},
|
|
3346
3353
|
// ============================================================================
|
|
3347
3354
|
// ML lifecycle effect (bare alias invoked by std ML behaviors)
|
|
@@ -3358,7 +3365,7 @@ var NN_OPERATORS = {
|
|
|
3358
3365
|
{ name: "model", type: "nn/module", description: "The neural network module" },
|
|
3359
3366
|
{ name: "input", type: "tensor", description: "Input tensor" }
|
|
3360
3367
|
],
|
|
3361
|
-
example: '["forward", "
|
|
3368
|
+
example: '["forward", {"layers": [{"type": "dense", "units": 2}]}, [0.5]]'
|
|
3362
3369
|
}
|
|
3363
3370
|
};
|
|
3364
3371
|
|
|
@@ -3446,7 +3453,7 @@ var TENSOR_OPERATORS = {
|
|
|
3446
3453
|
params: [
|
|
3447
3454
|
{ name: "tensor", type: "tensor", description: "The tensor" }
|
|
3448
3455
|
],
|
|
3449
|
-
example: '["tensor/shape",
|
|
3456
|
+
example: '["tensor/shape", [[1, 2], [3, 4]]] // => [2, 2]'
|
|
3450
3457
|
},
|
|
3451
3458
|
"tensor/get": {
|
|
3452
3459
|
module: "tensor",
|
|
@@ -3460,7 +3467,7 @@ var TENSOR_OPERATORS = {
|
|
|
3460
3467
|
{ name: "tensor", type: "tensor", description: "The tensor" },
|
|
3461
3468
|
{ name: "index", type: "number | number[]", description: "Index (single for 1D, array for multi-D)" }
|
|
3462
3469
|
],
|
|
3463
|
-
example: '["tensor/get",
|
|
3470
|
+
example: '["tensor/get", [10, 20, 30, 40], 3] // Get 4th element'
|
|
3464
3471
|
},
|
|
3465
3472
|
"tensor/slice": {
|
|
3466
3473
|
module: "tensor",
|
|
@@ -3475,7 +3482,7 @@ var TENSOR_OPERATORS = {
|
|
|
3475
3482
|
{ name: "start", type: "number", description: "Start index" },
|
|
3476
3483
|
{ name: "end", type: "number", description: "End index (exclusive)" }
|
|
3477
3484
|
],
|
|
3478
|
-
example: '["tensor/slice",
|
|
3485
|
+
example: '["tensor/slice", [10, 20, 30, 40], 0, 3] // First 3 elements'
|
|
3479
3486
|
},
|
|
3480
3487
|
"tensor/reshape": {
|
|
3481
3488
|
module: "tensor",
|
|
@@ -3489,7 +3496,7 @@ var TENSOR_OPERATORS = {
|
|
|
3489
3496
|
{ name: "tensor", type: "tensor", description: "The tensor" },
|
|
3490
3497
|
{ name: "shape", type: "number[]", description: "New shape" }
|
|
3491
3498
|
],
|
|
3492
|
-
example: '["tensor/reshape",
|
|
3499
|
+
example: '["tensor/reshape", [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16], [4, 4]] // Reshape to 4x4'
|
|
3493
3500
|
},
|
|
3494
3501
|
"tensor/flatten": {
|
|
3495
3502
|
module: "tensor",
|
|
@@ -3502,7 +3509,7 @@ var TENSOR_OPERATORS = {
|
|
|
3502
3509
|
params: [
|
|
3503
3510
|
{ name: "tensor", type: "tensor", description: "The tensor" }
|
|
3504
3511
|
],
|
|
3505
|
-
example: '["tensor/flatten",
|
|
3512
|
+
example: '["tensor/flatten", [[1, 2], [3, 4]]]'
|
|
3506
3513
|
},
|
|
3507
3514
|
// ============================================================================
|
|
3508
3515
|
// Math Operations
|
|
@@ -3519,7 +3526,7 @@ var TENSOR_OPERATORS = {
|
|
|
3519
3526
|
{ name: "a", type: "tensor", description: "First tensor" },
|
|
3520
3527
|
{ name: "b", type: "tensor | number", description: "Second tensor or scalar" }
|
|
3521
3528
|
],
|
|
3522
|
-
example: '["tensor/add",
|
|
3529
|
+
example: '["tensor/add", [1, 2], [3, 4]]'
|
|
3523
3530
|
},
|
|
3524
3531
|
"tensor/sub": {
|
|
3525
3532
|
module: "tensor",
|
|
@@ -3533,7 +3540,7 @@ var TENSOR_OPERATORS = {
|
|
|
3533
3540
|
{ name: "a", type: "tensor", description: "First tensor" },
|
|
3534
3541
|
{ name: "b", type: "tensor | number", description: "Second tensor or scalar" }
|
|
3535
3542
|
],
|
|
3536
|
-
example: '["tensor/sub",
|
|
3543
|
+
example: '["tensor/sub", [1, 2], [3, 4]]'
|
|
3537
3544
|
},
|
|
3538
3545
|
"tensor/mul": {
|
|
3539
3546
|
module: "tensor",
|
|
@@ -3547,7 +3554,7 @@ var TENSOR_OPERATORS = {
|
|
|
3547
3554
|
{ name: "a", type: "tensor", description: "First tensor" },
|
|
3548
3555
|
{ name: "b", type: "tensor | number", description: "Second tensor or scalar" }
|
|
3549
3556
|
],
|
|
3550
|
-
example: '["tensor/mul",
|
|
3557
|
+
example: '["tensor/mul", [0.5, 0.7], 0.99] // Decay weights'
|
|
3551
3558
|
},
|
|
3552
3559
|
"tensor/div": {
|
|
3553
3560
|
module: "tensor",
|
|
@@ -3561,7 +3568,7 @@ var TENSOR_OPERATORS = {
|
|
|
3561
3568
|
{ name: "a", type: "tensor", description: "First tensor" },
|
|
3562
3569
|
{ name: "b", type: "tensor | number", description: "Second tensor or scalar" }
|
|
3563
3570
|
],
|
|
3564
|
-
example: '["tensor/div",
|
|
3571
|
+
example: '["tensor/div", [10, 20], 2]'
|
|
3565
3572
|
},
|
|
3566
3573
|
"tensor/matmul": {
|
|
3567
3574
|
module: "tensor",
|
|
@@ -3575,7 +3582,7 @@ var TENSOR_OPERATORS = {
|
|
|
3575
3582
|
{ name: "a", type: "tensor", description: "First tensor (NxM)" },
|
|
3576
3583
|
{ name: "b", type: "tensor", description: "Second tensor (MxK)" }
|
|
3577
3584
|
],
|
|
3578
|
-
example: '["tensor/matmul",
|
|
3585
|
+
example: '["tensor/matmul", [[1, 2], [3, 4]], [[5, 6], [7, 8]]]'
|
|
3579
3586
|
},
|
|
3580
3587
|
"tensor/dot": {
|
|
3581
3588
|
module: "tensor",
|
|
@@ -3589,7 +3596,7 @@ var TENSOR_OPERATORS = {
|
|
|
3589
3596
|
{ name: "a", type: "tensor", description: "First vector" },
|
|
3590
3597
|
{ name: "b", type: "tensor", description: "Second vector" }
|
|
3591
3598
|
],
|
|
3592
|
-
example: '["tensor/dot",
|
|
3599
|
+
example: '["tensor/dot", [1, 2], [3, 4]]'
|
|
3593
3600
|
},
|
|
3594
3601
|
// ============================================================================
|
|
3595
3602
|
// Reductions
|
|
@@ -3606,7 +3613,7 @@ var TENSOR_OPERATORS = {
|
|
|
3606
3613
|
{ name: "tensor", type: "tensor", description: "The tensor" },
|
|
3607
3614
|
{ name: "dim", type: "number", description: "Dimension to reduce", optional: true }
|
|
3608
3615
|
],
|
|
3609
|
-
example: '["tensor/sum",
|
|
3616
|
+
example: '["tensor/sum", [1, 0, 1]] // Total reward'
|
|
3610
3617
|
},
|
|
3611
3618
|
"tensor/mean": {
|
|
3612
3619
|
module: "tensor",
|
|
@@ -3620,7 +3627,7 @@ var TENSOR_OPERATORS = {
|
|
|
3620
3627
|
{ name: "tensor", type: "tensor", description: "The tensor" },
|
|
3621
3628
|
{ name: "dim", type: "number", description: "Dimension to reduce", optional: true }
|
|
3622
3629
|
],
|
|
3623
|
-
example: '["tensor/mean",
|
|
3630
|
+
example: '["tensor/mean", [0.2, 0.4, 0.6]]'
|
|
3624
3631
|
},
|
|
3625
3632
|
"tensor/max": {
|
|
3626
3633
|
module: "tensor",
|
|
@@ -3634,7 +3641,7 @@ var TENSOR_OPERATORS = {
|
|
|
3634
3641
|
{ name: "tensor", type: "tensor", description: "The tensor" },
|
|
3635
3642
|
{ name: "dim", type: "number", description: "Dimension to reduce", optional: true }
|
|
3636
3643
|
],
|
|
3637
|
-
example: '["tensor/max",
|
|
3644
|
+
example: '["tensor/max", [0.1, 0.9, 0.3]]'
|
|
3638
3645
|
},
|
|
3639
3646
|
"tensor/min": {
|
|
3640
3647
|
module: "tensor",
|
|
@@ -3648,7 +3655,7 @@ var TENSOR_OPERATORS = {
|
|
|
3648
3655
|
{ name: "tensor", type: "tensor", description: "The tensor" },
|
|
3649
3656
|
{ name: "dim", type: "number", description: "Dimension to reduce", optional: true }
|
|
3650
3657
|
],
|
|
3651
|
-
example: '["tensor/min",
|
|
3658
|
+
example: '["tensor/min", [3, 1, 2]]'
|
|
3652
3659
|
},
|
|
3653
3660
|
"tensor/argmax": {
|
|
3654
3661
|
module: "tensor",
|
|
@@ -3662,7 +3669,7 @@ var TENSOR_OPERATORS = {
|
|
|
3662
3669
|
{ name: "tensor", type: "tensor", description: "The tensor" },
|
|
3663
3670
|
{ name: "dim", type: "number", description: "Dimension to reduce", optional: true }
|
|
3664
3671
|
],
|
|
3665
|
-
example: '["tensor/argmax",
|
|
3672
|
+
example: '["tensor/argmax", [0.1, 0.9, 0.3]] // Best action index'
|
|
3666
3673
|
},
|
|
3667
3674
|
"tensor/norm": {
|
|
3668
3675
|
module: "tensor",
|
|
@@ -3676,7 +3683,7 @@ var TENSOR_OPERATORS = {
|
|
|
3676
3683
|
{ name: "tensor", type: "tensor", description: "The tensor" },
|
|
3677
3684
|
{ name: "p", type: "number", description: "Norm order (default 2)", optional: true, defaultValue: 2 }
|
|
3678
3685
|
],
|
|
3679
|
-
example: '["tensor/norm",
|
|
3686
|
+
example: '["tensor/norm", [3, 4]]'
|
|
3680
3687
|
},
|
|
3681
3688
|
// ============================================================================
|
|
3682
3689
|
// Range Validation (for contracts)
|
|
@@ -3693,7 +3700,7 @@ var TENSOR_OPERATORS = {
|
|
|
3693
3700
|
{ name: "tensor", type: "tensor", description: "The tensor" },
|
|
3694
3701
|
{ name: "range", type: "[number, number]", description: "Range as [min, max]" }
|
|
3695
3702
|
],
|
|
3696
|
-
example: '["tensor/allInRange",
|
|
3703
|
+
example: '["tensor/allInRange", [0.5, -0.2], [-1.0, 1.0]]'
|
|
3697
3704
|
},
|
|
3698
3705
|
"tensor/outOfRangeIndices": {
|
|
3699
3706
|
module: "tensor",
|
|
@@ -3707,7 +3714,7 @@ var TENSOR_OPERATORS = {
|
|
|
3707
3714
|
{ name: "tensor", type: "tensor", description: "The tensor" },
|
|
3708
3715
|
{ name: "range", type: "[number, number]", description: "Range as [min, max]" }
|
|
3709
3716
|
],
|
|
3710
|
-
example: '["tensor/outOfRangeIndices",
|
|
3717
|
+
example: '["tensor/outOfRangeIndices", [0.5, 1.5], [-1.0, 1.0]]'
|
|
3711
3718
|
},
|
|
3712
3719
|
"tensor/clamp": {
|
|
3713
3720
|
module: "tensor",
|
|
@@ -3722,7 +3729,7 @@ var TENSOR_OPERATORS = {
|
|
|
3722
3729
|
{ name: "min", type: "number", description: "Minimum value" },
|
|
3723
3730
|
{ name: "max", type: "number", description: "Maximum value" }
|
|
3724
3731
|
],
|
|
3725
|
-
example: '["tensor/clamp",
|
|
3732
|
+
example: '["tensor/clamp", [5, -15, 3], -10.0, 10.0]'
|
|
3726
3733
|
},
|
|
3727
3734
|
"tensor/clampPerDim": {
|
|
3728
3735
|
module: "tensor",
|
|
@@ -3736,7 +3743,7 @@ var TENSOR_OPERATORS = {
|
|
|
3736
3743
|
{ name: "tensor", type: "tensor", description: "The tensor" },
|
|
3737
3744
|
{ name: "ranges", type: "object", description: 'Per-dimension ranges { "0": {min, max}, ... }' }
|
|
3738
3745
|
],
|
|
3739
|
-
example: '["tensor/clampPerDim", "
|
|
3746
|
+
example: '["tensor/clampPerDim", [5, -15], {"0": {"min": 0, "max": 10}, "1": {"min": -10, "max": 10}}]'
|
|
3740
3747
|
},
|
|
3741
3748
|
"tensor/outOfRangeDims": {
|
|
3742
3749
|
module: "tensor",
|
|
@@ -3750,7 +3757,7 @@ var TENSOR_OPERATORS = {
|
|
|
3750
3757
|
{ name: "tensor", type: "tensor", description: "The tensor" },
|
|
3751
3758
|
{ name: "ranges", type: "object", description: 'Per-dimension ranges { "0": {min, max}, ... }' }
|
|
3752
3759
|
],
|
|
3753
|
-
example: '["tensor/outOfRangeDims", "
|
|
3760
|
+
example: '["tensor/outOfRangeDims", [5, -15], {"0": {"min": 0, "max": 10}, "1": {"min": -10, "max": 10}}]'
|
|
3754
3761
|
},
|
|
3755
3762
|
// ============================================================================
|
|
3756
3763
|
// Conversion
|
|
@@ -3766,7 +3773,7 @@ var TENSOR_OPERATORS = {
|
|
|
3766
3773
|
params: [
|
|
3767
3774
|
{ name: "tensor", type: "tensor", description: "The tensor" }
|
|
3768
3775
|
],
|
|
3769
|
-
example: '["tensor/toArray",
|
|
3776
|
+
example: '["tensor/toArray", [[1, 2], [3, 4]]]'
|
|
3770
3777
|
},
|
|
3771
3778
|
"tensor/toList": {
|
|
3772
3779
|
module: "tensor",
|
|
@@ -3779,7 +3786,7 @@ var TENSOR_OPERATORS = {
|
|
|
3779
3786
|
params: [
|
|
3780
3787
|
{ name: "tensor", type: "tensor", description: "The tensor (must be 1D)" }
|
|
3781
3788
|
],
|
|
3782
|
-
example: '["tensor/toList",
|
|
3789
|
+
example: '["tensor/toList", [1, 2, 3]]'
|
|
3783
3790
|
},
|
|
3784
3791
|
// ============================================================================
|
|
3785
3792
|
// Concatenation / stacking / shape manipulation
|
|
@@ -3796,7 +3803,7 @@ var TENSOR_OPERATORS = {
|
|
|
3796
3803
|
{ name: "a", type: "tensor", description: "First tensor" },
|
|
3797
3804
|
{ name: "b", type: "tensor", description: "Second tensor" }
|
|
3798
3805
|
],
|
|
3799
|
-
example: '["tensor/cat",
|
|
3806
|
+
example: '["tensor/cat", [1, 2], [3, 4]]'
|
|
3800
3807
|
},
|
|
3801
3808
|
"tensor/stack": {
|
|
3802
3809
|
module: "tensor",
|
|
@@ -3810,7 +3817,7 @@ var TENSOR_OPERATORS = {
|
|
|
3810
3817
|
{ name: "a", type: "tensor", description: "First tensor" },
|
|
3811
3818
|
{ name: "b", type: "tensor", description: "Second tensor" }
|
|
3812
3819
|
],
|
|
3813
|
-
example: '["tensor/stack",
|
|
3820
|
+
example: '["tensor/stack", [1, 2], [3, 4]]'
|
|
3814
3821
|
},
|
|
3815
3822
|
"tensor/transpose": {
|
|
3816
3823
|
module: "tensor",
|
|
@@ -3825,7 +3832,7 @@ var TENSOR_OPERATORS = {
|
|
|
3825
3832
|
{ name: "dim0", type: "number", description: "First dimension to swap (optional)" },
|
|
3826
3833
|
{ name: "dim1", type: "number", description: "Second dimension to swap (optional)" }
|
|
3827
3834
|
],
|
|
3828
|
-
example: '["tensor/transpose",
|
|
3835
|
+
example: '["tensor/transpose", [[1, 2], [3, 4]], 0, 1]'
|
|
3829
3836
|
},
|
|
3830
3837
|
"tensor/unsqueeze": {
|
|
3831
3838
|
module: "tensor",
|
|
@@ -3839,7 +3846,7 @@ var TENSOR_OPERATORS = {
|
|
|
3839
3846
|
{ name: "tensor", type: "tensor", description: "The tensor" },
|
|
3840
3847
|
{ name: "dim", type: "number", description: "Position to insert the new dimension" }
|
|
3841
3848
|
],
|
|
3842
|
-
example: '["tensor/unsqueeze",
|
|
3849
|
+
example: '["tensor/unsqueeze", [1, 2, 3], 0]'
|
|
3843
3850
|
},
|
|
3844
3851
|
"tensor/squeeze": {
|
|
3845
3852
|
module: "tensor",
|
|
@@ -3852,7 +3859,7 @@ var TENSOR_OPERATORS = {
|
|
|
3852
3859
|
params: [
|
|
3853
3860
|
{ name: "tensor", type: "tensor", description: "The tensor" }
|
|
3854
3861
|
],
|
|
3855
|
-
example: '["tensor/squeeze",
|
|
3862
|
+
example: '["tensor/squeeze", [[1, 2, 3]]]'
|
|
3856
3863
|
}
|
|
3857
3864
|
};
|
|
3858
3865
|
|
|
@@ -3874,7 +3881,7 @@ var TRAIN_OPERATORS = {
|
|
|
3874
3881
|
{ name: "data", type: "array", description: "Training data (array of {input, target} or experiences)" },
|
|
3875
3882
|
{ name: "config", type: "train/config", description: "Training configuration with constraints" }
|
|
3876
3883
|
],
|
|
3877
|
-
example: '["train/loop", "
|
|
3884
|
+
example: '["train/loop", {"layers": [{"type": "dense", "units": 2}]}, [{"state": [0], "action": 1, "reward": 1}], {"epochs": 10}]'
|
|
3878
3885
|
},
|
|
3879
3886
|
"train/step": {
|
|
3880
3887
|
module: "train",
|
|
@@ -3890,7 +3897,7 @@ var TRAIN_OPERATORS = {
|
|
|
3890
3897
|
{ name: "target", type: "tensor", description: "Target tensor" },
|
|
3891
3898
|
{ name: "config", type: "train/config", description: "Training configuration" }
|
|
3892
3899
|
],
|
|
3893
|
-
example: '["train/step", "
|
|
3900
|
+
example: '["train/step", {"layers": [{"type": "dense", "units": 2}]}, [0.1, 0.2], [1], {"lr": 0.01}]'
|
|
3894
3901
|
},
|
|
3895
3902
|
// ============================================================================
|
|
3896
3903
|
// Validation
|
|
@@ -3907,7 +3914,7 @@ var TRAIN_OPERATORS = {
|
|
|
3907
3914
|
{ name: "module", type: "nn/module", description: "The neural network" },
|
|
3908
3915
|
{ name: "testCases", type: "array", description: "Array of {input, expected, tolerance?}" }
|
|
3909
3916
|
],
|
|
3910
|
-
example: '["train/validate", "
|
|
3917
|
+
example: '["train/validate", {"layers": [{"type": "dense", "units": 2}]}, [{"input": [0], "expected": [1]}]]'
|
|
3911
3918
|
},
|
|
3912
3919
|
"train/checkRegression": {
|
|
3913
3920
|
module: "train",
|
|
@@ -3922,7 +3929,7 @@ var TRAIN_OPERATORS = {
|
|
|
3922
3929
|
{ name: "oldModule", type: "nn/module", description: "Previous network" },
|
|
3923
3930
|
{ name: "invariants", type: "array", description: "Test cases that must not regress" }
|
|
3924
3931
|
],
|
|
3925
|
-
example: '["train/checkRegression",
|
|
3932
|
+
example: '["train/checkRegression", [0.1, 0.2], {"layers": [{"type": "dense", "units": 2}]}, [{"input": [0], "expected": [1]}]]'
|
|
3926
3933
|
},
|
|
3927
3934
|
// ============================================================================
|
|
3928
3935
|
// Constraint Checking
|
|
@@ -3939,7 +3946,7 @@ var TRAIN_OPERATORS = {
|
|
|
3939
3946
|
{ name: "module", type: "nn/module", description: "The neural network" },
|
|
3940
3947
|
{ name: "constraints", type: "train/constraints", description: "Constraint specification" }
|
|
3941
3948
|
],
|
|
3942
|
-
example: '["train/checkConstraints",
|
|
3949
|
+
example: '["train/checkConstraints", [0.1, 0.2], {"maxMagnitude": 10}]'
|
|
3943
3950
|
},
|
|
3944
3951
|
"train/checkWeightMagnitude": {
|
|
3945
3952
|
module: "train",
|
|
@@ -3953,7 +3960,7 @@ var TRAIN_OPERATORS = {
|
|
|
3953
3960
|
{ name: "module", type: "nn/module", description: "The neural network" },
|
|
3954
3961
|
{ name: "maxMagnitude", type: "number", description: "Maximum allowed weight magnitude" }
|
|
3955
3962
|
],
|
|
3956
|
-
example: '["train/checkWeightMagnitude", "
|
|
3963
|
+
example: '["train/checkWeightMagnitude", {"layers": [{"type": "dense", "units": 2}]}, 10.0]'
|
|
3957
3964
|
},
|
|
3958
3965
|
"train/checkForbiddenOutputs": {
|
|
3959
3966
|
module: "train",
|
|
@@ -3968,7 +3975,7 @@ var TRAIN_OPERATORS = {
|
|
|
3968
3975
|
{ name: "testInputs", type: "array", description: "Inputs to test" },
|
|
3969
3976
|
{ name: "forbiddenRegions", type: "array", description: "Forbidden output regions" }
|
|
3970
3977
|
],
|
|
3971
|
-
example: '["train/checkForbiddenOutputs", "
|
|
3978
|
+
example: '["train/checkForbiddenOutputs", {"layers": [{"type": "dense", "units": 2}]}, [[0], [1]], {"0": {"min": 100, "max": 200}}]'
|
|
3972
3979
|
},
|
|
3973
3980
|
// ============================================================================
|
|
3974
3981
|
// Gradient Operations
|
|
@@ -3985,7 +3992,7 @@ var TRAIN_OPERATORS = {
|
|
|
3985
3992
|
{ name: "module", type: "nn/module", description: "The neural network" },
|
|
3986
3993
|
{ name: "maxNorm", type: "number", description: "Maximum gradient norm" }
|
|
3987
3994
|
],
|
|
3988
|
-
example: '["train/clipGradients", "
|
|
3995
|
+
example: '["train/clipGradients", {"layers": [{"type": "dense", "units": 2}]}, 1.0]'
|
|
3989
3996
|
},
|
|
3990
3997
|
"train/getGradientNorm": {
|
|
3991
3998
|
module: "train",
|
|
@@ -3998,7 +4005,7 @@ var TRAIN_OPERATORS = {
|
|
|
3998
4005
|
params: [
|
|
3999
4006
|
{ name: "module", type: "nn/module", description: "The neural network" }
|
|
4000
4007
|
],
|
|
4001
|
-
example: '["train/getGradientNorm", "
|
|
4008
|
+
example: '["train/getGradientNorm", {"layers": [{"type": "dense", "units": 2}]}]'
|
|
4002
4009
|
},
|
|
4003
4010
|
// ============================================================================
|
|
4004
4011
|
// Weight Operations
|
|
@@ -4015,7 +4022,7 @@ var TRAIN_OPERATORS = {
|
|
|
4015
4022
|
{ name: "module", type: "nn/module", description: "The neural network" },
|
|
4016
4023
|
{ name: "maxMagnitude", type: "number", description: "Maximum weight magnitude" }
|
|
4017
4024
|
],
|
|
4018
|
-
example: '["train/clipWeights", "
|
|
4025
|
+
example: '["train/clipWeights", {"layers": [{"type": "dense", "units": 2}]}, 10.0]'
|
|
4019
4026
|
},
|
|
4020
4027
|
"train/getMaxWeightMagnitude": {
|
|
4021
4028
|
module: "train",
|
|
@@ -4028,7 +4035,7 @@ var TRAIN_OPERATORS = {
|
|
|
4028
4035
|
params: [
|
|
4029
4036
|
{ name: "module", type: "nn/module", description: "The neural network" }
|
|
4030
4037
|
],
|
|
4031
|
-
example: '["train/getMaxWeightMagnitude", "
|
|
4038
|
+
example: '["train/getMaxWeightMagnitude", {"layers": [{"type": "dense", "units": 2}]}]'
|
|
4032
4039
|
},
|
|
4033
4040
|
// ============================================================================
|
|
4034
4041
|
// Loss Functions
|
|
@@ -4045,7 +4052,7 @@ var TRAIN_OPERATORS = {
|
|
|
4045
4052
|
{ name: "predicted", type: "tensor", description: "Predicted values" },
|
|
4046
4053
|
{ name: "target", type: "tensor", description: "Target values" }
|
|
4047
4054
|
],
|
|
4048
|
-
example: '["train/mse",
|
|
4055
|
+
example: '["train/mse", [0.5, 0.7], [1, 0]]'
|
|
4049
4056
|
},
|
|
4050
4057
|
"train/crossEntropy": {
|
|
4051
4058
|
module: "train",
|
|
@@ -4059,7 +4066,7 @@ var TRAIN_OPERATORS = {
|
|
|
4059
4066
|
{ name: "logits", type: "tensor", description: "Raw model outputs (logits)" },
|
|
4060
4067
|
{ name: "labels", type: "tensor", description: "Target class labels" }
|
|
4061
4068
|
],
|
|
4062
|
-
example: '["train/crossEntropy",
|
|
4069
|
+
example: '["train/crossEntropy", [2.0, 0.5], [1, 0]]'
|
|
4063
4070
|
},
|
|
4064
4071
|
"train/huber": {
|
|
4065
4072
|
module: "train",
|
|
@@ -4074,7 +4081,7 @@ var TRAIN_OPERATORS = {
|
|
|
4074
4081
|
{ name: "target", type: "tensor", description: "Target values" },
|
|
4075
4082
|
{ name: "delta", type: "number", description: "Threshold for quadratic vs linear", optional: true, defaultValue: 1 }
|
|
4076
4083
|
],
|
|
4077
|
-
example: '["train/huber",
|
|
4084
|
+
example: '["train/huber", [0.5, 1.2], [1, 0], 1.0]'
|
|
4078
4085
|
},
|
|
4079
4086
|
// ============================================================================
|
|
4080
4087
|
// Optimizers
|
|
@@ -4092,7 +4099,7 @@ var TRAIN_OPERATORS = {
|
|
|
4092
4099
|
{ name: "lr", type: "number", description: "Learning rate" },
|
|
4093
4100
|
{ name: "momentum", type: "number", description: "Momentum factor", optional: true, defaultValue: 0 }
|
|
4094
4101
|
],
|
|
4095
|
-
example: '["train/sgd", "
|
|
4102
|
+
example: '["train/sgd", {"layers": [{"type": "dense", "units": 2}]}, 0.01, 0.9]'
|
|
4096
4103
|
},
|
|
4097
4104
|
"train/adam": {
|
|
4098
4105
|
module: "train",
|
|
@@ -4108,7 +4115,7 @@ var TRAIN_OPERATORS = {
|
|
|
4108
4115
|
{ name: "beta1", type: "number", description: "First moment decay", optional: true, defaultValue: 0.9 },
|
|
4109
4116
|
{ name: "beta2", type: "number", description: "Second moment decay", optional: true, defaultValue: 0.999 }
|
|
4110
4117
|
],
|
|
4111
|
-
example: '["train/adam", "
|
|
4118
|
+
example: '["train/adam", {"layers": [{"type": "dense", "units": 2}]}, 0.001]'
|
|
4112
4119
|
},
|
|
4113
4120
|
// ============================================================================
|
|
4114
4121
|
// Experience Replay (for RL)
|
|
@@ -4125,7 +4132,7 @@ var TRAIN_OPERATORS = {
|
|
|
4125
4132
|
{ name: "buffer", type: "array", description: "Experience buffer" },
|
|
4126
4133
|
{ name: "batchSize", type: "number", description: "Number of samples" }
|
|
4127
4134
|
],
|
|
4128
|
-
example: '["train/sampleBatch", "
|
|
4135
|
+
example: '["train/sampleBatch", [{"state": [0], "reward": 1}, {"state": [1], "reward": 0}], 2]'
|
|
4129
4136
|
},
|
|
4130
4137
|
"train/computeReturns": {
|
|
4131
4138
|
module: "train",
|
|
@@ -4139,7 +4146,7 @@ var TRAIN_OPERATORS = {
|
|
|
4139
4146
|
{ name: "rewards", type: "array", description: "Array of rewards" },
|
|
4140
4147
|
{ name: "gamma", type: "number", description: "Discount factor" }
|
|
4141
4148
|
],
|
|
4142
|
-
example: '["train/computeReturns",
|
|
4149
|
+
example: '["train/computeReturns", [1, 0, 1], 0.99]'
|
|
4143
4150
|
},
|
|
4144
4151
|
"train/computeAdvantages": {
|
|
4145
4152
|
module: "train",
|
|
@@ -4154,7 +4161,7 @@ var TRAIN_OPERATORS = {
|
|
|
4154
4161
|
{ name: "values", type: "tensor", description: "Value estimates" },
|
|
4155
4162
|
{ name: "config", type: "object", description: "Config with gamma, lambda" }
|
|
4156
4163
|
],
|
|
4157
|
-
example: '["train/computeAdvantages",
|
|
4164
|
+
example: '["train/computeAdvantages", [1, 0, 1], [0.5, 0.4, 0.3], { "gamma": 0.99, "lambda": 0.95 }]'
|
|
4158
4165
|
},
|
|
4159
4166
|
// ============================================================================
|
|
4160
4167
|
// ML lifecycle effects (bare aliases invoked by std ML behaviors)
|
|
@@ -4172,7 +4179,7 @@ var TRAIN_OPERATORS = {
|
|
|
4172
4179
|
{ name: "data", type: "array", description: "Training data (optional)" },
|
|
4173
4180
|
{ name: "config", type: "object", description: "Training config (optional)" }
|
|
4174
4181
|
],
|
|
4175
|
-
example: '["train", "
|
|
4182
|
+
example: '["train", {"layers": [{"type": "dense", "units": 2}]}, [[0, 1], [1, 0]], { "epochs": 100 }]'
|
|
4176
4183
|
},
|
|
4177
4184
|
"evaluate": {
|
|
4178
4185
|
module: "train",
|
|
@@ -4186,7 +4193,7 @@ var TRAIN_OPERATORS = {
|
|
|
4186
4193
|
{ name: "model", type: "nn/module", description: "The neural network module" },
|
|
4187
4194
|
{ name: "testCases", type: "array", description: "Test cases (optional)" }
|
|
4188
4195
|
],
|
|
4189
|
-
example: '["evaluate", "
|
|
4196
|
+
example: '["evaluate", {"layers": [{"type": "dense", "units": 2}]}, [{"input": [0], "expected": [1]}]]'
|
|
4190
4197
|
},
|
|
4191
4198
|
"checkpoint/save": {
|
|
4192
4199
|
module: "train",
|
|
@@ -4200,7 +4207,7 @@ var TRAIN_OPERATORS = {
|
|
|
4200
4207
|
{ name: "model", type: "nn/module", description: "The neural network module" },
|
|
4201
4208
|
{ name: "key", type: "string", description: "Checkpoint identifier" }
|
|
4202
4209
|
],
|
|
4203
|
-
example: '["checkpoint/save", "
|
|
4210
|
+
example: '["checkpoint/save", {"layers": [{"type": "dense", "units": 2}]}, "ckpt-1"]'
|
|
4204
4211
|
},
|
|
4205
4212
|
"checkpoint/load": {
|
|
4206
4213
|
module: "train",
|
|
@@ -4213,7 +4220,7 @@ var TRAIN_OPERATORS = {
|
|
|
4213
4220
|
params: [
|
|
4214
4221
|
{ name: "key", type: "string", description: "Checkpoint identifier" }
|
|
4215
4222
|
],
|
|
4216
|
-
example: '["checkpoint/load", "
|
|
4223
|
+
example: '["checkpoint/load", "ckpt-1"]'
|
|
4217
4224
|
}
|
|
4218
4225
|
};
|
|
4219
4226
|
|
|
@@ -4233,7 +4240,7 @@ var GRAPH_OPERATORS = {
|
|
|
4233
4240
|
params: [
|
|
4234
4241
|
{ name: "config", type: "object", description: "Graph construction config (nodes, edges, node-features, edge-features, directed)" }
|
|
4235
4242
|
],
|
|
4236
|
-
example: '["graph/from-entities", { "
|
|
4243
|
+
example: '["graph/from-entities", [{ "age": 30, "score": 0.5 }, { "age": 25, "score": 0.7 }]]'
|
|
4237
4244
|
},
|
|
4238
4245
|
"graph/from-adjacency": {
|
|
4239
4246
|
module: "graph",
|
|
@@ -4247,7 +4254,7 @@ var GRAPH_OPERATORS = {
|
|
|
4247
4254
|
{ name: "adjacency", type: "tensor", description: "Adjacency matrix" },
|
|
4248
4255
|
{ name: "features", type: "tensor", description: "Node feature matrix" }
|
|
4249
4256
|
],
|
|
4250
|
-
example: '["graph/from-adjacency",
|
|
4257
|
+
example: '["graph/from-adjacency", [[0, 1], [1, 0]], [[1.0], [2.0]]]'
|
|
4251
4258
|
},
|
|
4252
4259
|
"graph/from-edge-list": {
|
|
4253
4260
|
module: "graph",
|
|
@@ -4261,7 +4268,7 @@ var GRAPH_OPERATORS = {
|
|
|
4261
4268
|
{ name: "edges", type: "tensor", description: "Edge index tensor [2, num_edges]" },
|
|
4262
4269
|
{ name: "features", type: "tensor", description: "Node feature matrix" }
|
|
4263
4270
|
],
|
|
4264
|
-
example: '["graph/from-edge-list",
|
|
4271
|
+
example: '["graph/from-edge-list", [[0, 1]], [[1.0], [2.0]]]'
|
|
4265
4272
|
},
|
|
4266
4273
|
// ============================================================================
|
|
4267
4274
|
// Transforms
|
|
@@ -4277,7 +4284,7 @@ var GRAPH_OPERATORS = {
|
|
|
4277
4284
|
params: [
|
|
4278
4285
|
{ name: "graph", type: "graph", description: "Input graph" }
|
|
4279
4286
|
],
|
|
4280
|
-
example: '["graph/add-self-loops", "
|
|
4287
|
+
example: '["graph/add-self-loops", ["graph/from-adjacency", [[0, 1], [1, 0]], [[1.0], [2.0]]]]'
|
|
4281
4288
|
},
|
|
4282
4289
|
"graph/to-undirected": {
|
|
4283
4290
|
module: "graph",
|
|
@@ -4290,7 +4297,7 @@ var GRAPH_OPERATORS = {
|
|
|
4290
4297
|
params: [
|
|
4291
4298
|
{ name: "graph", type: "graph", description: "Input graph" }
|
|
4292
4299
|
],
|
|
4293
|
-
example: '["graph/to-undirected", "
|
|
4300
|
+
example: '["graph/to-undirected", ["graph/from-adjacency", [[0, 1], [1, 0]], [[1.0], [2.0]]]]'
|
|
4294
4301
|
},
|
|
4295
4302
|
"graph/subgraph": {
|
|
4296
4303
|
module: "graph",
|
|
@@ -4304,7 +4311,7 @@ var GRAPH_OPERATORS = {
|
|
|
4304
4311
|
{ name: "graph", type: "graph", description: "Input graph" },
|
|
4305
4312
|
{ name: "mask", type: "tensor", description: "Boolean node mask" }
|
|
4306
4313
|
],
|
|
4307
|
-
example: '["graph/subgraph", "
|
|
4314
|
+
example: '["graph/subgraph", ["graph/from-adjacency", [[0, 1], [1, 0]], [[1.0], [2.0]]], [true, false]]'
|
|
4308
4315
|
},
|
|
4309
4316
|
"graph/k-hop": {
|
|
4310
4317
|
module: "graph",
|
|
@@ -4319,7 +4326,7 @@ var GRAPH_OPERATORS = {
|
|
|
4319
4326
|
{ name: "node", type: "number", description: "Center node index" },
|
|
4320
4327
|
{ name: "k", type: "number", description: "Number of hops" }
|
|
4321
4328
|
],
|
|
4322
|
-
example: '["graph/k-hop", "
|
|
4329
|
+
example: '["graph/k-hop", ["graph/from-adjacency", [[0, 1], [1, 0]], [[1.0], [2.0]]], 0, 2]'
|
|
4323
4330
|
},
|
|
4324
4331
|
// ============================================================================
|
|
4325
4332
|
// Accessors
|
|
@@ -4335,7 +4342,7 @@ var GRAPH_OPERATORS = {
|
|
|
4335
4342
|
params: [
|
|
4336
4343
|
{ name: "graph", type: "graph", description: "Input graph" }
|
|
4337
4344
|
],
|
|
4338
|
-
example: '["graph/node-features", "
|
|
4345
|
+
example: '["graph/node-features", ["graph/from-adjacency", [[0, 1], [1, 0]], [[1.0], [2.0]]]]'
|
|
4339
4346
|
},
|
|
4340
4347
|
"graph/edge-index": {
|
|
4341
4348
|
module: "graph",
|
|
@@ -4348,7 +4355,7 @@ var GRAPH_OPERATORS = {
|
|
|
4348
4355
|
params: [
|
|
4349
4356
|
{ name: "graph", type: "graph", description: "Input graph" }
|
|
4350
4357
|
],
|
|
4351
|
-
example: '["graph/edge-index", "
|
|
4358
|
+
example: '["graph/edge-index", ["graph/from-adjacency", [[0, 1], [1, 0]], [[1.0], [2.0]]]]'
|
|
4352
4359
|
},
|
|
4353
4360
|
"graph/edge-features": {
|
|
4354
4361
|
module: "graph",
|
|
@@ -4361,7 +4368,7 @@ var GRAPH_OPERATORS = {
|
|
|
4361
4368
|
params: [
|
|
4362
4369
|
{ name: "graph", type: "graph", description: "Input graph" }
|
|
4363
4370
|
],
|
|
4364
|
-
example: '["graph/edge-features", "
|
|
4371
|
+
example: '["graph/edge-features", ["graph/from-adjacency", [[0, 1], [1, 0]], [[1.0], [2.0]]]]'
|
|
4365
4372
|
},
|
|
4366
4373
|
"graph/num-nodes": {
|
|
4367
4374
|
module: "graph",
|
|
@@ -4374,7 +4381,7 @@ var GRAPH_OPERATORS = {
|
|
|
4374
4381
|
params: [
|
|
4375
4382
|
{ name: "graph", type: "graph", description: "Input graph" }
|
|
4376
4383
|
],
|
|
4377
|
-
example: '["graph/num-nodes", "
|
|
4384
|
+
example: '["graph/num-nodes", ["graph/from-adjacency", [[0, 1], [1, 0]], [[1.0], [2.0]]]]'
|
|
4378
4385
|
},
|
|
4379
4386
|
"graph/num-edges": {
|
|
4380
4387
|
module: "graph",
|
|
@@ -4387,7 +4394,7 @@ var GRAPH_OPERATORS = {
|
|
|
4387
4394
|
params: [
|
|
4388
4395
|
{ name: "graph", type: "graph", description: "Input graph" }
|
|
4389
4396
|
],
|
|
4390
|
-
example: '["graph/num-edges", "
|
|
4397
|
+
example: '["graph/num-edges", ["graph/from-adjacency", [[0, 1], [1, 0]], [[1.0], [2.0]]]]'
|
|
4391
4398
|
},
|
|
4392
4399
|
"graph/degree": {
|
|
4393
4400
|
module: "graph",
|
|
@@ -4400,7 +4407,7 @@ var GRAPH_OPERATORS = {
|
|
|
4400
4407
|
params: [
|
|
4401
4408
|
{ name: "graph", type: "graph", description: "Input graph" }
|
|
4402
4409
|
],
|
|
4403
|
-
example: '["graph/degree", "
|
|
4410
|
+
example: '["graph/degree", ["graph/from-adjacency", [[0, 1], [1, 0]], [[1.0], [2.0]]]]'
|
|
4404
4411
|
},
|
|
4405
4412
|
// ============================================================================
|
|
4406
4413
|
// Batching
|
|
@@ -4416,7 +4423,7 @@ var GRAPH_OPERATORS = {
|
|
|
4416
4423
|
params: [
|
|
4417
4424
|
{ name: "graphs", type: "array", description: "List of graphs" }
|
|
4418
4425
|
],
|
|
4419
|
-
example: '["graph/batch", "
|
|
4426
|
+
example: '["graph/batch", [["graph/from-adjacency", [[0, 1], [1, 0]], [[1.0], [2.0]]]]]'
|
|
4420
4427
|
}
|
|
4421
4428
|
};
|
|
4422
4429
|
|
|
@@ -4437,7 +4444,7 @@ var CONTRACT_OPERATORS = {
|
|
|
4437
4444
|
{ name: "tensor", type: "tensor", description: "Input tensor" },
|
|
4438
4445
|
{ name: "contract", type: "object", description: "Input contract spec" }
|
|
4439
4446
|
],
|
|
4440
|
-
example: '["contract/validate-input",
|
|
4447
|
+
example: '["contract/validate-input", [0.5, 0.7], {"ranges": {"0": {"min": 0, "max": 1}, "1": {"min": 0, "max": 1}}}]'
|
|
4441
4448
|
},
|
|
4442
4449
|
"contract/validate-output": {
|
|
4443
4450
|
module: "contract",
|
|
@@ -4451,7 +4458,7 @@ var CONTRACT_OPERATORS = {
|
|
|
4451
4458
|
{ name: "tensor", type: "tensor", description: "Output tensor" },
|
|
4452
4459
|
{ name: "contract", type: "object", description: "Output contract spec" }
|
|
4453
4460
|
],
|
|
4454
|
-
example: '["contract/validate-output",
|
|
4461
|
+
example: '["contract/validate-output", [0.5, 0.7], {"ranges": {"0": {"min": 0, "max": 1}, "1": {"min": 0, "max": 1}}}]'
|
|
4455
4462
|
},
|
|
4456
4463
|
"contract/clamp-output": {
|
|
4457
4464
|
module: "contract",
|
|
@@ -4465,7 +4472,7 @@ var CONTRACT_OPERATORS = {
|
|
|
4465
4472
|
{ name: "tensor", type: "tensor", description: "Output tensor" },
|
|
4466
4473
|
{ name: "contract", type: "object", description: "Output contract spec" }
|
|
4467
4474
|
],
|
|
4468
|
-
example: '["contract/clamp-output",
|
|
4475
|
+
example: '["contract/clamp-output", [0.5, 1.7], {"ranges": {"0": {"min": 0, "max": 1}, "1": {"min": 0, "max": 1}}}]'
|
|
4469
4476
|
},
|
|
4470
4477
|
"contract/violations": {
|
|
4471
4478
|
module: "contract",
|
|
@@ -4479,7 +4486,7 @@ var CONTRACT_OPERATORS = {
|
|
|
4479
4486
|
{ name: "tensor", type: "tensor", description: "Tensor to check" },
|
|
4480
4487
|
{ name: "contract", type: "object", description: "Contract spec" }
|
|
4481
4488
|
],
|
|
4482
|
-
example: '["contract/violations",
|
|
4489
|
+
example: '["contract/violations", [0.5, 1.7], {"ranges": {"0": {"min": 0, "max": 1}, "1": {"min": 0, "max": 1}}}]'
|
|
4483
4490
|
},
|
|
4484
4491
|
// ============================================================================
|
|
4485
4492
|
// Conversion
|
|
@@ -4496,7 +4503,7 @@ var CONTRACT_OPERATORS = {
|
|
|
4496
4503
|
{ name: "entity", type: "object", description: "Entity data" },
|
|
4497
4504
|
{ name: "contract", type: "object", description: "Input contract mapping fields to dims" }
|
|
4498
4505
|
],
|
|
4499
|
-
example: '["contract/entity-to-tensor", "
|
|
4506
|
+
example: '["contract/entity-to-tensor", {"price": 10, "qty": 2}, {"fields": ["price", "qty"]}]'
|
|
4500
4507
|
},
|
|
4501
4508
|
"contract/tensor-to-payload": {
|
|
4502
4509
|
module: "contract",
|
|
@@ -4510,7 +4517,7 @@ var CONTRACT_OPERATORS = {
|
|
|
4510
4517
|
{ name: "tensor", type: "tensor", description: "Output tensor" },
|
|
4511
4518
|
{ name: "contract", type: "object", description: "Output contract mapping dims to fields" }
|
|
4512
4519
|
],
|
|
4513
|
-
example: '["contract/tensor-to-payload",
|
|
4520
|
+
example: '["contract/tensor-to-payload", [0.5, 0.7], {"fields": ["price", "qty"]}]'
|
|
4514
4521
|
}
|
|
4515
4522
|
};
|
|
4516
4523
|
|
|
@@ -4531,7 +4538,7 @@ var DATA_OPERATORS = {
|
|
|
4531
4538
|
{ name: "entities", type: "array", description: "Entity collection" },
|
|
4532
4539
|
{ name: "contracts", type: "object", description: "Input/output contract pair" }
|
|
4533
4540
|
],
|
|
4534
|
-
example: '["data/dataset", "
|
|
4541
|
+
example: '["data/dataset", [{"x": 1, "y": 2}], {"input": {"fields": ["x"]}, "output": {"fields": ["y"]}}]'
|
|
4535
4542
|
},
|
|
4536
4543
|
"data/dataloader": {
|
|
4537
4544
|
module: "data",
|
|
@@ -4545,7 +4552,7 @@ var DATA_OPERATORS = {
|
|
|
4545
4552
|
{ name: "dataset", type: "object", description: "Dataset" },
|
|
4546
4553
|
{ name: "config", type: "object", description: "Config with batch_size, shuffle, etc." }
|
|
4547
4554
|
],
|
|
4548
|
-
example: '["data/dataloader", "
|
|
4555
|
+
example: '["data/dataloader", ["data/dataset", [[1, 2], [3, 4], [5, 6]], {}], { "batch-size": 2, "shuffle": true }]'
|
|
4549
4556
|
},
|
|
4550
4557
|
"data/split": {
|
|
4551
4558
|
module: "data",
|
|
@@ -4559,7 +4566,7 @@ var DATA_OPERATORS = {
|
|
|
4559
4566
|
{ name: "dataset", type: "object", description: "Dataset" },
|
|
4560
4567
|
{ name: "config", type: "object", description: "Split config, e.g. { trainRatio: 0.8 }" }
|
|
4561
4568
|
],
|
|
4562
|
-
example: '["data/split", "
|
|
4569
|
+
example: '["data/split", ["data/dataset", [1, 2, 3, 4, 5], {}], { "trainRatio": 0.8 }]'
|
|
4563
4570
|
},
|
|
4564
4571
|
// ============================================================================
|
|
4565
4572
|
// Preprocessing
|
|
@@ -4576,7 +4583,7 @@ var DATA_OPERATORS = {
|
|
|
4576
4583
|
{ name: "tensor", type: "tensor", description: "Feature tensor" },
|
|
4577
4584
|
{ name: "config", type: "object", description: "Normalization config (method, per_dim, etc.)" }
|
|
4578
4585
|
],
|
|
4579
|
-
example: '["data/normalize",
|
|
4586
|
+
example: '["data/normalize", [[1, 2], [3, 4]], { "method": "standard" }]'
|
|
4580
4587
|
},
|
|
4581
4588
|
"data/augment": {
|
|
4582
4589
|
module: "data",
|
|
@@ -4590,7 +4597,7 @@ var DATA_OPERATORS = {
|
|
|
4590
4597
|
{ name: "dataset", type: "object", description: "Dataset" },
|
|
4591
4598
|
{ name: "config", type: "object", description: "Augmentation config" }
|
|
4592
4599
|
],
|
|
4593
|
-
example: '["data/augment",
|
|
4600
|
+
example: '["data/augment", [[1.0, 2.0], [3.0, 4.0]], { "flip": true, "rotate": 15 }]'
|
|
4594
4601
|
},
|
|
4595
4602
|
// ============================================================================
|
|
4596
4603
|
// Tokenization & Padding
|
|
@@ -4607,7 +4614,7 @@ var DATA_OPERATORS = {
|
|
|
4607
4614
|
{ name: "text", type: "string", description: "Text to tokenize" },
|
|
4608
4615
|
{ name: "config", type: "object", description: "Tokenizer config (method, vocab_size, max_length)" }
|
|
4609
4616
|
],
|
|
4610
|
-
example: '["data/tokenize", "
|
|
4617
|
+
example: '["data/tokenize", "hello world", { "method": "bpe", "max-length": 512 }]'
|
|
4611
4618
|
},
|
|
4612
4619
|
"data/pad": {
|
|
4613
4620
|
module: "data",
|
|
@@ -4621,7 +4628,7 @@ var DATA_OPERATORS = {
|
|
|
4621
4628
|
{ name: "sequences", type: "array", description: "List of token sequences" },
|
|
4622
4629
|
{ name: "config", type: "object", description: "Padding config (max_length, pad_value)" }
|
|
4623
4630
|
],
|
|
4624
|
-
example: '["data/pad",
|
|
4631
|
+
example: '["data/pad", [[1, 2, 3], [4, 5]], { "max-length": 4, "pad-value": 0 }]'
|
|
4625
4632
|
}
|
|
4626
4633
|
};
|
|
4627
4634
|
|
|
@@ -4731,7 +4738,7 @@ var PROB_OPERATORS = {
|
|
|
4731
4738
|
hasSideEffects: true,
|
|
4732
4739
|
returnType: "void",
|
|
4733
4740
|
params: [{ name: "predicate", type: "boolean", description: "Condition that must hold" }],
|
|
4734
|
-
example: '["prob/condition", [">",
|
|
4741
|
+
example: '["prob/condition", [">", 5, 0]]'
|
|
4735
4742
|
},
|
|
4736
4743
|
"prob/sample": {
|
|
4737
4744
|
module: "prob",
|
|
@@ -4761,7 +4768,7 @@ var PROB_OPERATORS = {
|
|
|
4761
4768
|
{ name: "query", type: "SExpr", description: "Query expression (lazy, value to collect)" },
|
|
4762
4769
|
{ name: "n", type: "number", description: "Number of samples to attempt" }
|
|
4763
4770
|
],
|
|
4764
|
-
example: '["prob/posterior",
|
|
4771
|
+
example: '["prob/posterior", ["prob/gaussian", 0, 1], [0.5], "mu", 5000]'
|
|
4765
4772
|
},
|
|
4766
4773
|
"prob/infer": {
|
|
4767
4774
|
module: "prob",
|
|
@@ -4777,7 +4784,7 @@ var PROB_OPERATORS = {
|
|
|
4777
4784
|
{ name: "query", type: "SExpr", description: "Query expression (lazy)" },
|
|
4778
4785
|
{ name: "n", type: "number", description: "Number of samples to attempt" }
|
|
4779
4786
|
],
|
|
4780
|
-
example: '["prob/infer",
|
|
4787
|
+
example: '["prob/infer", ["prob/gaussian", 0, 1], [0.5], "mu", 5000]'
|
|
4781
4788
|
},
|
|
4782
4789
|
// ========================================
|
|
4783
4790
|
// Statistics
|
|
@@ -4844,7 +4851,7 @@ var PROB_OPERATORS = {
|
|
|
4844
4851
|
{ name: "samples", type: "number[]", description: "Array of numeric samples" },
|
|
4845
4852
|
{ name: "alpha", type: "number", description: "Significance level (e.g., 0.05 for 95% interval)" }
|
|
4846
4853
|
],
|
|
4847
|
-
example: '["prob/credible-interval",
|
|
4854
|
+
example: '["prob/credible-interval", [1, 2, 3, 4, 5], 0.05] // => [lo, hi]'
|
|
4848
4855
|
}
|
|
4849
4856
|
};
|
|
4850
4857
|
|
|
@@ -5032,7 +5039,7 @@ var BROWSER_OPERATORS = {
|
|
|
5032
5039
|
kind: "custom",
|
|
5033
5040
|
produces: "string"
|
|
5034
5041
|
},
|
|
5035
|
-
example: '["browser/clipboard-write", "
|
|
5042
|
+
example: '["browser/clipboard-write", "https://example.com/invite/abc", { "emit": { "success": "COPIED", "failure": "COPY_DENIED" } }]'
|
|
5036
5043
|
},
|
|
5037
5044
|
"browser/push-subscribe": {
|
|
5038
5045
|
module: "browser",
|
|
@@ -5829,7 +5836,7 @@ var LLM_OPERATORS = {
|
|
|
5829
5836
|
{ name: "messages", type: { kind: "array", of: "LlmMessage" }, description: "Conversation messages" },
|
|
5830
5837
|
{ name: "tools", type: { kind: "array", of: "LlmToolDef" }, description: "Tool definitions available to the LLM" }
|
|
5831
5838
|
],
|
|
5832
|
-
example: '["llm/call-tools",
|
|
5839
|
+
example: '["llm/call-tools", [{"role": "user", "content": "What time is it?"}], [{"name": "getTime", "description": "Get current time", "parameters": {}}]]'
|
|
5833
5840
|
},
|
|
5834
5841
|
"llm/embed": {
|
|
5835
5842
|
module: "llm",
|
|
@@ -5853,7 +5860,7 @@ var LLM_OPERATORS = {
|
|
|
5853
5860
|
hasSideEffects: false,
|
|
5854
5861
|
returnType: "number",
|
|
5855
5862
|
params: [],
|
|
5856
|
-
example: '["llm/token-count"] => 12450'
|
|
5863
|
+
example: '["llm/token-count"] // => 12450'
|
|
5857
5864
|
},
|
|
5858
5865
|
"llm/switch": {
|
|
5859
5866
|
module: "llm",
|
|
@@ -5909,7 +5916,7 @@ var WORKSPACE_OPERATORS = {
|
|
|
5909
5916
|
{ name: "name", type: "string", description: "Orbital name" },
|
|
5910
5917
|
{ name: "def", type: { kind: "entityRef" }, description: "Orbital definition to write" }
|
|
5911
5918
|
],
|
|
5912
|
-
example: '["workspace/write-orbital", "ProductOrbital",
|
|
5919
|
+
example: '["workspace/write-orbital", "ProductOrbital", {"name": "ProductOrbital"}]'
|
|
5913
5920
|
},
|
|
5914
5921
|
"workspace/read-file": {
|
|
5915
5922
|
module: "workspace",
|
|
@@ -5934,7 +5941,7 @@ var WORKSPACE_OPERATORS = {
|
|
|
5934
5941
|
{ name: "path", type: "string", description: "File path relative to workspace root" },
|
|
5935
5942
|
{ name: "content", type: "string", description: "File content" }
|
|
5936
5943
|
],
|
|
5937
|
-
example: '["workspace/write-file", "orbitals/Product.orb",
|
|
5944
|
+
example: '["workspace/write-file", "orbitals/Product.orb", {"orbitals": []}]'
|
|
5938
5945
|
},
|
|
5939
5946
|
"workspace/exists": {
|
|
5940
5947
|
module: "workspace",
|
|
@@ -5956,7 +5963,7 @@ var WORKSPACE_OPERATORS = {
|
|
|
5956
5963
|
hasSideEffects: false,
|
|
5957
5964
|
returnType: "array",
|
|
5958
5965
|
params: [],
|
|
5959
|
-
example: '["workspace/list-orbitals"] => ["ProductOrbital", "CartOrbital"]'
|
|
5966
|
+
example: '["workspace/list-orbitals"] // => ["ProductOrbital", "CartOrbital"]'
|
|
5960
5967
|
},
|
|
5961
5968
|
"workspace/read-schema": {
|
|
5962
5969
|
module: "workspace",
|
|
@@ -5978,7 +5985,7 @@ var WORKSPACE_OPERATORS = {
|
|
|
5978
5985
|
hasSideEffects: true,
|
|
5979
5986
|
returnType: "void",
|
|
5980
5987
|
params: [{ name: "schema", type: { kind: "entityRef" }, description: "Composed schema" }],
|
|
5981
|
-
example: '["workspace/write-schema",
|
|
5988
|
+
example: '["workspace/write-schema", {"orbitals": [{"name": "ProductOrbital"}]}]'
|
|
5982
5989
|
},
|
|
5983
5990
|
"workspace/read-plan": {
|
|
5984
5991
|
module: "workspace",
|
|
@@ -6000,7 +6007,7 @@ var WORKSPACE_OPERATORS = {
|
|
|
6000
6007
|
hasSideEffects: true,
|
|
6001
6008
|
returnType: "void",
|
|
6002
6009
|
params: [{ name: "snapshot", type: { kind: "object", fields: { id: "string", status: "string" } }, description: "Plan snapshot" }],
|
|
6003
|
-
example: '["workspace/write-plan",
|
|
6010
|
+
example: '["workspace/write-plan", ["create entity", "add list page"]]'
|
|
6004
6011
|
},
|
|
6005
6012
|
"workspace/archive-orbital": {
|
|
6006
6013
|
module: "workspace",
|
|
@@ -6040,7 +6047,7 @@ var SESSION_OPERATORS = {
|
|
|
6040
6047
|
{ name: "orbitalName", type: "string", description: "Orbital name" },
|
|
6041
6048
|
{ name: "spec", type: { kind: "object", fields: { orbitalName: "string", organism: "string", method: "string" } }, description: "Orbital spec" }
|
|
6042
6049
|
],
|
|
6043
|
-
example: '["session/write-spec", "ProductOrbital",
|
|
6050
|
+
example: '["session/write-spec", "ProductOrbital", {"goal": "manage products"}]'
|
|
6044
6051
|
},
|
|
6045
6052
|
"session/read-memory": {
|
|
6046
6053
|
module: "session",
|
|
@@ -6065,7 +6072,7 @@ var SESSION_OPERATORS = {
|
|
|
6065
6072
|
{ name: "orbitalName", type: "string", description: "Orbital name" },
|
|
6066
6073
|
{ name: "memory", type: { kind: "object", fields: { entityName: "string", notes: { kind: "array", of: "string" } }, open: true }, description: "Orbital memory" }
|
|
6067
6074
|
],
|
|
6068
|
-
example: '["session/write-memory", "ProductOrbital",
|
|
6075
|
+
example: '["session/write-memory", "ProductOrbital", {"notes": ["initial draft"]}]'
|
|
6069
6076
|
},
|
|
6070
6077
|
"session/read-history": {
|
|
6071
6078
|
module: "session",
|
|
@@ -6090,7 +6097,7 @@ var SESSION_OPERATORS = {
|
|
|
6090
6097
|
{ name: "orbitalName", type: "string", description: "Orbital name" },
|
|
6091
6098
|
{ name: "entry", type: { kind: "object", fields: { role: "string", content: "string" } }, description: "History entry" }
|
|
6092
6099
|
],
|
|
6093
|
-
example: '["session/append-history", "ProductOrbital", { role: "user", content: "Add a search bar" }]'
|
|
6100
|
+
example: '["session/append-history", "ProductOrbital", { "role": "user", "content": "Add a search bar" }]'
|
|
6094
6101
|
},
|
|
6095
6102
|
"session/read-errors": {
|
|
6096
6103
|
module: "session",
|
|
@@ -6115,7 +6122,7 @@ var SESSION_OPERATORS = {
|
|
|
6115
6122
|
{ name: "orbitalName", type: "string", description: "Orbital name" },
|
|
6116
6123
|
{ name: "errors", type: { kind: "array", of: "ValidationError" }, description: "Validation errors" }
|
|
6117
6124
|
],
|
|
6118
|
-
example: '["session/write-errors", "ProductOrbital",
|
|
6125
|
+
example: '["session/write-errors", "ProductOrbital", []]'
|
|
6119
6126
|
},
|
|
6120
6127
|
"session/read-analysis": {
|
|
6121
6128
|
module: "session",
|
|
@@ -6190,7 +6197,7 @@ var TRACE_OPERATORS = {
|
|
|
6190
6197
|
{ name: "event", type: "string", description: "Event type name" },
|
|
6191
6198
|
{ name: "payload", type: { kind: "object", fields: {}, open: true }, description: "Event payload", optional: true }
|
|
6192
6199
|
],
|
|
6193
|
-
example: '["trace/emit", "coordinator_state_changed", {
|
|
6200
|
+
example: '["trace/emit", "coordinator_state_changed", {"phase": "planning"}]'
|
|
6194
6201
|
},
|
|
6195
6202
|
"trace/log": {
|
|
6196
6203
|
module: "trace",
|
|
@@ -6245,7 +6252,7 @@ var BEHAVIOR_OPERATORS = {
|
|
|
6245
6252
|
{ name: "orbitalName", type: "string", description: "Canonical orbital name to instantiate" },
|
|
6246
6253
|
{ name: "overrides", type: { kind: "object", fields: { linkedEntity: "string", method: "string" }, open: true }, description: "Override surface: linkedEntity, events, config, fields", optional: true }
|
|
6247
6254
|
],
|
|
6248
|
-
example: '["behavior/instantiate", "std-ecommerce", "ProductOrbital", { linkedEntity: "Product" }]'
|
|
6255
|
+
example: '["behavior/instantiate", "std-ecommerce", "ProductOrbital", { "linkedEntity": "Product" }]'
|
|
6249
6256
|
},
|
|
6250
6257
|
"behavior/call": {
|
|
6251
6258
|
module: "behavior",
|
|
@@ -6275,7 +6282,7 @@ var BEHAVIOR_OPERATORS = {
|
|
|
6275
6282
|
{ name: "palette", type: { kind: "object", fields: { topics: { kind: "array", of: "string" }, hints: { kind: "array", of: "string" } } }, description: "Topic-tree palette + primitive hints" },
|
|
6276
6283
|
{ name: "deltaPrompt", type: "string", description: "Per-orbital instruction prompt" }
|
|
6277
6284
|
],
|
|
6278
|
-
example: '["lolo/emit-body", "PlayerOrbital", { topics: ["game/2d"] }, "player ship with movement"]'
|
|
6285
|
+
example: '["lolo/emit-body", "PlayerOrbital", { "topics": ["game/2d"] }, "player ship with movement"]'
|
|
6279
6286
|
},
|
|
6280
6287
|
"validate/validate": {
|
|
6281
6288
|
module: "behavior",
|
|
@@ -6309,7 +6316,7 @@ var INTEGRATION_OPERATORS = {
|
|
|
6309
6316
|
{ name: "responseSchema", type: { kind: "object", fields: {}, open: true }, description: "JSON Schema the response must satisfy" },
|
|
6310
6317
|
{ name: "body", type: { kind: "object", fields: {}, open: true }, description: "Request body (for POST/PUT)", optional: true }
|
|
6311
6318
|
],
|
|
6312
|
-
example: '["integration/http", "GET", "https://api.github.com/repos/foo/bar", { name: "string", stars: "number" }]'
|
|
6319
|
+
example: '["integration/http", "GET", "https://api.github.com/repos/foo/bar", { "name": "string", "stars": "number" }]'
|
|
6313
6320
|
},
|
|
6314
6321
|
"integration/github-get-repo": {
|
|
6315
6322
|
module: "integration",
|