@almadar/std 16.212.0 → 16.214.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/behaviors/lolo/agent/organisms/std-agent-rabit.lolo +1 -0
- package/behaviors/lolo/infra/atoms/std-notification-center.lolo +19 -1
- package/behaviors/lolo/ui/core/atoms/std-rating-review.lolo +214 -3
- package/behaviors/lolo/ui/core/molecules/ui-data-grid.lolo +13 -0
- package/behaviors/lolo/ui/core/molecules/ui-data-list.lolo +13 -0
- package/behaviors/lolo/ui/core/molecules/ui-table-view.lolo +13 -0
- package/behaviors/lolo/ui/core/organisms/ui-entity-table.lolo +13 -0
- package/behaviors/lolo/ui/game/atoms/ui-canvas-2d.lolo +2 -2
- package/behaviors/lolo/ui/game/atoms/ui-canvas.lolo +2 -2
- package/behaviors/lolo/ui/game/atoms/ui-control-grid.lolo +2 -2
- package/behaviors/lolo/ui/learning/atoms/ui-math-canvas.lolo +2 -2
- package/behaviors/registry/agent/organisms/std-agent-rabit.orb +8 -0
- package/behaviors/registry/infra/atoms/std-notification-center.orb +176 -1
- package/behaviors/registry/ui/core/atoms/std-rating-review.orb +443 -2
- package/behaviors/registry/ui/core/molecules/ui-data-grid.orb +58 -0
- package/behaviors/registry/ui/core/molecules/ui-data-list.orb +58 -0
- package/behaviors/registry/ui/core/molecules/ui-table-view.orb +58 -0
- package/behaviors/registry/ui/core/organisms/ui-entity-table.orb +58 -0
- package/behaviors/registry/ui/game/atoms/ui-canvas-2d.orb +2 -2
- package/behaviors/registry/ui/game/atoms/ui-canvas.orb +2 -2
- package/behaviors/registry/ui/game/atoms/ui-control-grid.orb +2 -2
- package/behaviors/registry/ui/learning/atoms/ui-math-canvas.orb +2 -2
- package/canonical-operators.json +322 -234
- package/dist/behaviors/exports-reader.js +626 -6
- package/dist/behaviors/functions/index.d.ts +27 -13
- package/dist/behaviors/functions/index.js +624 -7
- package/dist/behaviors/index.d.ts +1 -1
- package/dist/behaviors/index.js +627 -7
- package/dist/behaviors/query.js +626 -6
- package/dist/behaviors-embeddings.hash.json +3 -3
- package/dist/behaviors-embeddings.json +1 -1
- package/dist/behaviors-registry.json +293 -309
- package/dist/index.d.ts +1 -1
- package/dist/index.js +824 -208
- package/dist/knob-embeddings.hash.json +3 -3
- package/dist/knob-embeddings.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 +18 -18
- package/dist/modules/data.js +7 -7
- package/dist/modules/graph.js +14 -14
- package/dist/modules/index.js +197 -201
- 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/factory-signatures.json +1 -1
- package/dist/registry.js +197 -201
- package/package.json +2 -2
package/dist/modules/index.js
CHANGED
|
@@ -117,7 +117,7 @@ var CORE_OPERATORS = {
|
|
|
117
117
|
{ name: "a", type: ANY, description: "Left operand" },
|
|
118
118
|
{ name: "b", type: ANY, description: "Right operand" }
|
|
119
119
|
],
|
|
120
|
-
example: '["=", "
|
|
120
|
+
example: '["=", "active", "active"]'
|
|
121
121
|
},
|
|
122
122
|
"==": {
|
|
123
123
|
module: "core",
|
|
@@ -131,7 +131,7 @@ var CORE_OPERATORS = {
|
|
|
131
131
|
{ name: "a", type: ANY, description: "Left operand" },
|
|
132
132
|
{ name: "b", type: ANY, description: "Right operand" }
|
|
133
133
|
],
|
|
134
|
-
example: '["==", "
|
|
134
|
+
example: '["==", "active", "active"]'
|
|
135
135
|
},
|
|
136
136
|
"!=": {
|
|
137
137
|
module: "core",
|
|
@@ -145,7 +145,7 @@ var CORE_OPERATORS = {
|
|
|
145
145
|
{ name: "a", type: ANY, description: "Left operand" },
|
|
146
146
|
{ name: "b", type: ANY, description: "Right operand" }
|
|
147
147
|
],
|
|
148
|
-
example: '["!=",
|
|
148
|
+
example: '["!=", 1, null]'
|
|
149
149
|
},
|
|
150
150
|
"<": {
|
|
151
151
|
module: "core",
|
|
@@ -159,7 +159,7 @@ var CORE_OPERATORS = {
|
|
|
159
159
|
{ name: "a", type: NUMBER, description: "Left operand" },
|
|
160
160
|
{ name: "b", type: NUMBER, description: "Right operand" }
|
|
161
161
|
],
|
|
162
|
-
example: '["<",
|
|
162
|
+
example: '["<", 5, 10]'
|
|
163
163
|
},
|
|
164
164
|
">": {
|
|
165
165
|
module: "core",
|
|
@@ -173,7 +173,7 @@ var CORE_OPERATORS = {
|
|
|
173
173
|
{ name: "a", type: NUMBER, description: "Left operand" },
|
|
174
174
|
{ name: "b", type: NUMBER, description: "Right operand" }
|
|
175
175
|
],
|
|
176
|
-
example: '[">",
|
|
176
|
+
example: '[">", 10, 0]'
|
|
177
177
|
},
|
|
178
178
|
"<=": {
|
|
179
179
|
module: "core",
|
|
@@ -187,7 +187,7 @@ var CORE_OPERATORS = {
|
|
|
187
187
|
{ name: "a", type: NUMBER, description: "Left operand" },
|
|
188
188
|
{ name: "b", type: NUMBER, description: "Right operand" }
|
|
189
189
|
],
|
|
190
|
-
example: '["<=",
|
|
190
|
+
example: '["<=", 100, 100]'
|
|
191
191
|
},
|
|
192
192
|
">=": {
|
|
193
193
|
module: "core",
|
|
@@ -201,7 +201,7 @@ var CORE_OPERATORS = {
|
|
|
201
201
|
{ name: "a", type: NUMBER, description: "Left operand" },
|
|
202
202
|
{ name: "b", type: NUMBER, description: "Right operand" }
|
|
203
203
|
],
|
|
204
|
-
example: '[">=",
|
|
204
|
+
example: '[">=", 18, 18]'
|
|
205
205
|
},
|
|
206
206
|
// --- logic ------------------------------------------------------------------
|
|
207
207
|
and: {
|
|
@@ -214,7 +214,7 @@ var CORE_OPERATORS = {
|
|
|
214
214
|
returnType: "boolean",
|
|
215
215
|
returnSemantics: "last-truthy-of-args",
|
|
216
216
|
params: [{ name: "...conds", type: BOOLEAN, description: "Boolean expressions to AND" }],
|
|
217
|
-
example: '["and", ["=", "
|
|
217
|
+
example: '["and", ["=", "active", "active"], [">", 5, 0]]'
|
|
218
218
|
},
|
|
219
219
|
or: {
|
|
220
220
|
module: "core",
|
|
@@ -226,7 +226,7 @@ var CORE_OPERATORS = {
|
|
|
226
226
|
returnType: "boolean",
|
|
227
227
|
returnSemantics: "first-truthy-of-args",
|
|
228
228
|
params: [{ name: "...conds", type: BOOLEAN, description: "Boolean expressions to OR" }],
|
|
229
|
-
example: '["or", ["=", "
|
|
229
|
+
example: '["or", ["=", "admin", "user"], ["=", "admin", "owner"]]'
|
|
230
230
|
},
|
|
231
231
|
not: {
|
|
232
232
|
module: "core",
|
|
@@ -237,7 +237,7 @@ var CORE_OPERATORS = {
|
|
|
237
237
|
hasSideEffects: false,
|
|
238
238
|
returnType: "boolean",
|
|
239
239
|
params: [{ name: "cond", type: BOOLEAN, description: "Boolean to negate" }],
|
|
240
|
-
example: '["not",
|
|
240
|
+
example: '["not", false]'
|
|
241
241
|
},
|
|
242
242
|
if: {
|
|
243
243
|
module: "core",
|
|
@@ -253,7 +253,7 @@ var CORE_OPERATORS = {
|
|
|
253
253
|
{ name: "then", type: ANY, description: "Value or effect if true" },
|
|
254
254
|
{ name: "else", type: ANY, description: "Value or effect if false" }
|
|
255
255
|
],
|
|
256
|
-
example: '["if", [">",
|
|
256
|
+
example: '["if", [">", 5, 0], "alive", "dead"]'
|
|
257
257
|
},
|
|
258
258
|
// --- control ----------------------------------------------------------------
|
|
259
259
|
let: {
|
|
@@ -361,7 +361,7 @@ var CORE_OPERATORS = {
|
|
|
361
361
|
{ name: "event", type: EVENT_KEY, description: "Event key" },
|
|
362
362
|
{ name: "payload", type: ENTITY_REF, description: "Optional payload", optional: true }
|
|
363
363
|
],
|
|
364
|
-
example: '["emit", "PLAYER_DIED", { "playerId": "
|
|
364
|
+
example: '["emit", "PLAYER_DIED", { "playerId": "p1" }]',
|
|
365
365
|
effect: {
|
|
366
366
|
kind: "emit",
|
|
367
367
|
produces: {
|
|
@@ -396,7 +396,7 @@ var CORE_OPERATORS = {
|
|
|
396
396
|
optional: true
|
|
397
397
|
}
|
|
398
398
|
],
|
|
399
|
-
example: '["persist", "create", "Task", { "title": "
|
|
399
|
+
example: '["persist", "create", "Task", { "title": "Buy milk" }, { "emit": { "success": "TASK_CREATED" } }]',
|
|
400
400
|
effect: {
|
|
401
401
|
kind: "persist",
|
|
402
402
|
// Action-discriminated union. The compiler narrows at the call site
|
|
@@ -450,7 +450,7 @@ var CORE_OPERATORS = {
|
|
|
450
450
|
optional: true
|
|
451
451
|
}
|
|
452
452
|
],
|
|
453
|
-
example: '["navigate", "/tasks/:id", { "id": "
|
|
453
|
+
example: '["navigate", "/tasks/:id", { "id": "t1" }]',
|
|
454
454
|
effect: { kind: "navigate" }
|
|
455
455
|
},
|
|
456
456
|
"navigate-back": {
|
|
@@ -507,7 +507,7 @@ var CORE_OPERATORS = {
|
|
|
507
507
|
optional: true
|
|
508
508
|
}
|
|
509
509
|
],
|
|
510
|
-
example: '["spawn", "Bullet", { "x":
|
|
510
|
+
example: '["spawn", "Bullet", { "x": 10, "y": 20 }]',
|
|
511
511
|
effect: { kind: "spawn" }
|
|
512
512
|
},
|
|
513
513
|
despawn: {
|
|
@@ -552,7 +552,7 @@ var CORE_OPERATORS = {
|
|
|
552
552
|
optional: true
|
|
553
553
|
}
|
|
554
554
|
],
|
|
555
|
-
example: '["fetch", "Task", { "id": "
|
|
555
|
+
example: '["fetch", "Task", { "id": "t1", "emit": { "success": "TASK_LOADED" } }]',
|
|
556
556
|
effect: {
|
|
557
557
|
kind: "fetch",
|
|
558
558
|
// Call-site-discriminated union: options.id present -> single entity;
|
|
@@ -615,7 +615,7 @@ var CORE_OPERATORS = {
|
|
|
615
615
|
optional: true
|
|
616
616
|
}
|
|
617
617
|
],
|
|
618
|
-
example: '["send-server", "CHAT_MESSAGE", { "text": "
|
|
618
|
+
example: '["send-server", "CHAT_MESSAGE", { "text": "hello" }]',
|
|
619
619
|
effect: { kind: "send-server" }
|
|
620
620
|
},
|
|
621
621
|
ref: {
|
|
@@ -682,7 +682,7 @@ var CORE_OPERATORS = {
|
|
|
682
682
|
optional: true
|
|
683
683
|
}
|
|
684
684
|
],
|
|
685
|
-
example: '["call-service", "llm", "generate", { "userPrompt": "
|
|
685
|
+
example: '["call-service", "llm", "generate", { "userPrompt": "Hello" }, { "emit": { "success": "LlmCompleted", "failure": "LlmFailed" } }]',
|
|
686
686
|
effect: {
|
|
687
687
|
kind: "call-service",
|
|
688
688
|
// TODO(entity-v2): narrow to the declared service return type once
|
|
@@ -1107,7 +1107,7 @@ var STR_OPERATORS = {
|
|
|
1107
1107
|
hasSideEffects: false,
|
|
1108
1108
|
returnType: "string",
|
|
1109
1109
|
params: [{ name: "strings", type: "string", description: "Strings to concatenate" }],
|
|
1110
|
-
example: '["str/concat", "/users/", "
|
|
1110
|
+
example: '["str/concat", "/users/", "123"] // => "/users/123"'
|
|
1111
1111
|
},
|
|
1112
1112
|
"str/upper": {
|
|
1113
1113
|
module: "str",
|
|
@@ -1625,7 +1625,7 @@ var ARRAY_OPERATORS = {
|
|
|
1625
1625
|
{ name: "key", type: "string", description: "Field to sort by (for objects)", optional: true },
|
|
1626
1626
|
{ name: "dir", type: "string", description: '"asc" or "desc"', optional: true, defaultValue: "asc" }
|
|
1627
1627
|
],
|
|
1628
|
-
example: '["array/sort", "
|
|
1628
|
+
example: '["array/sort", [{"price": 3}, {"price": 9}, {"price": 5}], "price", "desc"]'
|
|
1629
1629
|
},
|
|
1630
1630
|
"array/shuffle": {
|
|
1631
1631
|
module: "array",
|
|
@@ -1717,7 +1717,7 @@ var ARRAY_OPERATORS = {
|
|
|
1717
1717
|
{ name: "arr", type: "array", description: "The array" },
|
|
1718
1718
|
{ name: "pred", type: "lambda", description: "Predicate function" }
|
|
1719
1719
|
],
|
|
1720
|
-
example: '["array/find", "
|
|
1720
|
+
example: '["array/find", [{"status": "active"}, {"status": "archived"}], ["fn", "x", ["=", "@x.status", "active"]]]'
|
|
1721
1721
|
},
|
|
1722
1722
|
"array/findIndex": {
|
|
1723
1723
|
module: "array",
|
|
@@ -1733,7 +1733,7 @@ var ARRAY_OPERATORS = {
|
|
|
1733
1733
|
{ name: "arr", type: "array", description: "The array" },
|
|
1734
1734
|
{ name: "pred", type: "lambda", description: "Predicate function" }
|
|
1735
1735
|
],
|
|
1736
|
-
example: '["array/findIndex", "
|
|
1736
|
+
example: '["array/findIndex", [{"status": "active"}, {"status": "archived"}], ["fn", "x", ["=", "@x.status", "active"]]]'
|
|
1737
1737
|
},
|
|
1738
1738
|
"array/filter": {
|
|
1739
1739
|
module: "array",
|
|
@@ -1750,7 +1750,7 @@ var ARRAY_OPERATORS = {
|
|
|
1750
1750
|
{ name: "arr", type: "array", description: "The array" },
|
|
1751
1751
|
{ name: "pred", type: "lambda", description: "Predicate function" }
|
|
1752
1752
|
],
|
|
1753
|
-
example: '["array/filter", "
|
|
1753
|
+
example: '["array/filter", [{"price": 50}, {"price": 150}], ["fn", "x", [">", "@x.price", 100]]]'
|
|
1754
1754
|
},
|
|
1755
1755
|
"array/reject": {
|
|
1756
1756
|
module: "array",
|
|
@@ -1767,7 +1767,7 @@ var ARRAY_OPERATORS = {
|
|
|
1767
1767
|
{ name: "arr", type: "array", description: "The array" },
|
|
1768
1768
|
{ name: "pred", type: "lambda", description: "Predicate function" }
|
|
1769
1769
|
],
|
|
1770
|
-
example: '["array/reject", "
|
|
1770
|
+
example: '["array/reject", [{"status": "active"}, {"status": "deleted"}], ["fn", "x", ["=", "@x.status", "deleted"]]]'
|
|
1771
1771
|
},
|
|
1772
1772
|
"array/map": {
|
|
1773
1773
|
module: "array",
|
|
@@ -1784,7 +1784,7 @@ var ARRAY_OPERATORS = {
|
|
|
1784
1784
|
{ name: "arr", type: "array", description: "The array" },
|
|
1785
1785
|
{ name: "fn", type: "lambda", description: "Transform function" }
|
|
1786
1786
|
],
|
|
1787
|
-
example: '["array/map", "
|
|
1787
|
+
example: '["array/map", [{"price": 100}, {"price": 200}], ["fn", "x", ["*", "@x.price", 1.1]]]'
|
|
1788
1788
|
},
|
|
1789
1789
|
"array/reduce": {
|
|
1790
1790
|
module: "array",
|
|
@@ -1802,7 +1802,7 @@ var ARRAY_OPERATORS = {
|
|
|
1802
1802
|
{ name: "init", type: "any", description: "Initial accumulator value" },
|
|
1803
1803
|
{ name: "fn", type: "lambda", description: "Reducer function (acc, item) => newAcc" }
|
|
1804
1804
|
],
|
|
1805
|
-
example: '["array/reduce", "
|
|
1805
|
+
example: '["array/reduce", [{"price": 10}, {"price": 25}], 0, ["fn", ["acc", "x"], ["+", "@acc", "@x.price"]]]'
|
|
1806
1806
|
},
|
|
1807
1807
|
"array/every": {
|
|
1808
1808
|
module: "array",
|
|
@@ -1818,7 +1818,7 @@ var ARRAY_OPERATORS = {
|
|
|
1818
1818
|
{ name: "arr", type: "array", description: "The array" },
|
|
1819
1819
|
{ name: "pred", type: "lambda", description: "Predicate function" }
|
|
1820
1820
|
],
|
|
1821
|
-
example: '["array/every", "
|
|
1821
|
+
example: '["array/every", [{"price": 5}, {"price": 10}], ["fn", "x", [">", "@x.price", 0]]]'
|
|
1822
1822
|
},
|
|
1823
1823
|
"array/some": {
|
|
1824
1824
|
module: "array",
|
|
@@ -1834,7 +1834,7 @@ var ARRAY_OPERATORS = {
|
|
|
1834
1834
|
{ name: "arr", type: "array", description: "The array" },
|
|
1835
1835
|
{ name: "pred", type: "lambda", description: "Predicate function" }
|
|
1836
1836
|
],
|
|
1837
|
-
example: '["array/some", "
|
|
1837
|
+
example: '["array/some", [{"status": "archived"}, {"status": "active"}], ["fn", "x", ["=", "@x.status", "active"]]]'
|
|
1838
1838
|
},
|
|
1839
1839
|
"array/count": {
|
|
1840
1840
|
module: "array",
|
|
@@ -1850,7 +1850,7 @@ var ARRAY_OPERATORS = {
|
|
|
1850
1850
|
{ name: "arr", type: "array", description: "The array" },
|
|
1851
1851
|
{ name: "pred", type: "lambda", description: "Predicate function", optional: true }
|
|
1852
1852
|
],
|
|
1853
|
-
example: '["array/count", "
|
|
1853
|
+
example: '["array/count", [{"status": "done"}, {"status": "todo"}], ["fn", "t", ["=", "@t.status", "done"]]]'
|
|
1854
1854
|
},
|
|
1855
1855
|
"array/sum": {
|
|
1856
1856
|
module: "array",
|
|
@@ -1864,7 +1864,7 @@ var ARRAY_OPERATORS = {
|
|
|
1864
1864
|
{ name: "arr", type: "array", description: "The array" },
|
|
1865
1865
|
{ name: "key", type: "string", description: "Field to sum", optional: true }
|
|
1866
1866
|
],
|
|
1867
|
-
example: '["array/sum", "
|
|
1867
|
+
example: '["array/sum", [{"price": 10}, {"price": 25}], "price"]'
|
|
1868
1868
|
},
|
|
1869
1869
|
"array/avg": {
|
|
1870
1870
|
module: "array",
|
|
@@ -1878,7 +1878,7 @@ var ARRAY_OPERATORS = {
|
|
|
1878
1878
|
{ name: "arr", type: "array", description: "The array" },
|
|
1879
1879
|
{ name: "key", type: "string", description: "Field to average", optional: true }
|
|
1880
1880
|
],
|
|
1881
|
-
example: '["array/avg", "
|
|
1881
|
+
example: '["array/avg", [{"score": 80}, {"score": 90}], "score"]'
|
|
1882
1882
|
},
|
|
1883
1883
|
"array/min": {
|
|
1884
1884
|
module: "array",
|
|
@@ -1892,7 +1892,7 @@ var ARRAY_OPERATORS = {
|
|
|
1892
1892
|
{ name: "arr", type: "array", description: "The array" },
|
|
1893
1893
|
{ name: "key", type: "string", description: "Field to compare", optional: true }
|
|
1894
1894
|
],
|
|
1895
|
-
example: '["array/min", "
|
|
1895
|
+
example: '["array/min", [{"price": 3}, {"price": 9}], "price"]'
|
|
1896
1896
|
},
|
|
1897
1897
|
"array/max": {
|
|
1898
1898
|
module: "array",
|
|
@@ -1906,7 +1906,7 @@ var ARRAY_OPERATORS = {
|
|
|
1906
1906
|
{ name: "arr", type: "array", description: "The array" },
|
|
1907
1907
|
{ name: "key", type: "string", description: "Field to compare", optional: true }
|
|
1908
1908
|
],
|
|
1909
|
-
example: '["array/max", "
|
|
1909
|
+
example: '["array/max", [{"price": 3}, {"price": 9}], "price"]'
|
|
1910
1910
|
},
|
|
1911
1911
|
"array/groupBy": {
|
|
1912
1912
|
module: "array",
|
|
@@ -1920,7 +1920,7 @@ var ARRAY_OPERATORS = {
|
|
|
1920
1920
|
{ name: "arr", type: "array", description: "The array" },
|
|
1921
1921
|
{ name: "key", type: "string", description: "Field to group by" }
|
|
1922
1922
|
],
|
|
1923
|
-
example: '["array/groupBy", "
|
|
1923
|
+
example: '["array/groupBy", [{"status": "new"}, {"status": "done"}], "status"]'
|
|
1924
1924
|
},
|
|
1925
1925
|
"array/partition": {
|
|
1926
1926
|
module: "array",
|
|
@@ -1936,7 +1936,7 @@ var ARRAY_OPERATORS = {
|
|
|
1936
1936
|
{ name: "arr", type: "array", description: "The array" },
|
|
1937
1937
|
{ name: "pred", type: "lambda", description: "Predicate function" }
|
|
1938
1938
|
],
|
|
1939
|
-
example: '["array/partition", "
|
|
1939
|
+
example: '["array/partition", [{"price": 30}, {"price": 80}], ["fn", "x", [">", "@x.price", 50]]]'
|
|
1940
1940
|
},
|
|
1941
1941
|
"array/take": {
|
|
1942
1942
|
module: "array",
|
|
@@ -1950,7 +1950,7 @@ var ARRAY_OPERATORS = {
|
|
|
1950
1950
|
{ name: "arr", type: "array", description: "The array" },
|
|
1951
1951
|
{ name: "n", type: "number", description: "Number of elements" }
|
|
1952
1952
|
],
|
|
1953
|
-
example: '["array/take",
|
|
1953
|
+
example: '["array/take", [1, 2, 3, 4, 5, 6, 7], 5]'
|
|
1954
1954
|
},
|
|
1955
1955
|
"array/drop": {
|
|
1956
1956
|
module: "array",
|
|
@@ -1964,7 +1964,7 @@ var ARRAY_OPERATORS = {
|
|
|
1964
1964
|
{ name: "arr", type: "array", description: "The array" },
|
|
1965
1965
|
{ name: "n", type: "number", description: "Number of elements to skip" }
|
|
1966
1966
|
],
|
|
1967
|
-
example: '["array/drop",
|
|
1967
|
+
example: '["array/drop", [1, 2, 3, 4, 5, 6, 7], 5]'
|
|
1968
1968
|
},
|
|
1969
1969
|
"array/takeLast": {
|
|
1970
1970
|
module: "array",
|
|
@@ -1978,7 +1978,7 @@ var ARRAY_OPERATORS = {
|
|
|
1978
1978
|
{ name: "arr", type: "array", description: "The array" },
|
|
1979
1979
|
{ name: "n", type: "number", description: "Number of elements" }
|
|
1980
1980
|
],
|
|
1981
|
-
example: '["array/takeLast",
|
|
1981
|
+
example: '["array/takeLast", [1, 2, 3, 4, 5], 3]'
|
|
1982
1982
|
},
|
|
1983
1983
|
"array/dropLast": {
|
|
1984
1984
|
module: "array",
|
|
@@ -1992,7 +1992,7 @@ var ARRAY_OPERATORS = {
|
|
|
1992
1992
|
{ name: "arr", type: "array", description: "The array" },
|
|
1993
1993
|
{ name: "n", type: "number", description: "Number of elements to skip" }
|
|
1994
1994
|
],
|
|
1995
|
-
example: '["array/dropLast",
|
|
1995
|
+
example: '["array/dropLast", [1, 2, 3, 4, 5], 2]'
|
|
1996
1996
|
},
|
|
1997
1997
|
"array/cosine": {
|
|
1998
1998
|
module: "array",
|
|
@@ -2006,7 +2006,7 @@ var ARRAY_OPERATORS = {
|
|
|
2006
2006
|
{ name: "a", type: { kind: "array", of: "number" }, description: "First vector" },
|
|
2007
2007
|
{ name: "b", type: { kind: "array", of: "number" }, description: "Second vector" }
|
|
2008
2008
|
],
|
|
2009
|
-
example: '["array/cosine",
|
|
2009
|
+
example: '["array/cosine", [1, 0], [0, 1]]'
|
|
2010
2010
|
},
|
|
2011
2011
|
"array/nearest": {
|
|
2012
2012
|
module: "array",
|
|
@@ -2020,7 +2020,7 @@ var ARRAY_OPERATORS = {
|
|
|
2020
2020
|
{ name: "query", type: { kind: "array", of: "number" }, description: "Query vector" },
|
|
2021
2021
|
{ name: "candidates", type: { kind: "array", of: { kind: "array", of: "number" } }, description: "Candidate vectors to search" }
|
|
2022
2022
|
],
|
|
2023
|
-
example: '["array/nearest",
|
|
2023
|
+
example: '["array/nearest", [1, 0], [[1, 0], [0, 1]]]'
|
|
2024
2024
|
}
|
|
2025
2025
|
};
|
|
2026
2026
|
function getArrayOperators() {
|
|
@@ -2090,7 +2090,7 @@ var OBJECT_OPERATORS = {
|
|
|
2090
2090
|
{ name: "path", type: "string", description: 'Dot-separated path (e.g., "user.name")' },
|
|
2091
2091
|
{ name: "default", type: "any", description: "Default if path not found", optional: true }
|
|
2092
2092
|
],
|
|
2093
|
-
example: '["object/get", "
|
|
2093
|
+
example: '["object/get", {"profile": {"name": "Ann"}}, "profile.name", "Anonymous"]'
|
|
2094
2094
|
},
|
|
2095
2095
|
"object/set": {
|
|
2096
2096
|
module: "object",
|
|
@@ -2105,7 +2105,7 @@ var OBJECT_OPERATORS = {
|
|
|
2105
2105
|
{ name: "path", type: "string", description: "Dot-separated path" },
|
|
2106
2106
|
{ name: "value", type: "any", description: "Value to set" }
|
|
2107
2107
|
],
|
|
2108
|
-
example: '["object/set", "
|
|
2108
|
+
example: '["object/set", {"profile": {"name": "Ann"}}, "profile.name", "John"]'
|
|
2109
2109
|
},
|
|
2110
2110
|
"object/has": {
|
|
2111
2111
|
module: "object",
|
|
@@ -2119,7 +2119,7 @@ var OBJECT_OPERATORS = {
|
|
|
2119
2119
|
{ name: "obj", type: "object", description: "The object" },
|
|
2120
2120
|
{ name: "path", type: "string", description: "Dot-separated path" }
|
|
2121
2121
|
],
|
|
2122
|
-
example: '["object/has", "
|
|
2122
|
+
example: '["object/has", {"profile": {"name": "Ann"}}, "profile.name"]'
|
|
2123
2123
|
},
|
|
2124
2124
|
"object/merge": {
|
|
2125
2125
|
module: "object",
|
|
@@ -2156,7 +2156,7 @@ var OBJECT_OPERATORS = {
|
|
|
2156
2156
|
{ name: "obj", type: "object", description: "The object" },
|
|
2157
2157
|
{ name: "keys", type: "array", description: "Keys to keep" }
|
|
2158
2158
|
],
|
|
2159
|
-
example: '["object/pick", "@
|
|
2159
|
+
example: '["object/pick", {"name": "Ann", "email": "ann@example.com", "age": 30}, ["name", "email"]]'
|
|
2160
2160
|
},
|
|
2161
2161
|
"object/omit": {
|
|
2162
2162
|
module: "object",
|
|
@@ -2170,7 +2170,7 @@ var OBJECT_OPERATORS = {
|
|
|
2170
2170
|
{ name: "obj", type: "object", description: "The object" },
|
|
2171
2171
|
{ name: "keys", type: "array", description: "Keys to exclude" }
|
|
2172
2172
|
],
|
|
2173
|
-
example: '["object/omit", "
|
|
2173
|
+
example: '["object/omit", {"name": "Ann", "password": "x"}, ["password"]]'
|
|
2174
2174
|
},
|
|
2175
2175
|
"object/mapValues": {
|
|
2176
2176
|
module: "object",
|
|
@@ -2186,7 +2186,7 @@ var OBJECT_OPERATORS = {
|
|
|
2186
2186
|
{ name: "obj", type: "object", description: "The object" },
|
|
2187
2187
|
{ name: "fn", type: "lambda", description: "Transform function" }
|
|
2188
2188
|
],
|
|
2189
|
-
example: '["object/mapValues", "
|
|
2189
|
+
example: '["object/mapValues", {"a": 0.5, "b": 0.25}, ["fn", "v", ["*", "@v", 100]]]'
|
|
2190
2190
|
},
|
|
2191
2191
|
"object/mapKeys": {
|
|
2192
2192
|
module: "object",
|
|
@@ -2202,7 +2202,7 @@ var OBJECT_OPERATORS = {
|
|
|
2202
2202
|
{ name: "obj", type: "object", description: "The object" },
|
|
2203
2203
|
{ name: "fn", type: "lambda", description: "Transform function" }
|
|
2204
2204
|
],
|
|
2205
|
-
example: '["object/mapKeys", "
|
|
2205
|
+
example: '["object/mapKeys", {"a": 1, "b": 2}, ["fn", "k", ["str/upper", "@k"]]]'
|
|
2206
2206
|
},
|
|
2207
2207
|
"object/filter": {
|
|
2208
2208
|
module: "object",
|
|
@@ -2218,7 +2218,7 @@ var OBJECT_OPERATORS = {
|
|
|
2218
2218
|
{ name: "obj", type: "object", description: "The object" },
|
|
2219
2219
|
{ name: "pred", type: "lambda", description: "Predicate (key, value) => boolean" }
|
|
2220
2220
|
],
|
|
2221
|
-
example: '["object/filter", "
|
|
2221
|
+
example: '["object/filter", {"a": 1, "b": null}, ["fn", ["k", "v"], ["!=", "@v", null]]]'
|
|
2222
2222
|
},
|
|
2223
2223
|
"object/equals": {
|
|
2224
2224
|
module: "object",
|
|
@@ -2243,7 +2243,7 @@ var OBJECT_OPERATORS = {
|
|
|
2243
2243
|
hasSideEffects: false,
|
|
2244
2244
|
returnType: "any",
|
|
2245
2245
|
params: [{ name: "obj", type: "object", description: "The object" }],
|
|
2246
|
-
example: '["object/clone", "
|
|
2246
|
+
example: '["object/clone", {"a": 1, "b": 2}]'
|
|
2247
2247
|
},
|
|
2248
2248
|
"object/deepClone": {
|
|
2249
2249
|
module: "object",
|
|
@@ -2254,7 +2254,7 @@ var OBJECT_OPERATORS = {
|
|
|
2254
2254
|
hasSideEffects: false,
|
|
2255
2255
|
returnType: "any",
|
|
2256
2256
|
params: [{ name: "obj", type: "object", description: "The object" }],
|
|
2257
|
-
example: '["object/deepClone", "
|
|
2257
|
+
example: '["object/deepClone", {"a": {"b": 2}}]'
|
|
2258
2258
|
},
|
|
2259
2259
|
"path": {
|
|
2260
2260
|
module: "object",
|
|
@@ -2268,7 +2268,7 @@ var OBJECT_OPERATORS = {
|
|
|
2268
2268
|
params: [
|
|
2269
2269
|
{ name: "...segments", type: "string[]", description: "Path segments to join with dots" }
|
|
2270
2270
|
],
|
|
2271
|
-
example: '["path", "formValues", "
|
|
2271
|
+
example: '["path", "formValues", "customerName"] // => "formValues.customerName"'
|
|
2272
2272
|
}
|
|
2273
2273
|
};
|
|
2274
2274
|
function getObjectOperators() {
|
|
@@ -2325,7 +2325,7 @@ var TIME_OPERATORS = {
|
|
|
2325
2325
|
{ name: "date", type: "number", description: "Timestamp" },
|
|
2326
2326
|
{ name: "format", type: "string", description: "Format pattern" }
|
|
2327
2327
|
],
|
|
2328
|
-
example: '["time/format",
|
|
2328
|
+
example: '["time/format", 1700000000000, "MMM DD, YYYY"]'
|
|
2329
2329
|
},
|
|
2330
2330
|
"time/year": {
|
|
2331
2331
|
module: "time",
|
|
@@ -2336,7 +2336,7 @@ var TIME_OPERATORS = {
|
|
|
2336
2336
|
hasSideEffects: false,
|
|
2337
2337
|
returnType: "number",
|
|
2338
2338
|
params: [{ name: "date", type: "number", description: "Timestamp" }],
|
|
2339
|
-
example: '["time/year",
|
|
2339
|
+
example: '["time/year", 1700000000000] // => 2023'
|
|
2340
2340
|
},
|
|
2341
2341
|
"time/month": {
|
|
2342
2342
|
module: "time",
|
|
@@ -2347,7 +2347,7 @@ var TIME_OPERATORS = {
|
|
|
2347
2347
|
hasSideEffects: false,
|
|
2348
2348
|
returnType: "number",
|
|
2349
2349
|
params: [{ name: "date", type: "number", description: "Timestamp" }],
|
|
2350
|
-
example: '["time/month",
|
|
2350
|
+
example: '["time/month", 1700000000000] // => 11'
|
|
2351
2351
|
},
|
|
2352
2352
|
"time/day": {
|
|
2353
2353
|
module: "time",
|
|
@@ -2358,7 +2358,7 @@ var TIME_OPERATORS = {
|
|
|
2358
2358
|
hasSideEffects: false,
|
|
2359
2359
|
returnType: "number",
|
|
2360
2360
|
params: [{ name: "date", type: "number", description: "Timestamp" }],
|
|
2361
|
-
example: '["time/day",
|
|
2361
|
+
example: '["time/day", 1700000000000] // => 14'
|
|
2362
2362
|
},
|
|
2363
2363
|
"time/weekday": {
|
|
2364
2364
|
module: "time",
|
|
@@ -2369,7 +2369,7 @@ var TIME_OPERATORS = {
|
|
|
2369
2369
|
hasSideEffects: false,
|
|
2370
2370
|
returnType: "number",
|
|
2371
2371
|
params: [{ name: "date", type: "number", description: "Timestamp" }],
|
|
2372
|
-
example: '["time/weekday",
|
|
2372
|
+
example: '["time/weekday", 1700000000000] // => 2 (Tuesday)'
|
|
2373
2373
|
},
|
|
2374
2374
|
"time/hour": {
|
|
2375
2375
|
module: "time",
|
|
@@ -2380,7 +2380,7 @@ var TIME_OPERATORS = {
|
|
|
2380
2380
|
hasSideEffects: false,
|
|
2381
2381
|
returnType: "number",
|
|
2382
2382
|
params: [{ name: "date", type: "number", description: "Timestamp" }],
|
|
2383
|
-
example: '["time/hour",
|
|
2383
|
+
example: '["time/hour", 1700000000000]'
|
|
2384
2384
|
},
|
|
2385
2385
|
"time/minute": {
|
|
2386
2386
|
module: "time",
|
|
@@ -2391,7 +2391,7 @@ var TIME_OPERATORS = {
|
|
|
2391
2391
|
hasSideEffects: false,
|
|
2392
2392
|
returnType: "number",
|
|
2393
2393
|
params: [{ name: "date", type: "number", description: "Timestamp" }],
|
|
2394
|
-
example: '["time/minute",
|
|
2394
|
+
example: '["time/minute", 1700000000000]'
|
|
2395
2395
|
},
|
|
2396
2396
|
"time/second": {
|
|
2397
2397
|
module: "time",
|
|
@@ -2402,7 +2402,7 @@ var TIME_OPERATORS = {
|
|
|
2402
2402
|
hasSideEffects: false,
|
|
2403
2403
|
returnType: "number",
|
|
2404
2404
|
params: [{ name: "date", type: "number", description: "Timestamp" }],
|
|
2405
|
-
example: '["time/second",
|
|
2405
|
+
example: '["time/second", 1700000000000]'
|
|
2406
2406
|
},
|
|
2407
2407
|
"time/add": {
|
|
2408
2408
|
module: "time",
|
|
@@ -2447,7 +2447,7 @@ var TIME_OPERATORS = {
|
|
|
2447
2447
|
{ name: "b", type: "number", description: "Second timestamp" },
|
|
2448
2448
|
{ name: "unit", type: "string", description: "Result unit", optional: true, defaultValue: "ms" }
|
|
2449
2449
|
],
|
|
2450
|
-
example: '["time/diff",
|
|
2450
|
+
example: '["time/diff", 1700000000000, ["time/now"], "year"]'
|
|
2451
2451
|
},
|
|
2452
2452
|
"time/startOf": {
|
|
2453
2453
|
module: "time",
|
|
@@ -2489,7 +2489,7 @@ var TIME_OPERATORS = {
|
|
|
2489
2489
|
{ name: "a", type: "number", description: "First timestamp" },
|
|
2490
2490
|
{ name: "b", type: "number", description: "Second timestamp" }
|
|
2491
2491
|
],
|
|
2492
|
-
example: '["time/isBefore",
|
|
2492
|
+
example: '["time/isBefore", 1700000000000, 1700086400000]'
|
|
2493
2493
|
},
|
|
2494
2494
|
"time/isAfter": {
|
|
2495
2495
|
module: "time",
|
|
@@ -2503,7 +2503,7 @@ var TIME_OPERATORS = {
|
|
|
2503
2503
|
{ name: "a", type: "number", description: "First timestamp" },
|
|
2504
2504
|
{ name: "b", type: "number", description: "Second timestamp" }
|
|
2505
2505
|
],
|
|
2506
|
-
example: '["time/isAfter", ["time/now"],
|
|
2506
|
+
example: '["time/isAfter", ["time/now"], 1700000000000]'
|
|
2507
2507
|
},
|
|
2508
2508
|
"time/isBetween": {
|
|
2509
2509
|
module: "time",
|
|
@@ -2518,7 +2518,7 @@ var TIME_OPERATORS = {
|
|
|
2518
2518
|
{ name: "start", type: "number", description: "Range start" },
|
|
2519
2519
|
{ name: "end", type: "number", description: "Range end" }
|
|
2520
2520
|
],
|
|
2521
|
-
example: '["time/isBetween", ["time/now"],
|
|
2521
|
+
example: '["time/isBetween", ["time/now"], 1700000000000, 2000000000000]'
|
|
2522
2522
|
},
|
|
2523
2523
|
"time/isSame": {
|
|
2524
2524
|
module: "time",
|
|
@@ -2533,7 +2533,7 @@ var TIME_OPERATORS = {
|
|
|
2533
2533
|
{ name: "b", type: "number", description: "Second timestamp" },
|
|
2534
2534
|
{ name: "unit", type: "string", description: "Comparison unit", optional: true }
|
|
2535
2535
|
],
|
|
2536
|
-
example: '["time/isSame",
|
|
2536
|
+
example: '["time/isSame", 1700000000000, 1700001000000, "day"]'
|
|
2537
2537
|
},
|
|
2538
2538
|
"time/isPast": {
|
|
2539
2539
|
module: "time",
|
|
@@ -2544,7 +2544,7 @@ var TIME_OPERATORS = {
|
|
|
2544
2544
|
hasSideEffects: false,
|
|
2545
2545
|
returnType: "boolean",
|
|
2546
2546
|
params: [{ name: "date", type: "number", description: "Timestamp" }],
|
|
2547
|
-
example: '["time/isPast",
|
|
2547
|
+
example: '["time/isPast", 1700000000000]'
|
|
2548
2548
|
},
|
|
2549
2549
|
"time/isFuture": {
|
|
2550
2550
|
module: "time",
|
|
@@ -2555,7 +2555,7 @@ var TIME_OPERATORS = {
|
|
|
2555
2555
|
hasSideEffects: false,
|
|
2556
2556
|
returnType: "boolean",
|
|
2557
2557
|
params: [{ name: "date", type: "number", description: "Timestamp" }],
|
|
2558
|
-
example: '["time/isFuture",
|
|
2558
|
+
example: '["time/isFuture", 2000000000000]'
|
|
2559
2559
|
},
|
|
2560
2560
|
"time/isToday": {
|
|
2561
2561
|
module: "time",
|
|
@@ -2566,7 +2566,7 @@ var TIME_OPERATORS = {
|
|
|
2566
2566
|
hasSideEffects: false,
|
|
2567
2567
|
returnType: "boolean",
|
|
2568
2568
|
params: [{ name: "date", type: "number", description: "Timestamp" }],
|
|
2569
|
-
example: '["time/isToday", "
|
|
2569
|
+
example: '["time/isToday", ["time/now"]]'
|
|
2570
2570
|
},
|
|
2571
2571
|
"time/relative": {
|
|
2572
2572
|
module: "time",
|
|
@@ -2577,7 +2577,7 @@ var TIME_OPERATORS = {
|
|
|
2577
2577
|
hasSideEffects: false,
|
|
2578
2578
|
returnType: "string",
|
|
2579
2579
|
params: [{ name: "date", type: "number", description: "Timestamp" }],
|
|
2580
|
-
example: '["time/relative",
|
|
2580
|
+
example: '["time/relative", 1700000000000] // => "2 years ago"'
|
|
2581
2581
|
},
|
|
2582
2582
|
"time/duration": {
|
|
2583
2583
|
module: "time",
|
|
@@ -2606,7 +2606,7 @@ var VALIDATE_OPERATORS = {
|
|
|
2606
2606
|
hasSideEffects: false,
|
|
2607
2607
|
returnType: "boolean",
|
|
2608
2608
|
params: [{ name: "value", type: "any", description: "Value to check" }],
|
|
2609
|
-
example: '["validate/required", "
|
|
2609
|
+
example: '["validate/required", "Ann"]'
|
|
2610
2610
|
},
|
|
2611
2611
|
"validate/string": {
|
|
2612
2612
|
module: "validate",
|
|
@@ -2617,7 +2617,7 @@ var VALIDATE_OPERATORS = {
|
|
|
2617
2617
|
hasSideEffects: false,
|
|
2618
2618
|
returnType: "boolean",
|
|
2619
2619
|
params: [{ name: "value", type: "any", description: "Value to check" }],
|
|
2620
|
-
example: '["validate/string", "
|
|
2620
|
+
example: '["validate/string", "Ann"]'
|
|
2621
2621
|
},
|
|
2622
2622
|
"validate/number": {
|
|
2623
2623
|
module: "validate",
|
|
@@ -2628,7 +2628,7 @@ var VALIDATE_OPERATORS = {
|
|
|
2628
2628
|
hasSideEffects: false,
|
|
2629
2629
|
returnType: "boolean",
|
|
2630
2630
|
params: [{ name: "value", type: "any", description: "Value to check" }],
|
|
2631
|
-
example: '["validate/number",
|
|
2631
|
+
example: '["validate/number", 42]'
|
|
2632
2632
|
},
|
|
2633
2633
|
"validate/boolean": {
|
|
2634
2634
|
module: "validate",
|
|
@@ -2639,7 +2639,7 @@ var VALIDATE_OPERATORS = {
|
|
|
2639
2639
|
hasSideEffects: false,
|
|
2640
2640
|
returnType: "boolean",
|
|
2641
2641
|
params: [{ name: "value", type: "any", description: "Value to check" }],
|
|
2642
|
-
example: '["validate/boolean",
|
|
2642
|
+
example: '["validate/boolean", true]'
|
|
2643
2643
|
},
|
|
2644
2644
|
"validate/array": {
|
|
2645
2645
|
module: "validate",
|
|
@@ -2650,7 +2650,7 @@ var VALIDATE_OPERATORS = {
|
|
|
2650
2650
|
hasSideEffects: false,
|
|
2651
2651
|
returnType: "boolean",
|
|
2652
2652
|
params: [{ name: "value", type: "any", description: "Value to check" }],
|
|
2653
|
-
example: '["validate/array",
|
|
2653
|
+
example: '["validate/array", [1, 2]]'
|
|
2654
2654
|
},
|
|
2655
2655
|
"validate/object": {
|
|
2656
2656
|
module: "validate",
|
|
@@ -2661,7 +2661,7 @@ var VALIDATE_OPERATORS = {
|
|
|
2661
2661
|
hasSideEffects: false,
|
|
2662
2662
|
returnType: "boolean",
|
|
2663
2663
|
params: [{ name: "value", type: "any", description: "Value to check" }],
|
|
2664
|
-
example: '["validate/object", "
|
|
2664
|
+
example: '["validate/object", {"a": 1}]'
|
|
2665
2665
|
},
|
|
2666
2666
|
"validate/email": {
|
|
2667
2667
|
module: "validate",
|
|
@@ -2672,7 +2672,7 @@ var VALIDATE_OPERATORS = {
|
|
|
2672
2672
|
hasSideEffects: false,
|
|
2673
2673
|
returnType: "boolean",
|
|
2674
2674
|
params: [{ name: "value", type: "string", description: "Email to validate" }],
|
|
2675
|
-
example: '["validate/email", "@
|
|
2675
|
+
example: '["validate/email", "ann@example.com"]'
|
|
2676
2676
|
},
|
|
2677
2677
|
"validate/url": {
|
|
2678
2678
|
module: "validate",
|
|
@@ -2683,7 +2683,7 @@ var VALIDATE_OPERATORS = {
|
|
|
2683
2683
|
hasSideEffects: false,
|
|
2684
2684
|
returnType: "boolean",
|
|
2685
2685
|
params: [{ name: "value", type: "string", description: "URL to validate" }],
|
|
2686
|
-
example: '["validate/url", "
|
|
2686
|
+
example: '["validate/url", "https://example.com"]'
|
|
2687
2687
|
},
|
|
2688
2688
|
"validate/uuid": {
|
|
2689
2689
|
module: "validate",
|
|
@@ -2694,7 +2694,7 @@ var VALIDATE_OPERATORS = {
|
|
|
2694
2694
|
hasSideEffects: false,
|
|
2695
2695
|
returnType: "boolean",
|
|
2696
2696
|
params: [{ name: "value", type: "string", description: "UUID to validate" }],
|
|
2697
|
-
example: '["validate/uuid", "
|
|
2697
|
+
example: '["validate/uuid", "550e8400-e29b-41d4-a716-446655440000"]'
|
|
2698
2698
|
},
|
|
2699
2699
|
"validate/phone": {
|
|
2700
2700
|
module: "validate",
|
|
@@ -2705,7 +2705,7 @@ var VALIDATE_OPERATORS = {
|
|
|
2705
2705
|
hasSideEffects: false,
|
|
2706
2706
|
returnType: "boolean",
|
|
2707
2707
|
params: [{ name: "value", type: "string", description: "Phone number to validate" }],
|
|
2708
|
-
example: '["validate/phone", "
|
|
2708
|
+
example: '["validate/phone", "+15551234567"]'
|
|
2709
2709
|
},
|
|
2710
2710
|
"validate/creditCard": {
|
|
2711
2711
|
module: "validate",
|
|
@@ -2716,7 +2716,7 @@ var VALIDATE_OPERATORS = {
|
|
|
2716
2716
|
hasSideEffects: false,
|
|
2717
2717
|
returnType: "boolean",
|
|
2718
2718
|
params: [{ name: "value", type: "string", description: "Card number to validate" }],
|
|
2719
|
-
example: '["validate/creditCard", "
|
|
2719
|
+
example: '["validate/creditCard", "4111111111111111"]'
|
|
2720
2720
|
},
|
|
2721
2721
|
"validate/date": {
|
|
2722
2722
|
module: "validate",
|
|
@@ -2727,7 +2727,7 @@ var VALIDATE_OPERATORS = {
|
|
|
2727
2727
|
hasSideEffects: false,
|
|
2728
2728
|
returnType: "boolean",
|
|
2729
2729
|
params: [{ name: "value", type: "any", description: "Value to check" }],
|
|
2730
|
-
example: '["validate/date", "
|
|
2730
|
+
example: '["validate/date", "2024-01-18"]'
|
|
2731
2731
|
},
|
|
2732
2732
|
"validate/minLength": {
|
|
2733
2733
|
module: "validate",
|
|
@@ -2741,7 +2741,7 @@ var VALIDATE_OPERATORS = {
|
|
|
2741
2741
|
{ name: "value", type: "string | array", description: "Value to check" },
|
|
2742
2742
|
{ name: "min", type: "number", description: "Minimum length" }
|
|
2743
2743
|
],
|
|
2744
|
-
example: '["validate/minLength", "
|
|
2744
|
+
example: '["validate/minLength", "password123", 8]'
|
|
2745
2745
|
},
|
|
2746
2746
|
"validate/maxLength": {
|
|
2747
2747
|
module: "validate",
|
|
@@ -2755,7 +2755,7 @@ var VALIDATE_OPERATORS = {
|
|
|
2755
2755
|
{ name: "value", type: "string | array", description: "Value to check" },
|
|
2756
2756
|
{ name: "max", type: "number", description: "Maximum length" }
|
|
2757
2757
|
],
|
|
2758
|
-
example: '["validate/maxLength", "
|
|
2758
|
+
example: '["validate/maxLength", "Ann", 50]'
|
|
2759
2759
|
},
|
|
2760
2760
|
"validate/length": {
|
|
2761
2761
|
module: "validate",
|
|
@@ -2769,7 +2769,7 @@ var VALIDATE_OPERATORS = {
|
|
|
2769
2769
|
{ name: "value", type: "string | array", description: "Value to check" },
|
|
2770
2770
|
{ name: "exact", type: "number", description: "Required length" }
|
|
2771
2771
|
],
|
|
2772
|
-
example: '["validate/length", "
|
|
2772
|
+
example: '["validate/length", "ABC123", 6]'
|
|
2773
2773
|
},
|
|
2774
2774
|
"validate/min": {
|
|
2775
2775
|
module: "validate",
|
|
@@ -2783,7 +2783,7 @@ var VALIDATE_OPERATORS = {
|
|
|
2783
2783
|
{ name: "value", type: "number", description: "Number to check" },
|
|
2784
2784
|
{ name: "min", type: "number", description: "Minimum value" }
|
|
2785
2785
|
],
|
|
2786
|
-
example: '["validate/min",
|
|
2786
|
+
example: '["validate/min", 21, 18]'
|
|
2787
2787
|
},
|
|
2788
2788
|
"validate/max": {
|
|
2789
2789
|
module: "validate",
|
|
@@ -2797,7 +2797,7 @@ var VALIDATE_OPERATORS = {
|
|
|
2797
2797
|
{ name: "value", type: "number", description: "Number to check" },
|
|
2798
2798
|
{ name: "max", type: "number", description: "Maximum value" }
|
|
2799
2799
|
],
|
|
2800
|
-
example: '["validate/max",
|
|
2800
|
+
example: '["validate/max", 50, 100]'
|
|
2801
2801
|
},
|
|
2802
2802
|
"validate/range": {
|
|
2803
2803
|
module: "validate",
|
|
@@ -2812,7 +2812,7 @@ var VALIDATE_OPERATORS = {
|
|
|
2812
2812
|
{ name: "min", type: "number", description: "Minimum value" },
|
|
2813
2813
|
{ name: "max", type: "number", description: "Maximum value" }
|
|
2814
2814
|
],
|
|
2815
|
-
example: '["validate/range",
|
|
2815
|
+
example: '["validate/range", 4, 1, 5]'
|
|
2816
2816
|
},
|
|
2817
2817
|
"validate/pattern": {
|
|
2818
2818
|
module: "validate",
|
|
@@ -2826,7 +2826,7 @@ var VALIDATE_OPERATORS = {
|
|
|
2826
2826
|
{ name: "value", type: "string", description: "String to check" },
|
|
2827
2827
|
{ name: "regex", type: "string", description: "Regex pattern" }
|
|
2828
2828
|
],
|
|
2829
|
-
example: '["validate/pattern", "
|
|
2829
|
+
example: '["validate/pattern", "ABC123", "^[A-Z]{3}[0-9]{3}$"]'
|
|
2830
2830
|
},
|
|
2831
2831
|
"validate/oneOf": {
|
|
2832
2832
|
module: "validate",
|
|
@@ -2840,7 +2840,7 @@ var VALIDATE_OPERATORS = {
|
|
|
2840
2840
|
{ name: "value", type: "any", description: "Value to check" },
|
|
2841
2841
|
{ name: "options", type: "array", description: "Allowed values" }
|
|
2842
2842
|
],
|
|
2843
|
-
example: '["validate/oneOf", "
|
|
2843
|
+
example: '["validate/oneOf", "admin", ["admin", "user", "guest"]]'
|
|
2844
2844
|
},
|
|
2845
2845
|
"validate/noneOf": {
|
|
2846
2846
|
module: "validate",
|
|
@@ -2854,7 +2854,7 @@ var VALIDATE_OPERATORS = {
|
|
|
2854
2854
|
{ name: "value", type: "any", description: "Value to check" },
|
|
2855
2855
|
{ name: "options", type: "array", description: "Disallowed values" }
|
|
2856
2856
|
],
|
|
2857
|
-
example: '["validate/noneOf", "
|
|
2857
|
+
example: '["validate/noneOf", "alice", ["admin", "root", "system"]]'
|
|
2858
2858
|
},
|
|
2859
2859
|
"validate/equals": {
|
|
2860
2860
|
module: "validate",
|
|
@@ -2868,7 +2868,7 @@ var VALIDATE_OPERATORS = {
|
|
|
2868
2868
|
{ name: "a", type: "any", description: "First value" },
|
|
2869
2869
|
{ name: "b", type: "any", description: "Second value" }
|
|
2870
2870
|
],
|
|
2871
|
-
example: '["validate/equals", "
|
|
2871
|
+
example: '["validate/equals", "secret", "secret"]'
|
|
2872
2872
|
},
|
|
2873
2873
|
"validate/check": {
|
|
2874
2874
|
module: "validate",
|
|
@@ -2882,11 +2882,7 @@ var VALIDATE_OPERATORS = {
|
|
|
2882
2882
|
{ name: "value", type: "any", description: "Value or object to validate" },
|
|
2883
2883
|
{ name: "rules", type: "object", description: "Validation rules by field" }
|
|
2884
2884
|
],
|
|
2885
|
-
example:
|
|
2886
|
-
"name": [["required"], ["minLength", 2], ["maxLength", 50]],
|
|
2887
|
-
"email": [["required"], ["email"]],
|
|
2888
|
-
"age": [["number"], ["min", 18]]
|
|
2889
|
-
}]`
|
|
2885
|
+
example: '["validate/check", {"name": "Ann", "email": "ann@example.com", "age": 20}, {"name": [["required"], ["minLength", 2], ["maxLength", 50]], "email": [["required"], ["email"]], "age": [["number"]]}]'
|
|
2890
2886
|
}
|
|
2891
2887
|
};
|
|
2892
2888
|
function getValidateOperators() {
|
|
@@ -3271,7 +3267,7 @@ var NN_OPERATORS = {
|
|
|
3271
3267
|
{ name: "module", type: "nn/module", description: "The neural network module" },
|
|
3272
3268
|
{ name: "input", type: "tensor", description: "Input tensor" }
|
|
3273
3269
|
],
|
|
3274
|
-
example: '["nn/forward", "
|
|
3270
|
+
example: '["nn/forward", {"layers": [{"type": "dense", "units": 2}]}, [0.1, 0.2]]'
|
|
3275
3271
|
},
|
|
3276
3272
|
"nn/getWeights": {
|
|
3277
3273
|
module: "nn",
|
|
@@ -3284,7 +3280,7 @@ var NN_OPERATORS = {
|
|
|
3284
3280
|
params: [
|
|
3285
3281
|
{ name: "module", type: "nn/module", description: "The neural network module" }
|
|
3286
3282
|
],
|
|
3287
|
-
example: '["nn/getWeights", "
|
|
3283
|
+
example: '["nn/getWeights", {"layers": [{"type": "dense", "units": 2}]}]'
|
|
3288
3284
|
},
|
|
3289
3285
|
"nn/setWeights": {
|
|
3290
3286
|
module: "nn",
|
|
@@ -3298,7 +3294,7 @@ var NN_OPERATORS = {
|
|
|
3298
3294
|
{ name: "module", type: "nn/module", description: "The neural network module" },
|
|
3299
3295
|
{ name: "weights", type: "tensor", description: "New weights as flat tensor" }
|
|
3300
3296
|
],
|
|
3301
|
-
example: '["nn/setWeights", "
|
|
3297
|
+
example: '["nn/setWeights", {"layers": [{"type": "dense", "units": 2}]}, [0.1, 0.2, 0.3]]'
|
|
3302
3298
|
},
|
|
3303
3299
|
"nn/paramCount": {
|
|
3304
3300
|
module: "nn",
|
|
@@ -3311,7 +3307,7 @@ var NN_OPERATORS = {
|
|
|
3311
3307
|
params: [
|
|
3312
3308
|
{ name: "module", type: "nn/module", description: "The neural network module" }
|
|
3313
3309
|
],
|
|
3314
|
-
example: '["nn/paramCount", "
|
|
3310
|
+
example: '["nn/paramCount", {"layers": [{"type": "dense", "units": 2}]}]'
|
|
3315
3311
|
},
|
|
3316
3312
|
"nn/clone": {
|
|
3317
3313
|
module: "nn",
|
|
@@ -3324,7 +3320,7 @@ var NN_OPERATORS = {
|
|
|
3324
3320
|
params: [
|
|
3325
3321
|
{ name: "module", type: "nn/module", description: "The neural network module to clone" }
|
|
3326
3322
|
],
|
|
3327
|
-
example: '["nn/clone", "
|
|
3323
|
+
example: '["nn/clone", {"layers": [{"type": "dense", "units": 2}]}]'
|
|
3328
3324
|
},
|
|
3329
3325
|
// ============================================================================
|
|
3330
3326
|
// ML lifecycle effect (bare alias invoked by std ML behaviors)
|
|
@@ -3341,7 +3337,7 @@ var NN_OPERATORS = {
|
|
|
3341
3337
|
{ name: "model", type: "nn/module", description: "The neural network module" },
|
|
3342
3338
|
{ name: "input", type: "tensor", description: "Input tensor" }
|
|
3343
3339
|
],
|
|
3344
|
-
example: '["forward", "
|
|
3340
|
+
example: '["forward", {"layers": [{"type": "dense", "units": 2}]}, [0.5]]'
|
|
3345
3341
|
}
|
|
3346
3342
|
};
|
|
3347
3343
|
function getNnOperators() {
|
|
@@ -3432,7 +3428,7 @@ var TENSOR_OPERATORS = {
|
|
|
3432
3428
|
params: [
|
|
3433
3429
|
{ name: "tensor", type: "tensor", description: "The tensor" }
|
|
3434
3430
|
],
|
|
3435
|
-
example: '["tensor/shape",
|
|
3431
|
+
example: '["tensor/shape", [[1, 2], [3, 4]]] // => [2, 2]'
|
|
3436
3432
|
},
|
|
3437
3433
|
"tensor/get": {
|
|
3438
3434
|
module: "tensor",
|
|
@@ -3446,7 +3442,7 @@ var TENSOR_OPERATORS = {
|
|
|
3446
3442
|
{ name: "tensor", type: "tensor", description: "The tensor" },
|
|
3447
3443
|
{ name: "index", type: "number | number[]", description: "Index (single for 1D, array for multi-D)" }
|
|
3448
3444
|
],
|
|
3449
|
-
example: '["tensor/get",
|
|
3445
|
+
example: '["tensor/get", [10, 20, 30, 40], 3] // Get 4th element'
|
|
3450
3446
|
},
|
|
3451
3447
|
"tensor/slice": {
|
|
3452
3448
|
module: "tensor",
|
|
@@ -3461,7 +3457,7 @@ var TENSOR_OPERATORS = {
|
|
|
3461
3457
|
{ name: "start", type: "number", description: "Start index" },
|
|
3462
3458
|
{ name: "end", type: "number", description: "End index (exclusive)" }
|
|
3463
3459
|
],
|
|
3464
|
-
example: '["tensor/slice",
|
|
3460
|
+
example: '["tensor/slice", [10, 20, 30, 40], 0, 3] // First 3 elements'
|
|
3465
3461
|
},
|
|
3466
3462
|
"tensor/reshape": {
|
|
3467
3463
|
module: "tensor",
|
|
@@ -3475,7 +3471,7 @@ var TENSOR_OPERATORS = {
|
|
|
3475
3471
|
{ name: "tensor", type: "tensor", description: "The tensor" },
|
|
3476
3472
|
{ name: "shape", type: "number[]", description: "New shape" }
|
|
3477
3473
|
],
|
|
3478
|
-
example: '["tensor/reshape",
|
|
3474
|
+
example: '["tensor/reshape", [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16], [4, 4]] // Reshape to 4x4'
|
|
3479
3475
|
},
|
|
3480
3476
|
"tensor/flatten": {
|
|
3481
3477
|
module: "tensor",
|
|
@@ -3488,7 +3484,7 @@ var TENSOR_OPERATORS = {
|
|
|
3488
3484
|
params: [
|
|
3489
3485
|
{ name: "tensor", type: "tensor", description: "The tensor" }
|
|
3490
3486
|
],
|
|
3491
|
-
example: '["tensor/flatten",
|
|
3487
|
+
example: '["tensor/flatten", [[1, 2], [3, 4]]]'
|
|
3492
3488
|
},
|
|
3493
3489
|
// ============================================================================
|
|
3494
3490
|
// Math Operations
|
|
@@ -3505,7 +3501,7 @@ var TENSOR_OPERATORS = {
|
|
|
3505
3501
|
{ name: "a", type: "tensor", description: "First tensor" },
|
|
3506
3502
|
{ name: "b", type: "tensor | number", description: "Second tensor or scalar" }
|
|
3507
3503
|
],
|
|
3508
|
-
example: '["tensor/add",
|
|
3504
|
+
example: '["tensor/add", [1, 2], [3, 4]]'
|
|
3509
3505
|
},
|
|
3510
3506
|
"tensor/sub": {
|
|
3511
3507
|
module: "tensor",
|
|
@@ -3519,7 +3515,7 @@ var TENSOR_OPERATORS = {
|
|
|
3519
3515
|
{ name: "a", type: "tensor", description: "First tensor" },
|
|
3520
3516
|
{ name: "b", type: "tensor | number", description: "Second tensor or scalar" }
|
|
3521
3517
|
],
|
|
3522
|
-
example: '["tensor/sub",
|
|
3518
|
+
example: '["tensor/sub", [1, 2], [3, 4]]'
|
|
3523
3519
|
},
|
|
3524
3520
|
"tensor/mul": {
|
|
3525
3521
|
module: "tensor",
|
|
@@ -3533,7 +3529,7 @@ var TENSOR_OPERATORS = {
|
|
|
3533
3529
|
{ name: "a", type: "tensor", description: "First tensor" },
|
|
3534
3530
|
{ name: "b", type: "tensor | number", description: "Second tensor or scalar" }
|
|
3535
3531
|
],
|
|
3536
|
-
example: '["tensor/mul",
|
|
3532
|
+
example: '["tensor/mul", [0.5, 0.7], 0.99] // Decay weights'
|
|
3537
3533
|
},
|
|
3538
3534
|
"tensor/div": {
|
|
3539
3535
|
module: "tensor",
|
|
@@ -3547,7 +3543,7 @@ var TENSOR_OPERATORS = {
|
|
|
3547
3543
|
{ name: "a", type: "tensor", description: "First tensor" },
|
|
3548
3544
|
{ name: "b", type: "tensor | number", description: "Second tensor or scalar" }
|
|
3549
3545
|
],
|
|
3550
|
-
example: '["tensor/div",
|
|
3546
|
+
example: '["tensor/div", [10, 20], 2]'
|
|
3551
3547
|
},
|
|
3552
3548
|
"tensor/matmul": {
|
|
3553
3549
|
module: "tensor",
|
|
@@ -3561,7 +3557,7 @@ var TENSOR_OPERATORS = {
|
|
|
3561
3557
|
{ name: "a", type: "tensor", description: "First tensor (NxM)" },
|
|
3562
3558
|
{ name: "b", type: "tensor", description: "Second tensor (MxK)" }
|
|
3563
3559
|
],
|
|
3564
|
-
example: '["tensor/matmul",
|
|
3560
|
+
example: '["tensor/matmul", [[1, 2], [3, 4]], [[5, 6], [7, 8]]]'
|
|
3565
3561
|
},
|
|
3566
3562
|
"tensor/dot": {
|
|
3567
3563
|
module: "tensor",
|
|
@@ -3575,7 +3571,7 @@ var TENSOR_OPERATORS = {
|
|
|
3575
3571
|
{ name: "a", type: "tensor", description: "First vector" },
|
|
3576
3572
|
{ name: "b", type: "tensor", description: "Second vector" }
|
|
3577
3573
|
],
|
|
3578
|
-
example: '["tensor/dot",
|
|
3574
|
+
example: '["tensor/dot", [1, 2], [3, 4]]'
|
|
3579
3575
|
},
|
|
3580
3576
|
// ============================================================================
|
|
3581
3577
|
// Reductions
|
|
@@ -3592,7 +3588,7 @@ var TENSOR_OPERATORS = {
|
|
|
3592
3588
|
{ name: "tensor", type: "tensor", description: "The tensor" },
|
|
3593
3589
|
{ name: "dim", type: "number", description: "Dimension to reduce", optional: true }
|
|
3594
3590
|
],
|
|
3595
|
-
example: '["tensor/sum",
|
|
3591
|
+
example: '["tensor/sum", [1, 0, 1]] // Total reward'
|
|
3596
3592
|
},
|
|
3597
3593
|
"tensor/mean": {
|
|
3598
3594
|
module: "tensor",
|
|
@@ -3606,7 +3602,7 @@ var TENSOR_OPERATORS = {
|
|
|
3606
3602
|
{ name: "tensor", type: "tensor", description: "The tensor" },
|
|
3607
3603
|
{ name: "dim", type: "number", description: "Dimension to reduce", optional: true }
|
|
3608
3604
|
],
|
|
3609
|
-
example: '["tensor/mean",
|
|
3605
|
+
example: '["tensor/mean", [0.2, 0.4, 0.6]]'
|
|
3610
3606
|
},
|
|
3611
3607
|
"tensor/max": {
|
|
3612
3608
|
module: "tensor",
|
|
@@ -3620,7 +3616,7 @@ var TENSOR_OPERATORS = {
|
|
|
3620
3616
|
{ name: "tensor", type: "tensor", description: "The tensor" },
|
|
3621
3617
|
{ name: "dim", type: "number", description: "Dimension to reduce", optional: true }
|
|
3622
3618
|
],
|
|
3623
|
-
example: '["tensor/max",
|
|
3619
|
+
example: '["tensor/max", [0.1, 0.9, 0.3]]'
|
|
3624
3620
|
},
|
|
3625
3621
|
"tensor/min": {
|
|
3626
3622
|
module: "tensor",
|
|
@@ -3634,7 +3630,7 @@ var TENSOR_OPERATORS = {
|
|
|
3634
3630
|
{ name: "tensor", type: "tensor", description: "The tensor" },
|
|
3635
3631
|
{ name: "dim", type: "number", description: "Dimension to reduce", optional: true }
|
|
3636
3632
|
],
|
|
3637
|
-
example: '["tensor/min",
|
|
3633
|
+
example: '["tensor/min", [3, 1, 2]]'
|
|
3638
3634
|
},
|
|
3639
3635
|
"tensor/argmax": {
|
|
3640
3636
|
module: "tensor",
|
|
@@ -3648,7 +3644,7 @@ var TENSOR_OPERATORS = {
|
|
|
3648
3644
|
{ name: "tensor", type: "tensor", description: "The tensor" },
|
|
3649
3645
|
{ name: "dim", type: "number", description: "Dimension to reduce", optional: true }
|
|
3650
3646
|
],
|
|
3651
|
-
example: '["tensor/argmax",
|
|
3647
|
+
example: '["tensor/argmax", [0.1, 0.9, 0.3]] // Best action index'
|
|
3652
3648
|
},
|
|
3653
3649
|
"tensor/norm": {
|
|
3654
3650
|
module: "tensor",
|
|
@@ -3662,7 +3658,7 @@ var TENSOR_OPERATORS = {
|
|
|
3662
3658
|
{ name: "tensor", type: "tensor", description: "The tensor" },
|
|
3663
3659
|
{ name: "p", type: "number", description: "Norm order (default 2)", optional: true, defaultValue: 2 }
|
|
3664
3660
|
],
|
|
3665
|
-
example: '["tensor/norm",
|
|
3661
|
+
example: '["tensor/norm", [3, 4]]'
|
|
3666
3662
|
},
|
|
3667
3663
|
// ============================================================================
|
|
3668
3664
|
// Range Validation (for contracts)
|
|
@@ -3679,7 +3675,7 @@ var TENSOR_OPERATORS = {
|
|
|
3679
3675
|
{ name: "tensor", type: "tensor", description: "The tensor" },
|
|
3680
3676
|
{ name: "range", type: "[number, number]", description: "Range as [min, max]" }
|
|
3681
3677
|
],
|
|
3682
|
-
example: '["tensor/allInRange",
|
|
3678
|
+
example: '["tensor/allInRange", [0.5, -0.2], [-1.0, 1.0]]'
|
|
3683
3679
|
},
|
|
3684
3680
|
"tensor/outOfRangeIndices": {
|
|
3685
3681
|
module: "tensor",
|
|
@@ -3693,7 +3689,7 @@ var TENSOR_OPERATORS = {
|
|
|
3693
3689
|
{ name: "tensor", type: "tensor", description: "The tensor" },
|
|
3694
3690
|
{ name: "range", type: "[number, number]", description: "Range as [min, max]" }
|
|
3695
3691
|
],
|
|
3696
|
-
example: '["tensor/outOfRangeIndices",
|
|
3692
|
+
example: '["tensor/outOfRangeIndices", [0.5, 1.5], [-1.0, 1.0]]'
|
|
3697
3693
|
},
|
|
3698
3694
|
"tensor/clamp": {
|
|
3699
3695
|
module: "tensor",
|
|
@@ -3708,7 +3704,7 @@ var TENSOR_OPERATORS = {
|
|
|
3708
3704
|
{ name: "min", type: "number", description: "Minimum value" },
|
|
3709
3705
|
{ name: "max", type: "number", description: "Maximum value" }
|
|
3710
3706
|
],
|
|
3711
|
-
example: '["tensor/clamp",
|
|
3707
|
+
example: '["tensor/clamp", [5, -15, 3], -10.0, 10.0]'
|
|
3712
3708
|
},
|
|
3713
3709
|
"tensor/clampPerDim": {
|
|
3714
3710
|
module: "tensor",
|
|
@@ -3722,7 +3718,7 @@ var TENSOR_OPERATORS = {
|
|
|
3722
3718
|
{ name: "tensor", type: "tensor", description: "The tensor" },
|
|
3723
3719
|
{ name: "ranges", type: "object", description: 'Per-dimension ranges { "0": {min, max}, ... }' }
|
|
3724
3720
|
],
|
|
3725
|
-
example: '["tensor/clampPerDim", "
|
|
3721
|
+
example: '["tensor/clampPerDim", [5, -15], {"0": {"min": 0, "max": 10}, "1": {"min": -10, "max": 10}}]'
|
|
3726
3722
|
},
|
|
3727
3723
|
"tensor/outOfRangeDims": {
|
|
3728
3724
|
module: "tensor",
|
|
@@ -3736,7 +3732,7 @@ var TENSOR_OPERATORS = {
|
|
|
3736
3732
|
{ name: "tensor", type: "tensor", description: "The tensor" },
|
|
3737
3733
|
{ name: "ranges", type: "object", description: 'Per-dimension ranges { "0": {min, max}, ... }' }
|
|
3738
3734
|
],
|
|
3739
|
-
example: '["tensor/outOfRangeDims", "
|
|
3735
|
+
example: '["tensor/outOfRangeDims", [5, -15], {"0": {"min": 0, "max": 10}, "1": {"min": -10, "max": 10}}]'
|
|
3740
3736
|
},
|
|
3741
3737
|
// ============================================================================
|
|
3742
3738
|
// Conversion
|
|
@@ -3752,7 +3748,7 @@ var TENSOR_OPERATORS = {
|
|
|
3752
3748
|
params: [
|
|
3753
3749
|
{ name: "tensor", type: "tensor", description: "The tensor" }
|
|
3754
3750
|
],
|
|
3755
|
-
example: '["tensor/toArray",
|
|
3751
|
+
example: '["tensor/toArray", [[1, 2], [3, 4]]]'
|
|
3756
3752
|
},
|
|
3757
3753
|
"tensor/toList": {
|
|
3758
3754
|
module: "tensor",
|
|
@@ -3765,7 +3761,7 @@ var TENSOR_OPERATORS = {
|
|
|
3765
3761
|
params: [
|
|
3766
3762
|
{ name: "tensor", type: "tensor", description: "The tensor (must be 1D)" }
|
|
3767
3763
|
],
|
|
3768
|
-
example: '["tensor/toList",
|
|
3764
|
+
example: '["tensor/toList", [1, 2, 3]]'
|
|
3769
3765
|
},
|
|
3770
3766
|
// ============================================================================
|
|
3771
3767
|
// Concatenation / stacking / shape manipulation
|
|
@@ -3782,7 +3778,7 @@ var TENSOR_OPERATORS = {
|
|
|
3782
3778
|
{ name: "a", type: "tensor", description: "First tensor" },
|
|
3783
3779
|
{ name: "b", type: "tensor", description: "Second tensor" }
|
|
3784
3780
|
],
|
|
3785
|
-
example: '["tensor/cat",
|
|
3781
|
+
example: '["tensor/cat", [1, 2], [3, 4]]'
|
|
3786
3782
|
},
|
|
3787
3783
|
"tensor/stack": {
|
|
3788
3784
|
module: "tensor",
|
|
@@ -3796,7 +3792,7 @@ var TENSOR_OPERATORS = {
|
|
|
3796
3792
|
{ name: "a", type: "tensor", description: "First tensor" },
|
|
3797
3793
|
{ name: "b", type: "tensor", description: "Second tensor" }
|
|
3798
3794
|
],
|
|
3799
|
-
example: '["tensor/stack",
|
|
3795
|
+
example: '["tensor/stack", [1, 2], [3, 4]]'
|
|
3800
3796
|
},
|
|
3801
3797
|
"tensor/transpose": {
|
|
3802
3798
|
module: "tensor",
|
|
@@ -3811,7 +3807,7 @@ var TENSOR_OPERATORS = {
|
|
|
3811
3807
|
{ name: "dim0", type: "number", description: "First dimension to swap (optional)" },
|
|
3812
3808
|
{ name: "dim1", type: "number", description: "Second dimension to swap (optional)" }
|
|
3813
3809
|
],
|
|
3814
|
-
example: '["tensor/transpose",
|
|
3810
|
+
example: '["tensor/transpose", [[1, 2], [3, 4]], 0, 1]'
|
|
3815
3811
|
},
|
|
3816
3812
|
"tensor/unsqueeze": {
|
|
3817
3813
|
module: "tensor",
|
|
@@ -3825,7 +3821,7 @@ var TENSOR_OPERATORS = {
|
|
|
3825
3821
|
{ name: "tensor", type: "tensor", description: "The tensor" },
|
|
3826
3822
|
{ name: "dim", type: "number", description: "Position to insert the new dimension" }
|
|
3827
3823
|
],
|
|
3828
|
-
example: '["tensor/unsqueeze",
|
|
3824
|
+
example: '["tensor/unsqueeze", [1, 2, 3], 0]'
|
|
3829
3825
|
},
|
|
3830
3826
|
"tensor/squeeze": {
|
|
3831
3827
|
module: "tensor",
|
|
@@ -3838,7 +3834,7 @@ var TENSOR_OPERATORS = {
|
|
|
3838
3834
|
params: [
|
|
3839
3835
|
{ name: "tensor", type: "tensor", description: "The tensor" }
|
|
3840
3836
|
],
|
|
3841
|
-
example: '["tensor/squeeze",
|
|
3837
|
+
example: '["tensor/squeeze", [[1, 2, 3]]]'
|
|
3842
3838
|
}
|
|
3843
3839
|
};
|
|
3844
3840
|
function getTensorOperators() {
|
|
@@ -3863,7 +3859,7 @@ var TRAIN_OPERATORS = {
|
|
|
3863
3859
|
{ name: "data", type: "array", description: "Training data (array of {input, target} or experiences)" },
|
|
3864
3860
|
{ name: "config", type: "train/config", description: "Training configuration with constraints" }
|
|
3865
3861
|
],
|
|
3866
|
-
example: '["train/loop", "
|
|
3862
|
+
example: '["train/loop", {"layers": [{"type": "dense", "units": 2}]}, [{"state": [0], "action": 1, "reward": 1}], {"epochs": 10}]'
|
|
3867
3863
|
},
|
|
3868
3864
|
"train/step": {
|
|
3869
3865
|
module: "train",
|
|
@@ -3879,7 +3875,7 @@ var TRAIN_OPERATORS = {
|
|
|
3879
3875
|
{ name: "target", type: "tensor", description: "Target tensor" },
|
|
3880
3876
|
{ name: "config", type: "train/config", description: "Training configuration" }
|
|
3881
3877
|
],
|
|
3882
|
-
example: '["train/step", "
|
|
3878
|
+
example: '["train/step", {"layers": [{"type": "dense", "units": 2}]}, [0.1, 0.2], [1], {"lr": 0.01}]'
|
|
3883
3879
|
},
|
|
3884
3880
|
// ============================================================================
|
|
3885
3881
|
// Validation
|
|
@@ -3896,7 +3892,7 @@ var TRAIN_OPERATORS = {
|
|
|
3896
3892
|
{ name: "module", type: "nn/module", description: "The neural network" },
|
|
3897
3893
|
{ name: "testCases", type: "array", description: "Array of {input, expected, tolerance?}" }
|
|
3898
3894
|
],
|
|
3899
|
-
example: '["train/validate", "
|
|
3895
|
+
example: '["train/validate", {"layers": [{"type": "dense", "units": 2}]}, [{"input": [0], "expected": [1]}]]'
|
|
3900
3896
|
},
|
|
3901
3897
|
"train/checkRegression": {
|
|
3902
3898
|
module: "train",
|
|
@@ -3911,7 +3907,7 @@ var TRAIN_OPERATORS = {
|
|
|
3911
3907
|
{ name: "oldModule", type: "nn/module", description: "Previous network" },
|
|
3912
3908
|
{ name: "invariants", type: "array", description: "Test cases that must not regress" }
|
|
3913
3909
|
],
|
|
3914
|
-
example: '["train/checkRegression",
|
|
3910
|
+
example: '["train/checkRegression", [0.1, 0.2], {"layers": [{"type": "dense", "units": 2}]}, [{"input": [0], "expected": [1]}]]'
|
|
3915
3911
|
},
|
|
3916
3912
|
// ============================================================================
|
|
3917
3913
|
// Constraint Checking
|
|
@@ -3928,7 +3924,7 @@ var TRAIN_OPERATORS = {
|
|
|
3928
3924
|
{ name: "module", type: "nn/module", description: "The neural network" },
|
|
3929
3925
|
{ name: "constraints", type: "train/constraints", description: "Constraint specification" }
|
|
3930
3926
|
],
|
|
3931
|
-
example: '["train/checkConstraints",
|
|
3927
|
+
example: '["train/checkConstraints", [0.1, 0.2], {"maxMagnitude": 10}]'
|
|
3932
3928
|
},
|
|
3933
3929
|
"train/checkWeightMagnitude": {
|
|
3934
3930
|
module: "train",
|
|
@@ -3942,7 +3938,7 @@ var TRAIN_OPERATORS = {
|
|
|
3942
3938
|
{ name: "module", type: "nn/module", description: "The neural network" },
|
|
3943
3939
|
{ name: "maxMagnitude", type: "number", description: "Maximum allowed weight magnitude" }
|
|
3944
3940
|
],
|
|
3945
|
-
example: '["train/checkWeightMagnitude", "
|
|
3941
|
+
example: '["train/checkWeightMagnitude", {"layers": [{"type": "dense", "units": 2}]}, 10.0]'
|
|
3946
3942
|
},
|
|
3947
3943
|
"train/checkForbiddenOutputs": {
|
|
3948
3944
|
module: "train",
|
|
@@ -3957,7 +3953,7 @@ var TRAIN_OPERATORS = {
|
|
|
3957
3953
|
{ name: "testInputs", type: "array", description: "Inputs to test" },
|
|
3958
3954
|
{ name: "forbiddenRegions", type: "array", description: "Forbidden output regions" }
|
|
3959
3955
|
],
|
|
3960
|
-
example: '["train/checkForbiddenOutputs", "
|
|
3956
|
+
example: '["train/checkForbiddenOutputs", {"layers": [{"type": "dense", "units": 2}]}, [[0], [1]], {"0": {"min": 100, "max": 200}}]'
|
|
3961
3957
|
},
|
|
3962
3958
|
// ============================================================================
|
|
3963
3959
|
// Gradient Operations
|
|
@@ -3974,7 +3970,7 @@ var TRAIN_OPERATORS = {
|
|
|
3974
3970
|
{ name: "module", type: "nn/module", description: "The neural network" },
|
|
3975
3971
|
{ name: "maxNorm", type: "number", description: "Maximum gradient norm" }
|
|
3976
3972
|
],
|
|
3977
|
-
example: '["train/clipGradients", "
|
|
3973
|
+
example: '["train/clipGradients", {"layers": [{"type": "dense", "units": 2}]}, 1.0]'
|
|
3978
3974
|
},
|
|
3979
3975
|
"train/getGradientNorm": {
|
|
3980
3976
|
module: "train",
|
|
@@ -3987,7 +3983,7 @@ var TRAIN_OPERATORS = {
|
|
|
3987
3983
|
params: [
|
|
3988
3984
|
{ name: "module", type: "nn/module", description: "The neural network" }
|
|
3989
3985
|
],
|
|
3990
|
-
example: '["train/getGradientNorm", "
|
|
3986
|
+
example: '["train/getGradientNorm", {"layers": [{"type": "dense", "units": 2}]}]'
|
|
3991
3987
|
},
|
|
3992
3988
|
// ============================================================================
|
|
3993
3989
|
// Weight Operations
|
|
@@ -4004,7 +4000,7 @@ var TRAIN_OPERATORS = {
|
|
|
4004
4000
|
{ name: "module", type: "nn/module", description: "The neural network" },
|
|
4005
4001
|
{ name: "maxMagnitude", type: "number", description: "Maximum weight magnitude" }
|
|
4006
4002
|
],
|
|
4007
|
-
example: '["train/clipWeights", "
|
|
4003
|
+
example: '["train/clipWeights", {"layers": [{"type": "dense", "units": 2}]}, 10.0]'
|
|
4008
4004
|
},
|
|
4009
4005
|
"train/getMaxWeightMagnitude": {
|
|
4010
4006
|
module: "train",
|
|
@@ -4017,7 +4013,7 @@ var TRAIN_OPERATORS = {
|
|
|
4017
4013
|
params: [
|
|
4018
4014
|
{ name: "module", type: "nn/module", description: "The neural network" }
|
|
4019
4015
|
],
|
|
4020
|
-
example: '["train/getMaxWeightMagnitude", "
|
|
4016
|
+
example: '["train/getMaxWeightMagnitude", {"layers": [{"type": "dense", "units": 2}]}]'
|
|
4021
4017
|
},
|
|
4022
4018
|
// ============================================================================
|
|
4023
4019
|
// Loss Functions
|
|
@@ -4034,7 +4030,7 @@ var TRAIN_OPERATORS = {
|
|
|
4034
4030
|
{ name: "predicted", type: "tensor", description: "Predicted values" },
|
|
4035
4031
|
{ name: "target", type: "tensor", description: "Target values" }
|
|
4036
4032
|
],
|
|
4037
|
-
example: '["train/mse",
|
|
4033
|
+
example: '["train/mse", [0.5, 0.7], [1, 0]]'
|
|
4038
4034
|
},
|
|
4039
4035
|
"train/crossEntropy": {
|
|
4040
4036
|
module: "train",
|
|
@@ -4048,7 +4044,7 @@ var TRAIN_OPERATORS = {
|
|
|
4048
4044
|
{ name: "logits", type: "tensor", description: "Raw model outputs (logits)" },
|
|
4049
4045
|
{ name: "labels", type: "tensor", description: "Target class labels" }
|
|
4050
4046
|
],
|
|
4051
|
-
example: '["train/crossEntropy",
|
|
4047
|
+
example: '["train/crossEntropy", [2.0, 0.5], [1, 0]]'
|
|
4052
4048
|
},
|
|
4053
4049
|
"train/huber": {
|
|
4054
4050
|
module: "train",
|
|
@@ -4063,7 +4059,7 @@ var TRAIN_OPERATORS = {
|
|
|
4063
4059
|
{ name: "target", type: "tensor", description: "Target values" },
|
|
4064
4060
|
{ name: "delta", type: "number", description: "Threshold for quadratic vs linear", optional: true, defaultValue: 1 }
|
|
4065
4061
|
],
|
|
4066
|
-
example: '["train/huber",
|
|
4062
|
+
example: '["train/huber", [0.5, 1.2], [1, 0], 1.0]'
|
|
4067
4063
|
},
|
|
4068
4064
|
// ============================================================================
|
|
4069
4065
|
// Optimizers
|
|
@@ -4081,7 +4077,7 @@ var TRAIN_OPERATORS = {
|
|
|
4081
4077
|
{ name: "lr", type: "number", description: "Learning rate" },
|
|
4082
4078
|
{ name: "momentum", type: "number", description: "Momentum factor", optional: true, defaultValue: 0 }
|
|
4083
4079
|
],
|
|
4084
|
-
example: '["train/sgd", "
|
|
4080
|
+
example: '["train/sgd", {"layers": [{"type": "dense", "units": 2}]}, 0.01, 0.9]'
|
|
4085
4081
|
},
|
|
4086
4082
|
"train/adam": {
|
|
4087
4083
|
module: "train",
|
|
@@ -4097,7 +4093,7 @@ var TRAIN_OPERATORS = {
|
|
|
4097
4093
|
{ name: "beta1", type: "number", description: "First moment decay", optional: true, defaultValue: 0.9 },
|
|
4098
4094
|
{ name: "beta2", type: "number", description: "Second moment decay", optional: true, defaultValue: 0.999 }
|
|
4099
4095
|
],
|
|
4100
|
-
example: '["train/adam", "
|
|
4096
|
+
example: '["train/adam", {"layers": [{"type": "dense", "units": 2}]}, 0.001]'
|
|
4101
4097
|
},
|
|
4102
4098
|
// ============================================================================
|
|
4103
4099
|
// Experience Replay (for RL)
|
|
@@ -4114,7 +4110,7 @@ var TRAIN_OPERATORS = {
|
|
|
4114
4110
|
{ name: "buffer", type: "array", description: "Experience buffer" },
|
|
4115
4111
|
{ name: "batchSize", type: "number", description: "Number of samples" }
|
|
4116
4112
|
],
|
|
4117
|
-
example: '["train/sampleBatch", "
|
|
4113
|
+
example: '["train/sampleBatch", [{"state": [0], "reward": 1}, {"state": [1], "reward": 0}], 2]'
|
|
4118
4114
|
},
|
|
4119
4115
|
"train/computeReturns": {
|
|
4120
4116
|
module: "train",
|
|
@@ -4128,7 +4124,7 @@ var TRAIN_OPERATORS = {
|
|
|
4128
4124
|
{ name: "rewards", type: "array", description: "Array of rewards" },
|
|
4129
4125
|
{ name: "gamma", type: "number", description: "Discount factor" }
|
|
4130
4126
|
],
|
|
4131
|
-
example: '["train/computeReturns",
|
|
4127
|
+
example: '["train/computeReturns", [1, 0, 1], 0.99]'
|
|
4132
4128
|
},
|
|
4133
4129
|
"train/computeAdvantages": {
|
|
4134
4130
|
module: "train",
|
|
@@ -4143,7 +4139,7 @@ var TRAIN_OPERATORS = {
|
|
|
4143
4139
|
{ name: "values", type: "tensor", description: "Value estimates" },
|
|
4144
4140
|
{ name: "config", type: "object", description: "Config with gamma, lambda" }
|
|
4145
4141
|
],
|
|
4146
|
-
example: '["train/computeAdvantages",
|
|
4142
|
+
example: '["train/computeAdvantages", [1, 0, 1], [0.5, 0.4, 0.3], { "gamma": 0.99, "lambda": 0.95 }]'
|
|
4147
4143
|
},
|
|
4148
4144
|
// ============================================================================
|
|
4149
4145
|
// ML lifecycle effects (bare aliases invoked by std ML behaviors)
|
|
@@ -4161,7 +4157,7 @@ var TRAIN_OPERATORS = {
|
|
|
4161
4157
|
{ name: "data", type: "array", description: "Training data (optional)" },
|
|
4162
4158
|
{ name: "config", type: "object", description: "Training config (optional)" }
|
|
4163
4159
|
],
|
|
4164
|
-
example: '["train", "
|
|
4160
|
+
example: '["train", {"layers": [{"type": "dense", "units": 2}]}, [[0, 1], [1, 0]], { "epochs": 100 }]'
|
|
4165
4161
|
},
|
|
4166
4162
|
"evaluate": {
|
|
4167
4163
|
module: "train",
|
|
@@ -4175,7 +4171,7 @@ var TRAIN_OPERATORS = {
|
|
|
4175
4171
|
{ name: "model", type: "nn/module", description: "The neural network module" },
|
|
4176
4172
|
{ name: "testCases", type: "array", description: "Test cases (optional)" }
|
|
4177
4173
|
],
|
|
4178
|
-
example: '["evaluate", "
|
|
4174
|
+
example: '["evaluate", {"layers": [{"type": "dense", "units": 2}]}, [{"input": [0], "expected": [1]}]]'
|
|
4179
4175
|
},
|
|
4180
4176
|
"checkpoint/save": {
|
|
4181
4177
|
module: "train",
|
|
@@ -4189,7 +4185,7 @@ var TRAIN_OPERATORS = {
|
|
|
4189
4185
|
{ name: "model", type: "nn/module", description: "The neural network module" },
|
|
4190
4186
|
{ name: "key", type: "string", description: "Checkpoint identifier" }
|
|
4191
4187
|
],
|
|
4192
|
-
example: '["checkpoint/save", "
|
|
4188
|
+
example: '["checkpoint/save", {"layers": [{"type": "dense", "units": 2}]}, "ckpt-1"]'
|
|
4193
4189
|
},
|
|
4194
4190
|
"checkpoint/load": {
|
|
4195
4191
|
module: "train",
|
|
@@ -4202,7 +4198,7 @@ var TRAIN_OPERATORS = {
|
|
|
4202
4198
|
params: [
|
|
4203
4199
|
{ name: "key", type: "string", description: "Checkpoint identifier" }
|
|
4204
4200
|
],
|
|
4205
|
-
example: '["checkpoint/load", "
|
|
4201
|
+
example: '["checkpoint/load", "ckpt-1"]'
|
|
4206
4202
|
}
|
|
4207
4203
|
};
|
|
4208
4204
|
function getTrainOperators() {
|
|
@@ -4225,7 +4221,7 @@ var GRAPH_OPERATORS = {
|
|
|
4225
4221
|
params: [
|
|
4226
4222
|
{ name: "config", type: "object", description: "Graph construction config (nodes, edges, node-features, edge-features, directed)" }
|
|
4227
4223
|
],
|
|
4228
|
-
example: '["graph/from-entities", { "
|
|
4224
|
+
example: '["graph/from-entities", [{ "age": 30, "score": 0.5 }, { "age": 25, "score": 0.7 }]]'
|
|
4229
4225
|
},
|
|
4230
4226
|
"graph/from-adjacency": {
|
|
4231
4227
|
module: "graph",
|
|
@@ -4239,7 +4235,7 @@ var GRAPH_OPERATORS = {
|
|
|
4239
4235
|
{ name: "adjacency", type: "tensor", description: "Adjacency matrix" },
|
|
4240
4236
|
{ name: "features", type: "tensor", description: "Node feature matrix" }
|
|
4241
4237
|
],
|
|
4242
|
-
example: '["graph/from-adjacency",
|
|
4238
|
+
example: '["graph/from-adjacency", [[0, 1], [1, 0]], [[1.0], [2.0]]]'
|
|
4243
4239
|
},
|
|
4244
4240
|
"graph/from-edge-list": {
|
|
4245
4241
|
module: "graph",
|
|
@@ -4253,7 +4249,7 @@ var GRAPH_OPERATORS = {
|
|
|
4253
4249
|
{ name: "edges", type: "tensor", description: "Edge index tensor [2, num_edges]" },
|
|
4254
4250
|
{ name: "features", type: "tensor", description: "Node feature matrix" }
|
|
4255
4251
|
],
|
|
4256
|
-
example: '["graph/from-edge-list",
|
|
4252
|
+
example: '["graph/from-edge-list", [[0, 1]], [[1.0], [2.0]]]'
|
|
4257
4253
|
},
|
|
4258
4254
|
// ============================================================================
|
|
4259
4255
|
// Transforms
|
|
@@ -4269,7 +4265,7 @@ var GRAPH_OPERATORS = {
|
|
|
4269
4265
|
params: [
|
|
4270
4266
|
{ name: "graph", type: "graph", description: "Input graph" }
|
|
4271
4267
|
],
|
|
4272
|
-
example: '["graph/add-self-loops", "
|
|
4268
|
+
example: '["graph/add-self-loops", ["graph/from-adjacency", [[0, 1], [1, 0]], [[1.0], [2.0]]]]'
|
|
4273
4269
|
},
|
|
4274
4270
|
"graph/to-undirected": {
|
|
4275
4271
|
module: "graph",
|
|
@@ -4282,7 +4278,7 @@ var GRAPH_OPERATORS = {
|
|
|
4282
4278
|
params: [
|
|
4283
4279
|
{ name: "graph", type: "graph", description: "Input graph" }
|
|
4284
4280
|
],
|
|
4285
|
-
example: '["graph/to-undirected", "
|
|
4281
|
+
example: '["graph/to-undirected", ["graph/from-adjacency", [[0, 1], [1, 0]], [[1.0], [2.0]]]]'
|
|
4286
4282
|
},
|
|
4287
4283
|
"graph/subgraph": {
|
|
4288
4284
|
module: "graph",
|
|
@@ -4296,7 +4292,7 @@ var GRAPH_OPERATORS = {
|
|
|
4296
4292
|
{ name: "graph", type: "graph", description: "Input graph" },
|
|
4297
4293
|
{ name: "mask", type: "tensor", description: "Boolean node mask" }
|
|
4298
4294
|
],
|
|
4299
|
-
example: '["graph/subgraph", "
|
|
4295
|
+
example: '["graph/subgraph", ["graph/from-adjacency", [[0, 1], [1, 0]], [[1.0], [2.0]]], [true, false]]'
|
|
4300
4296
|
},
|
|
4301
4297
|
"graph/k-hop": {
|
|
4302
4298
|
module: "graph",
|
|
@@ -4311,7 +4307,7 @@ var GRAPH_OPERATORS = {
|
|
|
4311
4307
|
{ name: "node", type: "number", description: "Center node index" },
|
|
4312
4308
|
{ name: "k", type: "number", description: "Number of hops" }
|
|
4313
4309
|
],
|
|
4314
|
-
example: '["graph/k-hop", "
|
|
4310
|
+
example: '["graph/k-hop", ["graph/from-adjacency", [[0, 1], [1, 0]], [[1.0], [2.0]]], 0, 2]'
|
|
4315
4311
|
},
|
|
4316
4312
|
// ============================================================================
|
|
4317
4313
|
// Accessors
|
|
@@ -4327,7 +4323,7 @@ var GRAPH_OPERATORS = {
|
|
|
4327
4323
|
params: [
|
|
4328
4324
|
{ name: "graph", type: "graph", description: "Input graph" }
|
|
4329
4325
|
],
|
|
4330
|
-
example: '["graph/node-features", "
|
|
4326
|
+
example: '["graph/node-features", ["graph/from-adjacency", [[0, 1], [1, 0]], [[1.0], [2.0]]]]'
|
|
4331
4327
|
},
|
|
4332
4328
|
"graph/edge-index": {
|
|
4333
4329
|
module: "graph",
|
|
@@ -4340,7 +4336,7 @@ var GRAPH_OPERATORS = {
|
|
|
4340
4336
|
params: [
|
|
4341
4337
|
{ name: "graph", type: "graph", description: "Input graph" }
|
|
4342
4338
|
],
|
|
4343
|
-
example: '["graph/edge-index", "
|
|
4339
|
+
example: '["graph/edge-index", ["graph/from-adjacency", [[0, 1], [1, 0]], [[1.0], [2.0]]]]'
|
|
4344
4340
|
},
|
|
4345
4341
|
"graph/edge-features": {
|
|
4346
4342
|
module: "graph",
|
|
@@ -4353,7 +4349,7 @@ var GRAPH_OPERATORS = {
|
|
|
4353
4349
|
params: [
|
|
4354
4350
|
{ name: "graph", type: "graph", description: "Input graph" }
|
|
4355
4351
|
],
|
|
4356
|
-
example: '["graph/edge-features", "
|
|
4352
|
+
example: '["graph/edge-features", ["graph/from-adjacency", [[0, 1], [1, 0]], [[1.0], [2.0]]]]'
|
|
4357
4353
|
},
|
|
4358
4354
|
"graph/num-nodes": {
|
|
4359
4355
|
module: "graph",
|
|
@@ -4366,7 +4362,7 @@ var GRAPH_OPERATORS = {
|
|
|
4366
4362
|
params: [
|
|
4367
4363
|
{ name: "graph", type: "graph", description: "Input graph" }
|
|
4368
4364
|
],
|
|
4369
|
-
example: '["graph/num-nodes", "
|
|
4365
|
+
example: '["graph/num-nodes", ["graph/from-adjacency", [[0, 1], [1, 0]], [[1.0], [2.0]]]]'
|
|
4370
4366
|
},
|
|
4371
4367
|
"graph/num-edges": {
|
|
4372
4368
|
module: "graph",
|
|
@@ -4379,7 +4375,7 @@ var GRAPH_OPERATORS = {
|
|
|
4379
4375
|
params: [
|
|
4380
4376
|
{ name: "graph", type: "graph", description: "Input graph" }
|
|
4381
4377
|
],
|
|
4382
|
-
example: '["graph/num-edges", "
|
|
4378
|
+
example: '["graph/num-edges", ["graph/from-adjacency", [[0, 1], [1, 0]], [[1.0], [2.0]]]]'
|
|
4383
4379
|
},
|
|
4384
4380
|
"graph/degree": {
|
|
4385
4381
|
module: "graph",
|
|
@@ -4392,7 +4388,7 @@ var GRAPH_OPERATORS = {
|
|
|
4392
4388
|
params: [
|
|
4393
4389
|
{ name: "graph", type: "graph", description: "Input graph" }
|
|
4394
4390
|
],
|
|
4395
|
-
example: '["graph/degree", "
|
|
4391
|
+
example: '["graph/degree", ["graph/from-adjacency", [[0, 1], [1, 0]], [[1.0], [2.0]]]]'
|
|
4396
4392
|
},
|
|
4397
4393
|
// ============================================================================
|
|
4398
4394
|
// Batching
|
|
@@ -4408,7 +4404,7 @@ var GRAPH_OPERATORS = {
|
|
|
4408
4404
|
params: [
|
|
4409
4405
|
{ name: "graphs", type: "array", description: "List of graphs" }
|
|
4410
4406
|
],
|
|
4411
|
-
example: '["graph/batch", "
|
|
4407
|
+
example: '["graph/batch", [["graph/from-adjacency", [[0, 1], [1, 0]], [[1.0], [2.0]]]]]'
|
|
4412
4408
|
}
|
|
4413
4409
|
};
|
|
4414
4410
|
function getGraphOperators() {
|
|
@@ -4432,7 +4428,7 @@ var CONTRACT_OPERATORS = {
|
|
|
4432
4428
|
{ name: "tensor", type: "tensor", description: "Input tensor" },
|
|
4433
4429
|
{ name: "contract", type: "object", description: "Input contract spec" }
|
|
4434
4430
|
],
|
|
4435
|
-
example: '["contract/validate-input",
|
|
4431
|
+
example: '["contract/validate-input", [0.5, 0.7], {"ranges": {"0": {"min": 0, "max": 1}, "1": {"min": 0, "max": 1}}}]'
|
|
4436
4432
|
},
|
|
4437
4433
|
"contract/validate-output": {
|
|
4438
4434
|
module: "contract",
|
|
@@ -4446,7 +4442,7 @@ var CONTRACT_OPERATORS = {
|
|
|
4446
4442
|
{ name: "tensor", type: "tensor", description: "Output tensor" },
|
|
4447
4443
|
{ name: "contract", type: "object", description: "Output contract spec" }
|
|
4448
4444
|
],
|
|
4449
|
-
example: '["contract/validate-output",
|
|
4445
|
+
example: '["contract/validate-output", [0.5, 0.7], {"ranges": {"0": {"min": 0, "max": 1}, "1": {"min": 0, "max": 1}}}]'
|
|
4450
4446
|
},
|
|
4451
4447
|
"contract/clamp-output": {
|
|
4452
4448
|
module: "contract",
|
|
@@ -4460,7 +4456,7 @@ var CONTRACT_OPERATORS = {
|
|
|
4460
4456
|
{ name: "tensor", type: "tensor", description: "Output tensor" },
|
|
4461
4457
|
{ name: "contract", type: "object", description: "Output contract spec" }
|
|
4462
4458
|
],
|
|
4463
|
-
example: '["contract/clamp-output",
|
|
4459
|
+
example: '["contract/clamp-output", [0.5, 1.7], {"ranges": {"0": {"min": 0, "max": 1}, "1": {"min": 0, "max": 1}}}]'
|
|
4464
4460
|
},
|
|
4465
4461
|
"contract/violations": {
|
|
4466
4462
|
module: "contract",
|
|
@@ -4474,7 +4470,7 @@ var CONTRACT_OPERATORS = {
|
|
|
4474
4470
|
{ name: "tensor", type: "tensor", description: "Tensor to check" },
|
|
4475
4471
|
{ name: "contract", type: "object", description: "Contract spec" }
|
|
4476
4472
|
],
|
|
4477
|
-
example: '["contract/violations",
|
|
4473
|
+
example: '["contract/violations", [0.5, 1.7], {"ranges": {"0": {"min": 0, "max": 1}, "1": {"min": 0, "max": 1}}}]'
|
|
4478
4474
|
},
|
|
4479
4475
|
// ============================================================================
|
|
4480
4476
|
// Conversion
|
|
@@ -4491,7 +4487,7 @@ var CONTRACT_OPERATORS = {
|
|
|
4491
4487
|
{ name: "entity", type: "object", description: "Entity data" },
|
|
4492
4488
|
{ name: "contract", type: "object", description: "Input contract mapping fields to dims" }
|
|
4493
4489
|
],
|
|
4494
|
-
example: '["contract/entity-to-tensor", "
|
|
4490
|
+
example: '["contract/entity-to-tensor", {"price": 10, "qty": 2}, {"fields": ["price", "qty"]}]'
|
|
4495
4491
|
},
|
|
4496
4492
|
"contract/tensor-to-payload": {
|
|
4497
4493
|
module: "contract",
|
|
@@ -4505,7 +4501,7 @@ var CONTRACT_OPERATORS = {
|
|
|
4505
4501
|
{ name: "tensor", type: "tensor", description: "Output tensor" },
|
|
4506
4502
|
{ name: "contract", type: "object", description: "Output contract mapping dims to fields" }
|
|
4507
4503
|
],
|
|
4508
|
-
example: '["contract/tensor-to-payload",
|
|
4504
|
+
example: '["contract/tensor-to-payload", [0.5, 0.7], {"fields": ["price", "qty"]}]'
|
|
4509
4505
|
}
|
|
4510
4506
|
};
|
|
4511
4507
|
function getContractOperators() {
|
|
@@ -4529,7 +4525,7 @@ var DATA_OPERATORS = {
|
|
|
4529
4525
|
{ name: "entities", type: "array", description: "Entity collection" },
|
|
4530
4526
|
{ name: "contracts", type: "object", description: "Input/output contract pair" }
|
|
4531
4527
|
],
|
|
4532
|
-
example: '["data/dataset", "
|
|
4528
|
+
example: '["data/dataset", [{"x": 1, "y": 2}], {"input": {"fields": ["x"]}, "output": {"fields": ["y"]}}]'
|
|
4533
4529
|
},
|
|
4534
4530
|
"data/dataloader": {
|
|
4535
4531
|
module: "data",
|
|
@@ -4543,7 +4539,7 @@ var DATA_OPERATORS = {
|
|
|
4543
4539
|
{ name: "dataset", type: "object", description: "Dataset" },
|
|
4544
4540
|
{ name: "config", type: "object", description: "Config with batch_size, shuffle, etc." }
|
|
4545
4541
|
],
|
|
4546
|
-
example: '["data/dataloader", "
|
|
4542
|
+
example: '["data/dataloader", ["data/dataset", [[1, 2], [3, 4], [5, 6]], {}], { "batch-size": 2, "shuffle": true }]'
|
|
4547
4543
|
},
|
|
4548
4544
|
"data/split": {
|
|
4549
4545
|
module: "data",
|
|
@@ -4557,7 +4553,7 @@ var DATA_OPERATORS = {
|
|
|
4557
4553
|
{ name: "dataset", type: "object", description: "Dataset" },
|
|
4558
4554
|
{ name: "config", type: "object", description: "Split config, e.g. { trainRatio: 0.8 }" }
|
|
4559
4555
|
],
|
|
4560
|
-
example: '["data/split", "
|
|
4556
|
+
example: '["data/split", ["data/dataset", [1, 2, 3, 4, 5], {}], { "trainRatio": 0.8 }]'
|
|
4561
4557
|
},
|
|
4562
4558
|
// ============================================================================
|
|
4563
4559
|
// Preprocessing
|
|
@@ -4574,7 +4570,7 @@ var DATA_OPERATORS = {
|
|
|
4574
4570
|
{ name: "tensor", type: "tensor", description: "Feature tensor" },
|
|
4575
4571
|
{ name: "config", type: "object", description: "Normalization config (method, per_dim, etc.)" }
|
|
4576
4572
|
],
|
|
4577
|
-
example: '["data/normalize",
|
|
4573
|
+
example: '["data/normalize", [[1, 2], [3, 4]], { "method": "standard" }]'
|
|
4578
4574
|
},
|
|
4579
4575
|
"data/augment": {
|
|
4580
4576
|
module: "data",
|
|
@@ -4588,7 +4584,7 @@ var DATA_OPERATORS = {
|
|
|
4588
4584
|
{ name: "dataset", type: "object", description: "Dataset" },
|
|
4589
4585
|
{ name: "config", type: "object", description: "Augmentation config" }
|
|
4590
4586
|
],
|
|
4591
|
-
example: '["data/augment",
|
|
4587
|
+
example: '["data/augment", [[1.0, 2.0], [3.0, 4.0]], { "flip": true, "rotate": 15 }]'
|
|
4592
4588
|
},
|
|
4593
4589
|
// ============================================================================
|
|
4594
4590
|
// Tokenization & Padding
|
|
@@ -4605,7 +4601,7 @@ var DATA_OPERATORS = {
|
|
|
4605
4601
|
{ name: "text", type: "string", description: "Text to tokenize" },
|
|
4606
4602
|
{ name: "config", type: "object", description: "Tokenizer config (method, vocab_size, max_length)" }
|
|
4607
4603
|
],
|
|
4608
|
-
example: '["data/tokenize", "
|
|
4604
|
+
example: '["data/tokenize", "hello world", { "method": "bpe", "max-length": 512 }]'
|
|
4609
4605
|
},
|
|
4610
4606
|
"data/pad": {
|
|
4611
4607
|
module: "data",
|
|
@@ -4619,7 +4615,7 @@ var DATA_OPERATORS = {
|
|
|
4619
4615
|
{ name: "sequences", type: "array", description: "List of token sequences" },
|
|
4620
4616
|
{ name: "config", type: "object", description: "Padding config (max_length, pad_value)" }
|
|
4621
4617
|
],
|
|
4622
|
-
example: '["data/pad",
|
|
4618
|
+
example: '["data/pad", [[1, 2, 3], [4, 5]], { "max-length": 4, "pad-value": 0 }]'
|
|
4623
4619
|
}
|
|
4624
4620
|
};
|
|
4625
4621
|
function getDataOperators() {
|
|
@@ -4732,7 +4728,7 @@ var PROB_OPERATORS = {
|
|
|
4732
4728
|
hasSideEffects: true,
|
|
4733
4729
|
returnType: "void",
|
|
4734
4730
|
params: [{ name: "predicate", type: "boolean", description: "Condition that must hold" }],
|
|
4735
|
-
example: '["prob/condition", [">",
|
|
4731
|
+
example: '["prob/condition", [">", 5, 0]]'
|
|
4736
4732
|
},
|
|
4737
4733
|
"prob/sample": {
|
|
4738
4734
|
module: "prob",
|
|
@@ -4762,7 +4758,7 @@ var PROB_OPERATORS = {
|
|
|
4762
4758
|
{ name: "query", type: "SExpr", description: "Query expression (lazy, value to collect)" },
|
|
4763
4759
|
{ name: "n", type: "number", description: "Number of samples to attempt" }
|
|
4764
4760
|
],
|
|
4765
|
-
example: '["prob/posterior",
|
|
4761
|
+
example: '["prob/posterior", ["prob/gaussian", 0, 1], [0.5], "mu", 5000]'
|
|
4766
4762
|
},
|
|
4767
4763
|
"prob/infer": {
|
|
4768
4764
|
module: "prob",
|
|
@@ -4778,7 +4774,7 @@ var PROB_OPERATORS = {
|
|
|
4778
4774
|
{ name: "query", type: "SExpr", description: "Query expression (lazy)" },
|
|
4779
4775
|
{ name: "n", type: "number", description: "Number of samples to attempt" }
|
|
4780
4776
|
],
|
|
4781
|
-
example: '["prob/infer",
|
|
4777
|
+
example: '["prob/infer", ["prob/gaussian", 0, 1], [0.5], "mu", 5000]'
|
|
4782
4778
|
},
|
|
4783
4779
|
// ========================================
|
|
4784
4780
|
// Statistics
|
|
@@ -4845,7 +4841,7 @@ var PROB_OPERATORS = {
|
|
|
4845
4841
|
{ name: "samples", type: "number[]", description: "Array of numeric samples" },
|
|
4846
4842
|
{ name: "alpha", type: "number", description: "Significance level (e.g., 0.05 for 95% interval)" }
|
|
4847
4843
|
],
|
|
4848
|
-
example: '["prob/credible-interval",
|
|
4844
|
+
example: '["prob/credible-interval", [1, 2, 3, 4, 5], 0.05] // => [lo, hi]'
|
|
4849
4845
|
}
|
|
4850
4846
|
};
|
|
4851
4847
|
function getProbOperators() {
|
|
@@ -5036,7 +5032,7 @@ var BROWSER_OPERATORS = {
|
|
|
5036
5032
|
kind: "custom",
|
|
5037
5033
|
produces: "string"
|
|
5038
5034
|
},
|
|
5039
|
-
example: '["browser/clipboard-write", "
|
|
5035
|
+
example: '["browser/clipboard-write", "https://example.com/invite/abc", { "emit": { "success": "COPIED", "failure": "COPY_DENIED" } }]'
|
|
5040
5036
|
},
|
|
5041
5037
|
"browser/push-subscribe": {
|
|
5042
5038
|
module: "browser",
|
|
@@ -5857,7 +5853,7 @@ var LLM_OPERATORS = {
|
|
|
5857
5853
|
{ name: "messages", type: { kind: "array", of: "LlmMessage" }, description: "Conversation messages" },
|
|
5858
5854
|
{ name: "tools", type: { kind: "array", of: "LlmToolDef" }, description: "Tool definitions available to the LLM" }
|
|
5859
5855
|
],
|
|
5860
|
-
example: '["llm/call-tools",
|
|
5856
|
+
example: '["llm/call-tools", [{"role": "user", "content": "What time is it?"}], [{"name": "getTime", "description": "Get current time", "parameters": {}}]]'
|
|
5861
5857
|
},
|
|
5862
5858
|
"llm/embed": {
|
|
5863
5859
|
module: "llm",
|
|
@@ -5881,7 +5877,7 @@ var LLM_OPERATORS = {
|
|
|
5881
5877
|
hasSideEffects: false,
|
|
5882
5878
|
returnType: "number",
|
|
5883
5879
|
params: [],
|
|
5884
|
-
example: '["llm/token-count"] => 12450'
|
|
5880
|
+
example: '["llm/token-count"] // => 12450'
|
|
5885
5881
|
},
|
|
5886
5882
|
"llm/switch": {
|
|
5887
5883
|
module: "llm",
|
|
@@ -5940,7 +5936,7 @@ var WORKSPACE_OPERATORS = {
|
|
|
5940
5936
|
{ name: "name", type: "string", description: "Orbital name" },
|
|
5941
5937
|
{ name: "def", type: { kind: "entityRef" }, description: "Orbital definition to write" }
|
|
5942
5938
|
],
|
|
5943
|
-
example: '["workspace/write-orbital", "ProductOrbital",
|
|
5939
|
+
example: '["workspace/write-orbital", "ProductOrbital", {"name": "ProductOrbital"}]'
|
|
5944
5940
|
},
|
|
5945
5941
|
"workspace/read-file": {
|
|
5946
5942
|
module: "workspace",
|
|
@@ -5965,7 +5961,7 @@ var WORKSPACE_OPERATORS = {
|
|
|
5965
5961
|
{ name: "path", type: "string", description: "File path relative to workspace root" },
|
|
5966
5962
|
{ name: "content", type: "string", description: "File content" }
|
|
5967
5963
|
],
|
|
5968
|
-
example: '["workspace/write-file", "orbitals/Product.orb",
|
|
5964
|
+
example: '["workspace/write-file", "orbitals/Product.orb", {"orbitals": []}]'
|
|
5969
5965
|
},
|
|
5970
5966
|
"workspace/exists": {
|
|
5971
5967
|
module: "workspace",
|
|
@@ -5987,7 +5983,7 @@ var WORKSPACE_OPERATORS = {
|
|
|
5987
5983
|
hasSideEffects: false,
|
|
5988
5984
|
returnType: "array",
|
|
5989
5985
|
params: [],
|
|
5990
|
-
example: '["workspace/list-orbitals"] => ["ProductOrbital", "CartOrbital"]'
|
|
5986
|
+
example: '["workspace/list-orbitals"] // => ["ProductOrbital", "CartOrbital"]'
|
|
5991
5987
|
},
|
|
5992
5988
|
"workspace/read-schema": {
|
|
5993
5989
|
module: "workspace",
|
|
@@ -6009,7 +6005,7 @@ var WORKSPACE_OPERATORS = {
|
|
|
6009
6005
|
hasSideEffects: true,
|
|
6010
6006
|
returnType: "void",
|
|
6011
6007
|
params: [{ name: "schema", type: { kind: "entityRef" }, description: "Composed schema" }],
|
|
6012
|
-
example: '["workspace/write-schema",
|
|
6008
|
+
example: '["workspace/write-schema", {"orbitals": [{"name": "ProductOrbital"}]}]'
|
|
6013
6009
|
},
|
|
6014
6010
|
"workspace/read-plan": {
|
|
6015
6011
|
module: "workspace",
|
|
@@ -6031,7 +6027,7 @@ var WORKSPACE_OPERATORS = {
|
|
|
6031
6027
|
hasSideEffects: true,
|
|
6032
6028
|
returnType: "void",
|
|
6033
6029
|
params: [{ name: "snapshot", type: { kind: "object", fields: { id: "string", status: "string" } }, description: "Plan snapshot" }],
|
|
6034
|
-
example: '["workspace/write-plan",
|
|
6030
|
+
example: '["workspace/write-plan", ["create entity", "add list page"]]'
|
|
6035
6031
|
},
|
|
6036
6032
|
"workspace/archive-orbital": {
|
|
6037
6033
|
module: "workspace",
|
|
@@ -6074,7 +6070,7 @@ var SESSION_OPERATORS = {
|
|
|
6074
6070
|
{ name: "orbitalName", type: "string", description: "Orbital name" },
|
|
6075
6071
|
{ name: "spec", type: { kind: "object", fields: { orbitalName: "string", organism: "string", method: "string" } }, description: "Orbital spec" }
|
|
6076
6072
|
],
|
|
6077
|
-
example: '["session/write-spec", "ProductOrbital",
|
|
6073
|
+
example: '["session/write-spec", "ProductOrbital", {"goal": "manage products"}]'
|
|
6078
6074
|
},
|
|
6079
6075
|
"session/read-memory": {
|
|
6080
6076
|
module: "session",
|
|
@@ -6099,7 +6095,7 @@ var SESSION_OPERATORS = {
|
|
|
6099
6095
|
{ name: "orbitalName", type: "string", description: "Orbital name" },
|
|
6100
6096
|
{ name: "memory", type: { kind: "object", fields: { entityName: "string", notes: { kind: "array", of: "string" } }, open: true }, description: "Orbital memory" }
|
|
6101
6097
|
],
|
|
6102
|
-
example: '["session/write-memory", "ProductOrbital",
|
|
6098
|
+
example: '["session/write-memory", "ProductOrbital", {"notes": ["initial draft"]}]'
|
|
6103
6099
|
},
|
|
6104
6100
|
"session/read-history": {
|
|
6105
6101
|
module: "session",
|
|
@@ -6124,7 +6120,7 @@ var SESSION_OPERATORS = {
|
|
|
6124
6120
|
{ name: "orbitalName", type: "string", description: "Orbital name" },
|
|
6125
6121
|
{ name: "entry", type: { kind: "object", fields: { role: "string", content: "string" } }, description: "History entry" }
|
|
6126
6122
|
],
|
|
6127
|
-
example: '["session/append-history", "ProductOrbital", { role: "user", content: "Add a search bar" }]'
|
|
6123
|
+
example: '["session/append-history", "ProductOrbital", { "role": "user", "content": "Add a search bar" }]'
|
|
6128
6124
|
},
|
|
6129
6125
|
"session/read-errors": {
|
|
6130
6126
|
module: "session",
|
|
@@ -6149,7 +6145,7 @@ var SESSION_OPERATORS = {
|
|
|
6149
6145
|
{ name: "orbitalName", type: "string", description: "Orbital name" },
|
|
6150
6146
|
{ name: "errors", type: { kind: "array", of: "ValidationError" }, description: "Validation errors" }
|
|
6151
6147
|
],
|
|
6152
|
-
example: '["session/write-errors", "ProductOrbital",
|
|
6148
|
+
example: '["session/write-errors", "ProductOrbital", []]'
|
|
6153
6149
|
},
|
|
6154
6150
|
"session/read-analysis": {
|
|
6155
6151
|
module: "session",
|
|
@@ -6230,7 +6226,7 @@ var TRACE_OPERATORS = {
|
|
|
6230
6226
|
{ name: "event", type: "string", description: "Event type name" },
|
|
6231
6227
|
{ name: "payload", type: { kind: "object", fields: {}, open: true }, description: "Event payload", optional: true }
|
|
6232
6228
|
],
|
|
6233
|
-
example: '["trace/emit", "coordinator_state_changed", {
|
|
6229
|
+
example: '["trace/emit", "coordinator_state_changed", {"phase": "planning"}]'
|
|
6234
6230
|
},
|
|
6235
6231
|
"trace/log": {
|
|
6236
6232
|
module: "trace",
|
|
@@ -6288,7 +6284,7 @@ var BEHAVIOR_OPERATORS = {
|
|
|
6288
6284
|
{ name: "orbitalName", type: "string", description: "Canonical orbital name to instantiate" },
|
|
6289
6285
|
{ name: "overrides", type: { kind: "object", fields: { linkedEntity: "string", method: "string" }, open: true }, description: "Override surface: linkedEntity, events, config, fields", optional: true }
|
|
6290
6286
|
],
|
|
6291
|
-
example: '["behavior/instantiate", "std-ecommerce", "ProductOrbital", { linkedEntity: "Product" }]'
|
|
6287
|
+
example: '["behavior/instantiate", "std-ecommerce", "ProductOrbital", { "linkedEntity": "Product" }]'
|
|
6292
6288
|
},
|
|
6293
6289
|
"behavior/call": {
|
|
6294
6290
|
module: "behavior",
|
|
@@ -6318,7 +6314,7 @@ var BEHAVIOR_OPERATORS = {
|
|
|
6318
6314
|
{ name: "palette", type: { kind: "object", fields: { topics: { kind: "array", of: "string" }, hints: { kind: "array", of: "string" } } }, description: "Topic-tree palette + primitive hints" },
|
|
6319
6315
|
{ name: "deltaPrompt", type: "string", description: "Per-orbital instruction prompt" }
|
|
6320
6316
|
],
|
|
6321
|
-
example: '["lolo/emit-body", "PlayerOrbital", { topics: ["game/2d"] }, "player ship with movement"]'
|
|
6317
|
+
example: '["lolo/emit-body", "PlayerOrbital", { "topics": ["game/2d"] }, "player ship with movement"]'
|
|
6322
6318
|
},
|
|
6323
6319
|
"validate/validate": {
|
|
6324
6320
|
module: "behavior",
|
|
@@ -6355,7 +6351,7 @@ var INTEGRATION_OPERATORS = {
|
|
|
6355
6351
|
{ name: "responseSchema", type: { kind: "object", fields: {}, open: true }, description: "JSON Schema the response must satisfy" },
|
|
6356
6352
|
{ name: "body", type: { kind: "object", fields: {}, open: true }, description: "Request body (for POST/PUT)", optional: true }
|
|
6357
6353
|
],
|
|
6358
|
-
example: '["integration/http", "GET", "https://api.github.com/repos/foo/bar", { name: "string", stars: "number" }]'
|
|
6354
|
+
example: '["integration/http", "GET", "https://api.github.com/repos/foo/bar", { "name": "string", "stars": "number" }]'
|
|
6359
6355
|
},
|
|
6360
6356
|
"integration/github-get-repo": {
|
|
6361
6357
|
module: "integration",
|