@almadar/std 3.2.3 → 3.3.5
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/LICENSE +72 -21
- package/README.md +1 -1
- package/behaviors/exports/atoms/std-combat-log.orb +12 -12
- package/behaviors/exports/atoms/std-dialogue-box.orb +11 -11
- package/behaviors/exports/atoms/std-game-audio.orb +9 -9
- package/behaviors/exports/atoms/std-game-canvas3d.orb +24 -24
- package/behaviors/exports/atoms/std-game-hud.orb +10 -10
- package/behaviors/exports/atoms/std-game-menu.orb +12 -12
- package/behaviors/exports/atoms/std-game-over-screen.orb +9 -9
- package/behaviors/exports/atoms/std-inventory-panel.orb +13 -13
- package/behaviors/exports/atoms/std-isometric-canvas.orb +9 -9
- package/behaviors/exports/atoms/std-platformer-canvas.orb +9 -9
- package/behaviors/exports/atoms/std-score-board.orb +9 -9
- package/behaviors/exports/atoms/std-selection.orb +32 -18
- package/behaviors/exports/atoms/std-service-custom-bearer.orb +557 -0
- package/behaviors/exports/atoms/std-service-custom-header.orb +559 -0
- package/behaviors/exports/atoms/std-service-custom-noauth.orb +553 -0
- package/behaviors/exports/atoms/std-service-custom-query.orb +559 -0
- package/behaviors/exports/atoms/std-service-email.orb +540 -0
- package/behaviors/exports/atoms/std-service-github.orb +586 -0
- package/behaviors/exports/atoms/std-service-llm.orb +671 -0
- package/behaviors/exports/atoms/std-service-oauth.orb +764 -0
- package/behaviors/exports/atoms/std-service-redis.orb +580 -0
- package/behaviors/exports/atoms/std-service-storage.orb +664 -0
- package/behaviors/exports/atoms/std-service-stripe.orb +639 -0
- package/behaviors/exports/atoms/std-service-twilio.orb +611 -0
- package/behaviors/exports/atoms/std-service-youtube.orb +696 -0
- package/behaviors/exports/atoms/std-simulation-canvas.orb +9 -9
- package/behaviors/exports/atoms/std-sprite.orb +17 -17
- package/behaviors/exports/atoms/std-validate-on-save.orb +623 -0
- package/behaviors/exports/molecules/std-quiz.orb +48 -24
- package/behaviors/exports/molecules/std-service-content-pipeline.orb +915 -0
- package/behaviors/exports/molecules/std-service-custom-api-tester.orb +860 -0
- package/behaviors/exports/molecules/std-service-devops-toolkit.orb +1526 -0
- package/behaviors/exports/molecules/std-service-notification-hub.orb +696 -0
- package/behaviors/exports/molecules/std-service-payment-flow.orb +873 -0
- package/behaviors/exports/organisms/std-service-marketplace.orb +5191 -0
- package/behaviors/exports/organisms/std-service-research-assistant.orb +3568 -0
- package/behaviors/exports/test-schemas/os-trigger-simulation.orb +202 -0
- package/behaviors/exports/validation-report.json +2 -2
- package/dist/behaviors/exports/atoms/std-combat-log.orb +12 -12
- package/dist/behaviors/exports/atoms/std-dialogue-box.orb +11 -11
- package/dist/behaviors/exports/atoms/std-game-audio.orb +9 -9
- package/dist/behaviors/exports/atoms/std-game-canvas3d.orb +24 -24
- package/dist/behaviors/exports/atoms/std-game-hud.orb +10 -10
- package/dist/behaviors/exports/atoms/std-game-menu.orb +12 -12
- package/dist/behaviors/exports/atoms/std-game-over-screen.orb +9 -9
- package/dist/behaviors/exports/atoms/std-inventory-panel.orb +13 -13
- package/dist/behaviors/exports/atoms/std-isometric-canvas.orb +9 -9
- package/dist/behaviors/exports/atoms/std-platformer-canvas.orb +9 -9
- package/dist/behaviors/exports/atoms/std-score-board.orb +9 -9
- package/dist/behaviors/exports/atoms/std-selection.orb +32 -18
- package/dist/behaviors/exports/atoms/std-service-custom-bearer.orb +557 -0
- package/dist/behaviors/exports/atoms/std-service-custom-header.orb +559 -0
- package/dist/behaviors/exports/atoms/std-service-custom-noauth.orb +553 -0
- package/dist/behaviors/exports/atoms/std-service-custom-query.orb +559 -0
- package/dist/behaviors/exports/atoms/std-service-email.orb +540 -0
- package/dist/behaviors/exports/atoms/std-service-github.orb +586 -0
- package/dist/behaviors/exports/atoms/std-service-llm.orb +671 -0
- package/dist/behaviors/exports/atoms/std-service-oauth.orb +764 -0
- package/dist/behaviors/exports/atoms/std-service-redis.orb +580 -0
- package/dist/behaviors/exports/atoms/std-service-storage.orb +664 -0
- package/dist/behaviors/exports/atoms/std-service-stripe.orb +639 -0
- package/dist/behaviors/exports/atoms/std-service-twilio.orb +611 -0
- package/dist/behaviors/exports/atoms/std-service-youtube.orb +696 -0
- package/dist/behaviors/exports/atoms/std-simulation-canvas.orb +9 -9
- package/dist/behaviors/exports/atoms/std-sprite.orb +17 -17
- package/dist/behaviors/exports/atoms/std-validate-on-save.orb +623 -0
- package/dist/behaviors/exports/molecules/std-quiz.orb +48 -24
- package/dist/behaviors/exports/molecules/std-service-content-pipeline.orb +915 -0
- package/dist/behaviors/exports/molecules/std-service-custom-api-tester.orb +860 -0
- package/dist/behaviors/exports/molecules/std-service-devops-toolkit.orb +1526 -0
- package/dist/behaviors/exports/molecules/std-service-notification-hub.orb +696 -0
- package/dist/behaviors/exports/molecules/std-service-payment-flow.orb +873 -0
- package/dist/behaviors/exports/organisms/std-service-marketplace.orb +5191 -0
- package/dist/behaviors/exports/organisms/std-service-research-assistant.orb +3568 -0
- package/dist/behaviors/exports/test-schemas/os-trigger-simulation.orb +202 -0
- package/dist/behaviors/exports/validation-report.json +2 -2
- package/dist/behaviors/functions/index.d.ts +662 -1
- package/dist/behaviors/functions/index.js +7638 -2117
- package/dist/behaviors/functions/index.js.map +1 -1
- package/dist/behaviors/index.d.ts +1 -1
- package/dist/behaviors/index.js +7638 -2117
- package/dist/behaviors/index.js.map +1 -1
- package/dist/exports/atoms/std-combat-log.orb +12 -12
- package/dist/exports/atoms/std-dialogue-box.orb +11 -11
- package/dist/exports/atoms/std-game-audio.orb +9 -9
- package/dist/exports/atoms/std-game-canvas3d.orb +24 -24
- package/dist/exports/atoms/std-game-hud.orb +10 -10
- package/dist/exports/atoms/std-game-menu.orb +12 -12
- package/dist/exports/atoms/std-game-over-screen.orb +9 -9
- package/dist/exports/atoms/std-inventory-panel.orb +13 -13
- package/dist/exports/atoms/std-isometric-canvas.orb +9 -9
- package/dist/exports/atoms/std-platformer-canvas.orb +9 -9
- package/dist/exports/atoms/std-score-board.orb +9 -9
- package/dist/exports/atoms/std-selection.orb +32 -18
- package/dist/exports/atoms/std-service-custom-bearer.orb +557 -0
- package/dist/exports/atoms/std-service-custom-header.orb +559 -0
- package/dist/exports/atoms/std-service-custom-noauth.orb +553 -0
- package/dist/exports/atoms/std-service-custom-query.orb +559 -0
- package/dist/exports/atoms/std-service-email.orb +540 -0
- package/dist/exports/atoms/std-service-github.orb +586 -0
- package/dist/exports/atoms/std-service-llm.orb +671 -0
- package/dist/exports/atoms/std-service-oauth.orb +764 -0
- package/dist/exports/atoms/std-service-redis.orb +580 -0
- package/dist/exports/atoms/std-service-storage.orb +664 -0
- package/dist/exports/atoms/std-service-stripe.orb +639 -0
- package/dist/exports/atoms/std-service-twilio.orb +611 -0
- package/dist/exports/atoms/std-service-youtube.orb +696 -0
- package/dist/exports/atoms/std-simulation-canvas.orb +9 -9
- package/dist/exports/atoms/std-sprite.orb +17 -17
- package/dist/exports/atoms/std-validate-on-save.orb +623 -0
- package/dist/exports/molecules/std-quiz.orb +48 -24
- package/dist/exports/molecules/std-service-content-pipeline.orb +915 -0
- package/dist/exports/molecules/std-service-custom-api-tester.orb +860 -0
- package/dist/exports/molecules/std-service-devops-toolkit.orb +1526 -0
- package/dist/exports/molecules/std-service-notification-hub.orb +696 -0
- package/dist/exports/molecules/std-service-payment-flow.orb +873 -0
- package/dist/exports/organisms/std-service-marketplace.orb +5191 -0
- package/dist/exports/organisms/std-service-research-assistant.orb +3568 -0
- package/dist/exports/test-schemas/os-trigger-simulation.orb +202 -0
- package/dist/exports/validation-report.json +2 -2
- package/dist/index.d.ts +3 -3
- package/dist/index.js +7887 -2216
- package/dist/index.js.map +1 -1
- package/dist/modules/array.d.ts +1 -1
- package/dist/modules/async.d.ts +1 -1
- package/dist/modules/contract.d.ts +22 -0
- package/dist/modules/contract.js +100 -0
- package/dist/modules/contract.js.map +1 -0
- package/dist/modules/data.d.ts +22 -0
- package/dist/modules/data.js +117 -0
- package/dist/modules/data.js.map +1 -0
- package/dist/modules/format.d.ts +1 -1
- package/dist/modules/graph.d.ts +23 -0
- package/dist/modules/graph.js +209 -0
- package/dist/modules/graph.js.map +1 -0
- package/dist/modules/index.d.ts +5 -1
- package/dist/modules/index.js +593 -63
- package/dist/modules/index.js.map +1 -1
- package/dist/modules/math.d.ts +1 -1
- package/dist/modules/nn.d.ts +1 -1
- package/dist/modules/nn.js +14 -14
- package/dist/modules/nn.js.map +1 -1
- package/dist/modules/object.d.ts +1 -1
- package/dist/modules/os.d.ts +19 -0
- package/dist/modules/os.js +116 -0
- package/dist/modules/os.js.map +1 -0
- package/dist/modules/prob.d.ts +1 -1
- package/dist/modules/str.d.ts +1 -1
- package/dist/modules/tensor.d.ts +1 -1
- package/dist/modules/tensor.js +29 -29
- package/dist/modules/tensor.js.map +1 -1
- package/dist/modules/time.d.ts +1 -1
- package/dist/modules/train.d.ts +1 -1
- package/dist/modules/train.js +19 -19
- package/dist/modules/train.js.map +1 -1
- package/dist/modules/validate.d.ts +1 -1
- package/dist/registry.d.ts +2 -2
- package/dist/registry.js +184 -65
- package/dist/registry.js.map +1 -1
- package/dist/{types-CmNM_IbV.d.ts → types-DOeGXRCm.d.ts} +3 -3
- package/package.json +4 -4
package/dist/modules/index.js
CHANGED
|
@@ -2243,7 +2243,7 @@ function getAsyncOperators() {
|
|
|
2243
2243
|
var NN_OPERATORS = {
|
|
2244
2244
|
"nn/sequential": {
|
|
2245
2245
|
module: "nn",
|
|
2246
|
-
category: "
|
|
2246
|
+
category: "ml-arch",
|
|
2247
2247
|
minArity: 1,
|
|
2248
2248
|
maxArity: null,
|
|
2249
2249
|
description: "Create a sequential neural network from layers",
|
|
@@ -2256,7 +2256,7 @@ var NN_OPERATORS = {
|
|
|
2256
2256
|
},
|
|
2257
2257
|
"nn/linear": {
|
|
2258
2258
|
module: "nn",
|
|
2259
|
-
category: "
|
|
2259
|
+
category: "ml-arch",
|
|
2260
2260
|
minArity: 2,
|
|
2261
2261
|
maxArity: 2,
|
|
2262
2262
|
description: "Fully connected linear layer (output = input * weights + bias)",
|
|
@@ -2270,7 +2270,7 @@ var NN_OPERATORS = {
|
|
|
2270
2270
|
},
|
|
2271
2271
|
"nn/relu": {
|
|
2272
2272
|
module: "nn",
|
|
2273
|
-
category: "
|
|
2273
|
+
category: "ml-arch",
|
|
2274
2274
|
minArity: 0,
|
|
2275
2275
|
maxArity: 0,
|
|
2276
2276
|
description: "ReLU activation function: max(0, x)",
|
|
@@ -2281,7 +2281,7 @@ var NN_OPERATORS = {
|
|
|
2281
2281
|
},
|
|
2282
2282
|
"nn/tanh": {
|
|
2283
2283
|
module: "nn",
|
|
2284
|
-
category: "
|
|
2284
|
+
category: "ml-arch",
|
|
2285
2285
|
minArity: 0,
|
|
2286
2286
|
maxArity: 0,
|
|
2287
2287
|
description: "Tanh activation function: (e^x - e^-x) / (e^x + e^-x)",
|
|
@@ -2292,7 +2292,7 @@ var NN_OPERATORS = {
|
|
|
2292
2292
|
},
|
|
2293
2293
|
"nn/sigmoid": {
|
|
2294
2294
|
module: "nn",
|
|
2295
|
-
category: "
|
|
2295
|
+
category: "ml-arch",
|
|
2296
2296
|
minArity: 0,
|
|
2297
2297
|
maxArity: 0,
|
|
2298
2298
|
description: "Sigmoid activation function: 1 / (1 + e^-x)",
|
|
@@ -2303,7 +2303,7 @@ var NN_OPERATORS = {
|
|
|
2303
2303
|
},
|
|
2304
2304
|
"nn/softmax": {
|
|
2305
2305
|
module: "nn",
|
|
2306
|
-
category: "
|
|
2306
|
+
category: "ml-arch",
|
|
2307
2307
|
minArity: 0,
|
|
2308
2308
|
maxArity: 1,
|
|
2309
2309
|
description: "Softmax activation function (normalizes to probability distribution)",
|
|
@@ -2316,7 +2316,7 @@ var NN_OPERATORS = {
|
|
|
2316
2316
|
},
|
|
2317
2317
|
"nn/dropout": {
|
|
2318
2318
|
module: "nn",
|
|
2319
|
-
category: "
|
|
2319
|
+
category: "ml-arch",
|
|
2320
2320
|
minArity: 0,
|
|
2321
2321
|
maxArity: 1,
|
|
2322
2322
|
description: "Dropout layer for regularization (randomly zeros elements during training)",
|
|
@@ -2329,7 +2329,7 @@ var NN_OPERATORS = {
|
|
|
2329
2329
|
},
|
|
2330
2330
|
"nn/batchnorm": {
|
|
2331
2331
|
module: "nn",
|
|
2332
|
-
category: "
|
|
2332
|
+
category: "ml-arch",
|
|
2333
2333
|
minArity: 1,
|
|
2334
2334
|
maxArity: 1,
|
|
2335
2335
|
description: "Batch normalization layer",
|
|
@@ -2342,7 +2342,7 @@ var NN_OPERATORS = {
|
|
|
2342
2342
|
},
|
|
2343
2343
|
"nn/layernorm": {
|
|
2344
2344
|
module: "nn",
|
|
2345
|
-
category: "
|
|
2345
|
+
category: "ml-arch",
|
|
2346
2346
|
minArity: 1,
|
|
2347
2347
|
maxArity: 1,
|
|
2348
2348
|
description: "Layer normalization",
|
|
@@ -2355,7 +2355,7 @@ var NN_OPERATORS = {
|
|
|
2355
2355
|
},
|
|
2356
2356
|
"nn/forward": {
|
|
2357
2357
|
module: "nn",
|
|
2358
|
-
category: "
|
|
2358
|
+
category: "ml-effect",
|
|
2359
2359
|
minArity: 2,
|
|
2360
2360
|
maxArity: 2,
|
|
2361
2361
|
description: "Execute forward pass through network",
|
|
@@ -2369,7 +2369,7 @@ var NN_OPERATORS = {
|
|
|
2369
2369
|
},
|
|
2370
2370
|
"nn/getWeights": {
|
|
2371
2371
|
module: "nn",
|
|
2372
|
-
category: "
|
|
2372
|
+
category: "ml-arch",
|
|
2373
2373
|
minArity: 1,
|
|
2374
2374
|
maxArity: 1,
|
|
2375
2375
|
description: "Get network weights as a flat tensor",
|
|
@@ -2382,7 +2382,7 @@ var NN_OPERATORS = {
|
|
|
2382
2382
|
},
|
|
2383
2383
|
"nn/setWeights": {
|
|
2384
2384
|
module: "nn",
|
|
2385
|
-
category: "
|
|
2385
|
+
category: "ml-arch",
|
|
2386
2386
|
minArity: 2,
|
|
2387
2387
|
maxArity: 2,
|
|
2388
2388
|
description: "Set network weights from a flat tensor",
|
|
@@ -2396,7 +2396,7 @@ var NN_OPERATORS = {
|
|
|
2396
2396
|
},
|
|
2397
2397
|
"nn/paramCount": {
|
|
2398
2398
|
module: "nn",
|
|
2399
|
-
category: "
|
|
2399
|
+
category: "ml-arch",
|
|
2400
2400
|
minArity: 1,
|
|
2401
2401
|
maxArity: 1,
|
|
2402
2402
|
description: "Get total number of trainable parameters",
|
|
@@ -2409,7 +2409,7 @@ var NN_OPERATORS = {
|
|
|
2409
2409
|
},
|
|
2410
2410
|
"nn/clone": {
|
|
2411
2411
|
module: "nn",
|
|
2412
|
-
category: "
|
|
2412
|
+
category: "ml-arch",
|
|
2413
2413
|
minArity: 1,
|
|
2414
2414
|
maxArity: 1,
|
|
2415
2415
|
description: "Create a deep copy of the network with same weights",
|
|
@@ -2432,7 +2432,7 @@ var TENSOR_OPERATORS = {
|
|
|
2432
2432
|
// ============================================================================
|
|
2433
2433
|
"tensor/from": {
|
|
2434
2434
|
module: "tensor",
|
|
2435
|
-
category: "
|
|
2435
|
+
category: "ml-tensor",
|
|
2436
2436
|
minArity: 1,
|
|
2437
2437
|
maxArity: 1,
|
|
2438
2438
|
description: "Create tensor from array",
|
|
@@ -2445,7 +2445,7 @@ var TENSOR_OPERATORS = {
|
|
|
2445
2445
|
},
|
|
2446
2446
|
"tensor/zeros": {
|
|
2447
2447
|
module: "tensor",
|
|
2448
|
-
category: "
|
|
2448
|
+
category: "ml-tensor",
|
|
2449
2449
|
minArity: 1,
|
|
2450
2450
|
maxArity: 1,
|
|
2451
2451
|
description: "Create tensor filled with zeros",
|
|
@@ -2458,7 +2458,7 @@ var TENSOR_OPERATORS = {
|
|
|
2458
2458
|
},
|
|
2459
2459
|
"tensor/ones": {
|
|
2460
2460
|
module: "tensor",
|
|
2461
|
-
category: "
|
|
2461
|
+
category: "ml-tensor",
|
|
2462
2462
|
minArity: 1,
|
|
2463
2463
|
maxArity: 1,
|
|
2464
2464
|
description: "Create tensor filled with ones",
|
|
@@ -2471,7 +2471,7 @@ var TENSOR_OPERATORS = {
|
|
|
2471
2471
|
},
|
|
2472
2472
|
"tensor/rand": {
|
|
2473
2473
|
module: "tensor",
|
|
2474
|
-
category: "
|
|
2474
|
+
category: "ml-tensor",
|
|
2475
2475
|
minArity: 1,
|
|
2476
2476
|
maxArity: 1,
|
|
2477
2477
|
description: "Create tensor with random values in [0, 1)",
|
|
@@ -2484,7 +2484,7 @@ var TENSOR_OPERATORS = {
|
|
|
2484
2484
|
},
|
|
2485
2485
|
"tensor/randn": {
|
|
2486
2486
|
module: "tensor",
|
|
2487
|
-
category: "
|
|
2487
|
+
category: "ml-tensor",
|
|
2488
2488
|
minArity: 1,
|
|
2489
2489
|
maxArity: 1,
|
|
2490
2490
|
description: "Create tensor with random values from standard normal distribution",
|
|
@@ -2500,7 +2500,7 @@ var TENSOR_OPERATORS = {
|
|
|
2500
2500
|
// ============================================================================
|
|
2501
2501
|
"tensor/shape": {
|
|
2502
2502
|
module: "tensor",
|
|
2503
|
-
category: "
|
|
2503
|
+
category: "ml-tensor",
|
|
2504
2504
|
minArity: 1,
|
|
2505
2505
|
maxArity: 1,
|
|
2506
2506
|
description: "Get tensor shape as array",
|
|
@@ -2513,7 +2513,7 @@ var TENSOR_OPERATORS = {
|
|
|
2513
2513
|
},
|
|
2514
2514
|
"tensor/get": {
|
|
2515
2515
|
module: "tensor",
|
|
2516
|
-
category: "
|
|
2516
|
+
category: "ml-tensor",
|
|
2517
2517
|
minArity: 2,
|
|
2518
2518
|
maxArity: 2,
|
|
2519
2519
|
description: "Get element at index",
|
|
@@ -2527,7 +2527,7 @@ var TENSOR_OPERATORS = {
|
|
|
2527
2527
|
},
|
|
2528
2528
|
"tensor/slice": {
|
|
2529
2529
|
module: "tensor",
|
|
2530
|
-
category: "
|
|
2530
|
+
category: "ml-tensor",
|
|
2531
2531
|
minArity: 3,
|
|
2532
2532
|
maxArity: 3,
|
|
2533
2533
|
description: "Get slice of tensor",
|
|
@@ -2542,7 +2542,7 @@ var TENSOR_OPERATORS = {
|
|
|
2542
2542
|
},
|
|
2543
2543
|
"tensor/reshape": {
|
|
2544
2544
|
module: "tensor",
|
|
2545
|
-
category: "
|
|
2545
|
+
category: "ml-tensor",
|
|
2546
2546
|
minArity: 2,
|
|
2547
2547
|
maxArity: 2,
|
|
2548
2548
|
description: "Reshape tensor to new shape (total elements must match)",
|
|
@@ -2556,7 +2556,7 @@ var TENSOR_OPERATORS = {
|
|
|
2556
2556
|
},
|
|
2557
2557
|
"tensor/flatten": {
|
|
2558
2558
|
module: "tensor",
|
|
2559
|
-
category: "
|
|
2559
|
+
category: "ml-tensor",
|
|
2560
2560
|
minArity: 1,
|
|
2561
2561
|
maxArity: 1,
|
|
2562
2562
|
description: "Flatten tensor to 1D",
|
|
@@ -2572,7 +2572,7 @@ var TENSOR_OPERATORS = {
|
|
|
2572
2572
|
// ============================================================================
|
|
2573
2573
|
"tensor/add": {
|
|
2574
2574
|
module: "tensor",
|
|
2575
|
-
category: "
|
|
2575
|
+
category: "ml-tensor",
|
|
2576
2576
|
minArity: 2,
|
|
2577
2577
|
maxArity: 2,
|
|
2578
2578
|
description: "Element-wise addition",
|
|
@@ -2586,7 +2586,7 @@ var TENSOR_OPERATORS = {
|
|
|
2586
2586
|
},
|
|
2587
2587
|
"tensor/sub": {
|
|
2588
2588
|
module: "tensor",
|
|
2589
|
-
category: "
|
|
2589
|
+
category: "ml-tensor",
|
|
2590
2590
|
minArity: 2,
|
|
2591
2591
|
maxArity: 2,
|
|
2592
2592
|
description: "Element-wise subtraction",
|
|
@@ -2600,7 +2600,7 @@ var TENSOR_OPERATORS = {
|
|
|
2600
2600
|
},
|
|
2601
2601
|
"tensor/mul": {
|
|
2602
2602
|
module: "tensor",
|
|
2603
|
-
category: "
|
|
2603
|
+
category: "ml-tensor",
|
|
2604
2604
|
minArity: 2,
|
|
2605
2605
|
maxArity: 2,
|
|
2606
2606
|
description: "Element-wise multiplication",
|
|
@@ -2614,7 +2614,7 @@ var TENSOR_OPERATORS = {
|
|
|
2614
2614
|
},
|
|
2615
2615
|
"tensor/div": {
|
|
2616
2616
|
module: "tensor",
|
|
2617
|
-
category: "
|
|
2617
|
+
category: "ml-tensor",
|
|
2618
2618
|
minArity: 2,
|
|
2619
2619
|
maxArity: 2,
|
|
2620
2620
|
description: "Element-wise division",
|
|
@@ -2628,7 +2628,7 @@ var TENSOR_OPERATORS = {
|
|
|
2628
2628
|
},
|
|
2629
2629
|
"tensor/matmul": {
|
|
2630
2630
|
module: "tensor",
|
|
2631
|
-
category: "
|
|
2631
|
+
category: "ml-tensor",
|
|
2632
2632
|
minArity: 2,
|
|
2633
2633
|
maxArity: 2,
|
|
2634
2634
|
description: "Matrix multiplication",
|
|
@@ -2642,7 +2642,7 @@ var TENSOR_OPERATORS = {
|
|
|
2642
2642
|
},
|
|
2643
2643
|
"tensor/dot": {
|
|
2644
2644
|
module: "tensor",
|
|
2645
|
-
category: "
|
|
2645
|
+
category: "ml-tensor",
|
|
2646
2646
|
minArity: 2,
|
|
2647
2647
|
maxArity: 2,
|
|
2648
2648
|
description: "Dot product of two 1D tensors",
|
|
@@ -2659,7 +2659,7 @@ var TENSOR_OPERATORS = {
|
|
|
2659
2659
|
// ============================================================================
|
|
2660
2660
|
"tensor/sum": {
|
|
2661
2661
|
module: "tensor",
|
|
2662
|
-
category: "
|
|
2662
|
+
category: "ml-tensor",
|
|
2663
2663
|
minArity: 1,
|
|
2664
2664
|
maxArity: 2,
|
|
2665
2665
|
description: "Sum of tensor elements",
|
|
@@ -2673,7 +2673,7 @@ var TENSOR_OPERATORS = {
|
|
|
2673
2673
|
},
|
|
2674
2674
|
"tensor/mean": {
|
|
2675
2675
|
module: "tensor",
|
|
2676
|
-
category: "
|
|
2676
|
+
category: "ml-tensor",
|
|
2677
2677
|
minArity: 1,
|
|
2678
2678
|
maxArity: 2,
|
|
2679
2679
|
description: "Mean of tensor elements",
|
|
@@ -2687,7 +2687,7 @@ var TENSOR_OPERATORS = {
|
|
|
2687
2687
|
},
|
|
2688
2688
|
"tensor/max": {
|
|
2689
2689
|
module: "tensor",
|
|
2690
|
-
category: "
|
|
2690
|
+
category: "ml-tensor",
|
|
2691
2691
|
minArity: 1,
|
|
2692
2692
|
maxArity: 2,
|
|
2693
2693
|
description: "Maximum value in tensor",
|
|
@@ -2701,7 +2701,7 @@ var TENSOR_OPERATORS = {
|
|
|
2701
2701
|
},
|
|
2702
2702
|
"tensor/min": {
|
|
2703
2703
|
module: "tensor",
|
|
2704
|
-
category: "
|
|
2704
|
+
category: "ml-tensor",
|
|
2705
2705
|
minArity: 1,
|
|
2706
2706
|
maxArity: 2,
|
|
2707
2707
|
description: "Minimum value in tensor",
|
|
@@ -2715,7 +2715,7 @@ var TENSOR_OPERATORS = {
|
|
|
2715
2715
|
},
|
|
2716
2716
|
"tensor/argmax": {
|
|
2717
2717
|
module: "tensor",
|
|
2718
|
-
category: "
|
|
2718
|
+
category: "ml-tensor",
|
|
2719
2719
|
minArity: 1,
|
|
2720
2720
|
maxArity: 2,
|
|
2721
2721
|
description: "Index of maximum value",
|
|
@@ -2729,7 +2729,7 @@ var TENSOR_OPERATORS = {
|
|
|
2729
2729
|
},
|
|
2730
2730
|
"tensor/norm": {
|
|
2731
2731
|
module: "tensor",
|
|
2732
|
-
category: "
|
|
2732
|
+
category: "ml-tensor",
|
|
2733
2733
|
minArity: 1,
|
|
2734
2734
|
maxArity: 2,
|
|
2735
2735
|
description: "L2 norm of tensor",
|
|
@@ -2746,7 +2746,7 @@ var TENSOR_OPERATORS = {
|
|
|
2746
2746
|
// ============================================================================
|
|
2747
2747
|
"tensor/allInRange": {
|
|
2748
2748
|
module: "tensor",
|
|
2749
|
-
category: "
|
|
2749
|
+
category: "ml-tensor",
|
|
2750
2750
|
minArity: 2,
|
|
2751
2751
|
maxArity: 2,
|
|
2752
2752
|
description: "Check if all elements are within range [min, max]",
|
|
@@ -2760,7 +2760,7 @@ var TENSOR_OPERATORS = {
|
|
|
2760
2760
|
},
|
|
2761
2761
|
"tensor/outOfRangeIndices": {
|
|
2762
2762
|
module: "tensor",
|
|
2763
|
-
category: "
|
|
2763
|
+
category: "ml-tensor",
|
|
2764
2764
|
minArity: 2,
|
|
2765
2765
|
maxArity: 2,
|
|
2766
2766
|
description: "Get indices of elements outside range",
|
|
@@ -2774,7 +2774,7 @@ var TENSOR_OPERATORS = {
|
|
|
2774
2774
|
},
|
|
2775
2775
|
"tensor/clamp": {
|
|
2776
2776
|
module: "tensor",
|
|
2777
|
-
category: "
|
|
2777
|
+
category: "ml-tensor",
|
|
2778
2778
|
minArity: 3,
|
|
2779
2779
|
maxArity: 3,
|
|
2780
2780
|
description: "Clamp all elements to range [min, max]",
|
|
@@ -2789,7 +2789,7 @@ var TENSOR_OPERATORS = {
|
|
|
2789
2789
|
},
|
|
2790
2790
|
"tensor/clampPerDim": {
|
|
2791
2791
|
module: "tensor",
|
|
2792
|
-
category: "
|
|
2792
|
+
category: "ml-tensor",
|
|
2793
2793
|
minArity: 2,
|
|
2794
2794
|
maxArity: 2,
|
|
2795
2795
|
description: "Clamp each dimension to its specified range",
|
|
@@ -2803,7 +2803,7 @@ var TENSOR_OPERATORS = {
|
|
|
2803
2803
|
},
|
|
2804
2804
|
"tensor/outOfRangeDims": {
|
|
2805
2805
|
module: "tensor",
|
|
2806
|
-
category: "
|
|
2806
|
+
category: "ml-tensor",
|
|
2807
2807
|
minArity: 2,
|
|
2808
2808
|
maxArity: 2,
|
|
2809
2809
|
description: "Get dimensions that exceed their specified ranges",
|
|
@@ -2820,7 +2820,7 @@ var TENSOR_OPERATORS = {
|
|
|
2820
2820
|
// ============================================================================
|
|
2821
2821
|
"tensor/toArray": {
|
|
2822
2822
|
module: "tensor",
|
|
2823
|
-
category: "
|
|
2823
|
+
category: "ml-tensor",
|
|
2824
2824
|
minArity: 1,
|
|
2825
2825
|
maxArity: 1,
|
|
2826
2826
|
description: "Convert tensor to nested array",
|
|
@@ -2833,7 +2833,7 @@ var TENSOR_OPERATORS = {
|
|
|
2833
2833
|
},
|
|
2834
2834
|
"tensor/toList": {
|
|
2835
2835
|
module: "tensor",
|
|
2836
|
-
category: "
|
|
2836
|
+
category: "ml-tensor",
|
|
2837
2837
|
minArity: 1,
|
|
2838
2838
|
maxArity: 1,
|
|
2839
2839
|
description: "Convert 1D tensor to flat array",
|
|
@@ -2856,7 +2856,7 @@ var TRAIN_OPERATORS = {
|
|
|
2856
2856
|
// ============================================================================
|
|
2857
2857
|
"train/loop": {
|
|
2858
2858
|
module: "train",
|
|
2859
|
-
category: "
|
|
2859
|
+
category: "ml-effect",
|
|
2860
2860
|
minArity: 3,
|
|
2861
2861
|
maxArity: 3,
|
|
2862
2862
|
description: "Execute training loop with constraints",
|
|
@@ -2871,7 +2871,7 @@ var TRAIN_OPERATORS = {
|
|
|
2871
2871
|
},
|
|
2872
2872
|
"train/step": {
|
|
2873
2873
|
module: "train",
|
|
2874
|
-
category: "
|
|
2874
|
+
category: "ml-effect",
|
|
2875
2875
|
minArity: 4,
|
|
2876
2876
|
maxArity: 4,
|
|
2877
2877
|
description: "Execute single training step (forward, loss, backward, update)",
|
|
@@ -2890,7 +2890,7 @@ var TRAIN_OPERATORS = {
|
|
|
2890
2890
|
// ============================================================================
|
|
2891
2891
|
"train/validate": {
|
|
2892
2892
|
module: "train",
|
|
2893
|
-
category: "
|
|
2893
|
+
category: "ml-effect",
|
|
2894
2894
|
minArity: 2,
|
|
2895
2895
|
maxArity: 2,
|
|
2896
2896
|
description: "Validate model on test cases, returns pass/fail metrics",
|
|
@@ -2904,7 +2904,7 @@ var TRAIN_OPERATORS = {
|
|
|
2904
2904
|
},
|
|
2905
2905
|
"train/checkRegression": {
|
|
2906
2906
|
module: "train",
|
|
2907
|
-
category: "
|
|
2907
|
+
category: "ml-effect",
|
|
2908
2908
|
minArity: 3,
|
|
2909
2909
|
maxArity: 3,
|
|
2910
2910
|
description: "Check if new model regresses on required invariants",
|
|
@@ -2922,7 +2922,7 @@ var TRAIN_OPERATORS = {
|
|
|
2922
2922
|
// ============================================================================
|
|
2923
2923
|
"train/checkConstraints": {
|
|
2924
2924
|
module: "train",
|
|
2925
|
-
category: "
|
|
2925
|
+
category: "ml-effect",
|
|
2926
2926
|
minArity: 2,
|
|
2927
2927
|
maxArity: 2,
|
|
2928
2928
|
description: "Check if network weights satisfy all constraints",
|
|
@@ -2936,7 +2936,7 @@ var TRAIN_OPERATORS = {
|
|
|
2936
2936
|
},
|
|
2937
2937
|
"train/checkWeightMagnitude": {
|
|
2938
2938
|
module: "train",
|
|
2939
|
-
category: "
|
|
2939
|
+
category: "ml-effect",
|
|
2940
2940
|
minArity: 2,
|
|
2941
2941
|
maxArity: 2,
|
|
2942
2942
|
description: "Check if all weights are within magnitude limit",
|
|
@@ -2950,7 +2950,7 @@ var TRAIN_OPERATORS = {
|
|
|
2950
2950
|
},
|
|
2951
2951
|
"train/checkForbiddenOutputs": {
|
|
2952
2952
|
module: "train",
|
|
2953
|
-
category: "
|
|
2953
|
+
category: "ml-effect",
|
|
2954
2954
|
minArity: 3,
|
|
2955
2955
|
maxArity: 3,
|
|
2956
2956
|
description: "Check if model produces outputs in forbidden regions",
|
|
@@ -2968,7 +2968,7 @@ var TRAIN_OPERATORS = {
|
|
|
2968
2968
|
// ============================================================================
|
|
2969
2969
|
"train/clipGradients": {
|
|
2970
2970
|
module: "train",
|
|
2971
|
-
category: "
|
|
2971
|
+
category: "ml-effect",
|
|
2972
2972
|
minArity: 2,
|
|
2973
2973
|
maxArity: 2,
|
|
2974
2974
|
description: "Clip gradients to max norm (modifies in place)",
|
|
@@ -2982,7 +2982,7 @@ var TRAIN_OPERATORS = {
|
|
|
2982
2982
|
},
|
|
2983
2983
|
"train/getGradientNorm": {
|
|
2984
2984
|
module: "train",
|
|
2985
|
-
category: "
|
|
2985
|
+
category: "ml-effect",
|
|
2986
2986
|
minArity: 1,
|
|
2987
2987
|
maxArity: 1,
|
|
2988
2988
|
description: "Get current gradient norm",
|
|
@@ -2998,7 +2998,7 @@ var TRAIN_OPERATORS = {
|
|
|
2998
2998
|
// ============================================================================
|
|
2999
2999
|
"train/clipWeights": {
|
|
3000
3000
|
module: "train",
|
|
3001
|
-
category: "
|
|
3001
|
+
category: "ml-effect",
|
|
3002
3002
|
minArity: 2,
|
|
3003
3003
|
maxArity: 2,
|
|
3004
3004
|
description: "Clip weights to max magnitude (modifies in place)",
|
|
@@ -3012,7 +3012,7 @@ var TRAIN_OPERATORS = {
|
|
|
3012
3012
|
},
|
|
3013
3013
|
"train/getMaxWeightMagnitude": {
|
|
3014
3014
|
module: "train",
|
|
3015
|
-
category: "
|
|
3015
|
+
category: "ml-effect",
|
|
3016
3016
|
minArity: 1,
|
|
3017
3017
|
maxArity: 1,
|
|
3018
3018
|
description: "Get maximum weight magnitude in network",
|
|
@@ -3028,7 +3028,7 @@ var TRAIN_OPERATORS = {
|
|
|
3028
3028
|
// ============================================================================
|
|
3029
3029
|
"train/mse": {
|
|
3030
3030
|
module: "train",
|
|
3031
|
-
category: "
|
|
3031
|
+
category: "ml-effect",
|
|
3032
3032
|
minArity: 2,
|
|
3033
3033
|
maxArity: 2,
|
|
3034
3034
|
description: "Mean squared error loss",
|
|
@@ -3042,7 +3042,7 @@ var TRAIN_OPERATORS = {
|
|
|
3042
3042
|
},
|
|
3043
3043
|
"train/crossEntropy": {
|
|
3044
3044
|
module: "train",
|
|
3045
|
-
category: "
|
|
3045
|
+
category: "ml-effect",
|
|
3046
3046
|
minArity: 2,
|
|
3047
3047
|
maxArity: 2,
|
|
3048
3048
|
description: "Cross-entropy loss for classification",
|
|
@@ -3056,7 +3056,7 @@ var TRAIN_OPERATORS = {
|
|
|
3056
3056
|
},
|
|
3057
3057
|
"train/huber": {
|
|
3058
3058
|
module: "train",
|
|
3059
|
-
category: "
|
|
3059
|
+
category: "ml-effect",
|
|
3060
3060
|
minArity: 2,
|
|
3061
3061
|
maxArity: 3,
|
|
3062
3062
|
description: "Huber loss (smooth L1, robust to outliers)",
|
|
@@ -3074,7 +3074,7 @@ var TRAIN_OPERATORS = {
|
|
|
3074
3074
|
// ============================================================================
|
|
3075
3075
|
"train/sgd": {
|
|
3076
3076
|
module: "train",
|
|
3077
|
-
category: "
|
|
3077
|
+
category: "ml-effect",
|
|
3078
3078
|
minArity: 2,
|
|
3079
3079
|
maxArity: 3,
|
|
3080
3080
|
description: "Stochastic gradient descent optimizer step",
|
|
@@ -3089,7 +3089,7 @@ var TRAIN_OPERATORS = {
|
|
|
3089
3089
|
},
|
|
3090
3090
|
"train/adam": {
|
|
3091
3091
|
module: "train",
|
|
3092
|
-
category: "
|
|
3092
|
+
category: "ml-effect",
|
|
3093
3093
|
minArity: 2,
|
|
3094
3094
|
maxArity: 4,
|
|
3095
3095
|
description: "Adam optimizer step",
|
|
@@ -3108,7 +3108,7 @@ var TRAIN_OPERATORS = {
|
|
|
3108
3108
|
// ============================================================================
|
|
3109
3109
|
"train/sampleBatch": {
|
|
3110
3110
|
module: "train",
|
|
3111
|
-
category: "
|
|
3111
|
+
category: "ml-effect",
|
|
3112
3112
|
minArity: 2,
|
|
3113
3113
|
maxArity: 2,
|
|
3114
3114
|
description: "Sample random batch from experience buffer",
|
|
@@ -3122,7 +3122,7 @@ var TRAIN_OPERATORS = {
|
|
|
3122
3122
|
},
|
|
3123
3123
|
"train/computeReturns": {
|
|
3124
3124
|
module: "train",
|
|
3125
|
-
category: "
|
|
3125
|
+
category: "ml-effect",
|
|
3126
3126
|
minArity: 2,
|
|
3127
3127
|
maxArity: 2,
|
|
3128
3128
|
description: "Compute discounted returns from rewards",
|
|
@@ -3136,7 +3136,7 @@ var TRAIN_OPERATORS = {
|
|
|
3136
3136
|
},
|
|
3137
3137
|
"train/computeAdvantages": {
|
|
3138
3138
|
module: "train",
|
|
3139
|
-
category: "
|
|
3139
|
+
category: "ml-effect",
|
|
3140
3140
|
minArity: 3,
|
|
3141
3141
|
maxArity: 3,
|
|
3142
3142
|
description: "Compute GAE advantages for policy gradient",
|
|
@@ -3154,6 +3154,423 @@ function getTrainOperators() {
|
|
|
3154
3154
|
return Object.keys(TRAIN_OPERATORS);
|
|
3155
3155
|
}
|
|
3156
3156
|
|
|
3157
|
+
// modules/graph.ts
|
|
3158
|
+
var GRAPH_OPERATORS = {
|
|
3159
|
+
// ============================================================================
|
|
3160
|
+
// Construction
|
|
3161
|
+
// ============================================================================
|
|
3162
|
+
"graph/from-entities": {
|
|
3163
|
+
module: "graph",
|
|
3164
|
+
category: "ml-graph",
|
|
3165
|
+
minArity: 1,
|
|
3166
|
+
maxArity: 1,
|
|
3167
|
+
description: "Build PyG graph from entity collections",
|
|
3168
|
+
hasSideEffects: false,
|
|
3169
|
+
returnType: "graph",
|
|
3170
|
+
params: [
|
|
3171
|
+
{ name: "config", type: "object", description: "Graph construction config (nodes, edges, node-features, edge-features, directed)" }
|
|
3172
|
+
],
|
|
3173
|
+
example: '["graph/from-entities", { "nodes": "User", "edges": "Follows" }]'
|
|
3174
|
+
},
|
|
3175
|
+
"graph/from-adjacency": {
|
|
3176
|
+
module: "graph",
|
|
3177
|
+
category: "ml-graph",
|
|
3178
|
+
minArity: 2,
|
|
3179
|
+
maxArity: 2,
|
|
3180
|
+
description: "Build graph from adjacency matrix and features",
|
|
3181
|
+
hasSideEffects: false,
|
|
3182
|
+
returnType: "graph",
|
|
3183
|
+
params: [
|
|
3184
|
+
{ name: "adjacency", type: "tensor", description: "Adjacency matrix" },
|
|
3185
|
+
{ name: "features", type: "tensor", description: "Node feature matrix" }
|
|
3186
|
+
],
|
|
3187
|
+
example: '["graph/from-adjacency", "@entity.adj", "@entity.features"]'
|
|
3188
|
+
},
|
|
3189
|
+
"graph/from-edge-list": {
|
|
3190
|
+
module: "graph",
|
|
3191
|
+
category: "ml-graph",
|
|
3192
|
+
minArity: 2,
|
|
3193
|
+
maxArity: 2,
|
|
3194
|
+
description: "Build graph from edge list and features",
|
|
3195
|
+
hasSideEffects: false,
|
|
3196
|
+
returnType: "graph",
|
|
3197
|
+
params: [
|
|
3198
|
+
{ name: "edges", type: "tensor", description: "Edge index tensor [2, num_edges]" },
|
|
3199
|
+
{ name: "features", type: "tensor", description: "Node feature matrix" }
|
|
3200
|
+
],
|
|
3201
|
+
example: '["graph/from-edge-list", "@entity.edges", "@entity.features"]'
|
|
3202
|
+
},
|
|
3203
|
+
// ============================================================================
|
|
3204
|
+
// Transforms
|
|
3205
|
+
// ============================================================================
|
|
3206
|
+
"graph/add-self-loops": {
|
|
3207
|
+
module: "graph",
|
|
3208
|
+
category: "ml-graph",
|
|
3209
|
+
minArity: 1,
|
|
3210
|
+
maxArity: 1,
|
|
3211
|
+
description: "Add self-loop edges to graph",
|
|
3212
|
+
hasSideEffects: false,
|
|
3213
|
+
returnType: "graph",
|
|
3214
|
+
params: [
|
|
3215
|
+
{ name: "graph", type: "graph", description: "Input graph" }
|
|
3216
|
+
],
|
|
3217
|
+
example: '["graph/add-self-loops", "@entity.graph"]'
|
|
3218
|
+
},
|
|
3219
|
+
"graph/to-undirected": {
|
|
3220
|
+
module: "graph",
|
|
3221
|
+
category: "ml-graph",
|
|
3222
|
+
minArity: 1,
|
|
3223
|
+
maxArity: 1,
|
|
3224
|
+
description: "Convert directed graph to undirected",
|
|
3225
|
+
hasSideEffects: false,
|
|
3226
|
+
returnType: "graph",
|
|
3227
|
+
params: [
|
|
3228
|
+
{ name: "graph", type: "graph", description: "Input graph" }
|
|
3229
|
+
],
|
|
3230
|
+
example: '["graph/to-undirected", "@entity.graph"]'
|
|
3231
|
+
},
|
|
3232
|
+
"graph/subgraph": {
|
|
3233
|
+
module: "graph",
|
|
3234
|
+
category: "ml-graph",
|
|
3235
|
+
minArity: 2,
|
|
3236
|
+
maxArity: 2,
|
|
3237
|
+
description: "Extract subgraph by node mask",
|
|
3238
|
+
hasSideEffects: false,
|
|
3239
|
+
returnType: "graph",
|
|
3240
|
+
params: [
|
|
3241
|
+
{ name: "graph", type: "graph", description: "Input graph" },
|
|
3242
|
+
{ name: "mask", type: "tensor", description: "Boolean node mask" }
|
|
3243
|
+
],
|
|
3244
|
+
example: '["graph/subgraph", "@entity.graph", "@entity.mask"]'
|
|
3245
|
+
},
|
|
3246
|
+
"graph/k-hop": {
|
|
3247
|
+
module: "graph",
|
|
3248
|
+
category: "ml-graph",
|
|
3249
|
+
minArity: 3,
|
|
3250
|
+
maxArity: 3,
|
|
3251
|
+
description: "K-hop neighborhood subgraph",
|
|
3252
|
+
hasSideEffects: false,
|
|
3253
|
+
returnType: "graph",
|
|
3254
|
+
params: [
|
|
3255
|
+
{ name: "graph", type: "graph", description: "Input graph" },
|
|
3256
|
+
{ name: "node", type: "number", description: "Center node index" },
|
|
3257
|
+
{ name: "k", type: "number", description: "Number of hops" }
|
|
3258
|
+
],
|
|
3259
|
+
example: '["graph/k-hop", "@entity.graph", 0, 2]'
|
|
3260
|
+
},
|
|
3261
|
+
// ============================================================================
|
|
3262
|
+
// Accessors
|
|
3263
|
+
// ============================================================================
|
|
3264
|
+
"graph/node-features": {
|
|
3265
|
+
module: "graph",
|
|
3266
|
+
category: "ml-graph",
|
|
3267
|
+
minArity: 1,
|
|
3268
|
+
maxArity: 1,
|
|
3269
|
+
description: "Get node feature matrix",
|
|
3270
|
+
hasSideEffects: false,
|
|
3271
|
+
returnType: "tensor",
|
|
3272
|
+
params: [
|
|
3273
|
+
{ name: "graph", type: "graph", description: "Input graph" }
|
|
3274
|
+
],
|
|
3275
|
+
example: '["graph/node-features", "@entity.graph"]'
|
|
3276
|
+
},
|
|
3277
|
+
"graph/edge-index": {
|
|
3278
|
+
module: "graph",
|
|
3279
|
+
category: "ml-graph",
|
|
3280
|
+
minArity: 1,
|
|
3281
|
+
maxArity: 1,
|
|
3282
|
+
description: "Get edge index tensor",
|
|
3283
|
+
hasSideEffects: false,
|
|
3284
|
+
returnType: "tensor",
|
|
3285
|
+
params: [
|
|
3286
|
+
{ name: "graph", type: "graph", description: "Input graph" }
|
|
3287
|
+
],
|
|
3288
|
+
example: '["graph/edge-index", "@entity.graph"]'
|
|
3289
|
+
},
|
|
3290
|
+
"graph/edge-features": {
|
|
3291
|
+
module: "graph",
|
|
3292
|
+
category: "ml-graph",
|
|
3293
|
+
minArity: 1,
|
|
3294
|
+
maxArity: 1,
|
|
3295
|
+
description: "Get edge feature matrix",
|
|
3296
|
+
hasSideEffects: false,
|
|
3297
|
+
returnType: "tensor",
|
|
3298
|
+
params: [
|
|
3299
|
+
{ name: "graph", type: "graph", description: "Input graph" }
|
|
3300
|
+
],
|
|
3301
|
+
example: '["graph/edge-features", "@entity.graph"]'
|
|
3302
|
+
},
|
|
3303
|
+
"graph/num-nodes": {
|
|
3304
|
+
module: "graph",
|
|
3305
|
+
category: "ml-graph",
|
|
3306
|
+
minArity: 1,
|
|
3307
|
+
maxArity: 1,
|
|
3308
|
+
description: "Get node count",
|
|
3309
|
+
hasSideEffects: false,
|
|
3310
|
+
returnType: "number",
|
|
3311
|
+
params: [
|
|
3312
|
+
{ name: "graph", type: "graph", description: "Input graph" }
|
|
3313
|
+
],
|
|
3314
|
+
example: '["graph/num-nodes", "@entity.graph"]'
|
|
3315
|
+
},
|
|
3316
|
+
"graph/num-edges": {
|
|
3317
|
+
module: "graph",
|
|
3318
|
+
category: "ml-graph",
|
|
3319
|
+
minArity: 1,
|
|
3320
|
+
maxArity: 1,
|
|
3321
|
+
description: "Get edge count",
|
|
3322
|
+
hasSideEffects: false,
|
|
3323
|
+
returnType: "number",
|
|
3324
|
+
params: [
|
|
3325
|
+
{ name: "graph", type: "graph", description: "Input graph" }
|
|
3326
|
+
],
|
|
3327
|
+
example: '["graph/num-edges", "@entity.graph"]'
|
|
3328
|
+
},
|
|
3329
|
+
"graph/degree": {
|
|
3330
|
+
module: "graph",
|
|
3331
|
+
category: "ml-graph",
|
|
3332
|
+
minArity: 1,
|
|
3333
|
+
maxArity: 1,
|
|
3334
|
+
description: "Get node degree tensor",
|
|
3335
|
+
hasSideEffects: false,
|
|
3336
|
+
returnType: "tensor",
|
|
3337
|
+
params: [
|
|
3338
|
+
{ name: "graph", type: "graph", description: "Input graph" }
|
|
3339
|
+
],
|
|
3340
|
+
example: '["graph/degree", "@entity.graph"]'
|
|
3341
|
+
},
|
|
3342
|
+
// ============================================================================
|
|
3343
|
+
// Batching
|
|
3344
|
+
// ============================================================================
|
|
3345
|
+
"graph/batch": {
|
|
3346
|
+
module: "graph",
|
|
3347
|
+
category: "ml-graph",
|
|
3348
|
+
minArity: 1,
|
|
3349
|
+
maxArity: 1,
|
|
3350
|
+
description: "Batch multiple graphs into one",
|
|
3351
|
+
hasSideEffects: false,
|
|
3352
|
+
returnType: "graph",
|
|
3353
|
+
params: [
|
|
3354
|
+
{ name: "graphs", type: "array", description: "List of graphs" }
|
|
3355
|
+
],
|
|
3356
|
+
example: '["graph/batch", "@entity.graphs"]'
|
|
3357
|
+
}
|
|
3358
|
+
};
|
|
3359
|
+
function getGraphOperators() {
|
|
3360
|
+
return Object.keys(GRAPH_OPERATORS);
|
|
3361
|
+
}
|
|
3362
|
+
|
|
3363
|
+
// modules/contract.ts
|
|
3364
|
+
var CONTRACT_OPERATORS = {
|
|
3365
|
+
// ============================================================================
|
|
3366
|
+
// Validation
|
|
3367
|
+
// ============================================================================
|
|
3368
|
+
"contract/validate-input": {
|
|
3369
|
+
module: "contract",
|
|
3370
|
+
category: "ml-contract",
|
|
3371
|
+
minArity: 2,
|
|
3372
|
+
maxArity: 2,
|
|
3373
|
+
description: "Validate tensor against input contract",
|
|
3374
|
+
hasSideEffects: false,
|
|
3375
|
+
returnType: "boolean",
|
|
3376
|
+
params: [
|
|
3377
|
+
{ name: "tensor", type: "tensor", description: "Input tensor" },
|
|
3378
|
+
{ name: "contract", type: "object", description: "Input contract spec" }
|
|
3379
|
+
],
|
|
3380
|
+
example: '["contract/validate-input", "@payload.input", "@entity.inputContract"]'
|
|
3381
|
+
},
|
|
3382
|
+
"contract/validate-output": {
|
|
3383
|
+
module: "contract",
|
|
3384
|
+
category: "ml-contract",
|
|
3385
|
+
minArity: 2,
|
|
3386
|
+
maxArity: 2,
|
|
3387
|
+
description: "Validate tensor against output contract",
|
|
3388
|
+
hasSideEffects: false,
|
|
3389
|
+
returnType: "boolean",
|
|
3390
|
+
params: [
|
|
3391
|
+
{ name: "tensor", type: "tensor", description: "Output tensor" },
|
|
3392
|
+
{ name: "contract", type: "object", description: "Output contract spec" }
|
|
3393
|
+
],
|
|
3394
|
+
example: '["contract/validate-output", "@entity.output", "@entity.outputContract"]'
|
|
3395
|
+
},
|
|
3396
|
+
"contract/clamp-output": {
|
|
3397
|
+
module: "contract",
|
|
3398
|
+
category: "ml-contract",
|
|
3399
|
+
minArity: 2,
|
|
3400
|
+
maxArity: 2,
|
|
3401
|
+
description: "Clamp output tensor to contract ranges",
|
|
3402
|
+
hasSideEffects: false,
|
|
3403
|
+
returnType: "tensor",
|
|
3404
|
+
params: [
|
|
3405
|
+
{ name: "tensor", type: "tensor", description: "Output tensor" },
|
|
3406
|
+
{ name: "contract", type: "object", description: "Output contract spec" }
|
|
3407
|
+
],
|
|
3408
|
+
example: '["contract/clamp-output", "@entity.output", "@entity.outputContract"]'
|
|
3409
|
+
},
|
|
3410
|
+
"contract/violations": {
|
|
3411
|
+
module: "contract",
|
|
3412
|
+
category: "ml-contract",
|
|
3413
|
+
minArity: 2,
|
|
3414
|
+
maxArity: 2,
|
|
3415
|
+
description: "List contract violations",
|
|
3416
|
+
hasSideEffects: false,
|
|
3417
|
+
returnType: "array",
|
|
3418
|
+
params: [
|
|
3419
|
+
{ name: "tensor", type: "tensor", description: "Tensor to check" },
|
|
3420
|
+
{ name: "contract", type: "object", description: "Contract spec" }
|
|
3421
|
+
],
|
|
3422
|
+
example: '["contract/violations", "@entity.output", "@entity.outputContract"]'
|
|
3423
|
+
},
|
|
3424
|
+
// ============================================================================
|
|
3425
|
+
// Conversion
|
|
3426
|
+
// ============================================================================
|
|
3427
|
+
"contract/entity-to-tensor": {
|
|
3428
|
+
module: "contract",
|
|
3429
|
+
category: "ml-contract",
|
|
3430
|
+
minArity: 2,
|
|
3431
|
+
maxArity: 2,
|
|
3432
|
+
description: "Convert entity fields to tensor via contract",
|
|
3433
|
+
hasSideEffects: false,
|
|
3434
|
+
returnType: "tensor",
|
|
3435
|
+
params: [
|
|
3436
|
+
{ name: "entity", type: "object", description: "Entity data" },
|
|
3437
|
+
{ name: "contract", type: "object", description: "Input contract mapping fields to dims" }
|
|
3438
|
+
],
|
|
3439
|
+
example: '["contract/entity-to-tensor", "@entity", "@entity.inputContract"]'
|
|
3440
|
+
},
|
|
3441
|
+
"contract/tensor-to-payload": {
|
|
3442
|
+
module: "contract",
|
|
3443
|
+
category: "ml-contract",
|
|
3444
|
+
minArity: 2,
|
|
3445
|
+
maxArity: 2,
|
|
3446
|
+
description: "Convert output tensor to event payload via contract",
|
|
3447
|
+
hasSideEffects: false,
|
|
3448
|
+
returnType: "object",
|
|
3449
|
+
params: [
|
|
3450
|
+
{ name: "tensor", type: "tensor", description: "Output tensor" },
|
|
3451
|
+
{ name: "contract", type: "object", description: "Output contract mapping dims to fields" }
|
|
3452
|
+
],
|
|
3453
|
+
example: '["contract/tensor-to-payload", "@entity.output", "@entity.outputContract"]'
|
|
3454
|
+
}
|
|
3455
|
+
};
|
|
3456
|
+
function getContractOperators() {
|
|
3457
|
+
return Object.keys(CONTRACT_OPERATORS);
|
|
3458
|
+
}
|
|
3459
|
+
|
|
3460
|
+
// modules/data.ts
|
|
3461
|
+
var DATA_OPERATORS = {
|
|
3462
|
+
// ============================================================================
|
|
3463
|
+
// Dataset Creation
|
|
3464
|
+
// ============================================================================
|
|
3465
|
+
"data/dataset": {
|
|
3466
|
+
module: "data",
|
|
3467
|
+
category: "ml-data",
|
|
3468
|
+
minArity: 2,
|
|
3469
|
+
maxArity: 2,
|
|
3470
|
+
description: "Create dataset from entity collection and contracts",
|
|
3471
|
+
hasSideEffects: false,
|
|
3472
|
+
returnType: "object",
|
|
3473
|
+
params: [
|
|
3474
|
+
{ name: "entities", type: "array", description: "Entity collection" },
|
|
3475
|
+
{ name: "contracts", type: "object", description: "Input/output contract pair" }
|
|
3476
|
+
],
|
|
3477
|
+
example: '["data/dataset", "@entity.trainingData", "@entity.contracts"]'
|
|
3478
|
+
},
|
|
3479
|
+
"data/dataloader": {
|
|
3480
|
+
module: "data",
|
|
3481
|
+
category: "ml-data",
|
|
3482
|
+
minArity: 2,
|
|
3483
|
+
maxArity: 2,
|
|
3484
|
+
description: "Create batched dataloader from dataset",
|
|
3485
|
+
hasSideEffects: false,
|
|
3486
|
+
returnType: "object",
|
|
3487
|
+
params: [
|
|
3488
|
+
{ name: "dataset", type: "object", description: "Dataset" },
|
|
3489
|
+
{ name: "config", type: "object", description: "Config with batch_size, shuffle, etc." }
|
|
3490
|
+
],
|
|
3491
|
+
example: '["data/dataloader", "@entity.dataset", { "batch-size": 32, "shuffle": true }]'
|
|
3492
|
+
},
|
|
3493
|
+
"data/split": {
|
|
3494
|
+
module: "data",
|
|
3495
|
+
category: "ml-data",
|
|
3496
|
+
minArity: 2,
|
|
3497
|
+
maxArity: 2,
|
|
3498
|
+
description: "Train/val/test split",
|
|
3499
|
+
hasSideEffects: false,
|
|
3500
|
+
returnType: "array",
|
|
3501
|
+
params: [
|
|
3502
|
+
{ name: "dataset", type: "object", description: "Dataset" },
|
|
3503
|
+
{ name: "ratios", type: "array", description: "Split ratios e.g. [0.8, 0.1, 0.1]" }
|
|
3504
|
+
],
|
|
3505
|
+
example: '["data/split", "@entity.dataset", [0.8, 0.1, 0.1]]'
|
|
3506
|
+
},
|
|
3507
|
+
// ============================================================================
|
|
3508
|
+
// Preprocessing
|
|
3509
|
+
// ============================================================================
|
|
3510
|
+
"data/normalize": {
|
|
3511
|
+
module: "data",
|
|
3512
|
+
category: "ml-data",
|
|
3513
|
+
minArity: 2,
|
|
3514
|
+
maxArity: 2,
|
|
3515
|
+
description: "Normalize features (mean/std or min/max)",
|
|
3516
|
+
hasSideEffects: false,
|
|
3517
|
+
returnType: "tensor",
|
|
3518
|
+
params: [
|
|
3519
|
+
{ name: "tensor", type: "tensor", description: "Feature tensor" },
|
|
3520
|
+
{ name: "config", type: "object", description: "Normalization config (method, per_dim, etc.)" }
|
|
3521
|
+
],
|
|
3522
|
+
example: '["data/normalize", "@entity.features", { "method": "standard" }]'
|
|
3523
|
+
},
|
|
3524
|
+
"data/augment": {
|
|
3525
|
+
module: "data",
|
|
3526
|
+
category: "ml-data",
|
|
3527
|
+
minArity: 2,
|
|
3528
|
+
maxArity: 2,
|
|
3529
|
+
description: "Apply data augmentation",
|
|
3530
|
+
hasSideEffects: false,
|
|
3531
|
+
returnType: "object",
|
|
3532
|
+
params: [
|
|
3533
|
+
{ name: "dataset", type: "object", description: "Dataset" },
|
|
3534
|
+
{ name: "config", type: "object", description: "Augmentation config" }
|
|
3535
|
+
],
|
|
3536
|
+
example: '["data/augment", "@entity.dataset", { "flip": true, "rotate": 15 }]'
|
|
3537
|
+
},
|
|
3538
|
+
// ============================================================================
|
|
3539
|
+
// Tokenization & Padding
|
|
3540
|
+
// ============================================================================
|
|
3541
|
+
"data/tokenize": {
|
|
3542
|
+
module: "data",
|
|
3543
|
+
category: "ml-data",
|
|
3544
|
+
minArity: 2,
|
|
3545
|
+
maxArity: 2,
|
|
3546
|
+
description: "Tokenize text fields",
|
|
3547
|
+
hasSideEffects: false,
|
|
3548
|
+
returnType: "tensor",
|
|
3549
|
+
params: [
|
|
3550
|
+
{ name: "text", type: "string", description: "Text to tokenize" },
|
|
3551
|
+
{ name: "config", type: "object", description: "Tokenizer config (method, vocab_size, max_length)" }
|
|
3552
|
+
],
|
|
3553
|
+
example: '["data/tokenize", "@entity.text", { "method": "bpe", "max-length": 512 }]'
|
|
3554
|
+
},
|
|
3555
|
+
"data/pad": {
|
|
3556
|
+
module: "data",
|
|
3557
|
+
category: "ml-data",
|
|
3558
|
+
minArity: 2,
|
|
3559
|
+
maxArity: 2,
|
|
3560
|
+
description: "Pad sequences to uniform length",
|
|
3561
|
+
hasSideEffects: false,
|
|
3562
|
+
returnType: "tensor",
|
|
3563
|
+
params: [
|
|
3564
|
+
{ name: "sequences", type: "array", description: "List of token sequences" },
|
|
3565
|
+
{ name: "config", type: "object", description: "Padding config (max_length, pad_value)" }
|
|
3566
|
+
],
|
|
3567
|
+
example: '["data/pad", "@entity.sequences", { "max-length": 512, "pad-value": 0 }]'
|
|
3568
|
+
}
|
|
3569
|
+
};
|
|
3570
|
+
function getDataOperators() {
|
|
3571
|
+
return Object.keys(DATA_OPERATORS);
|
|
3572
|
+
}
|
|
3573
|
+
|
|
3157
3574
|
// modules/prob.ts
|
|
3158
3575
|
var PROB_OPERATORS = {
|
|
3159
3576
|
// ========================================
|
|
@@ -3380,6 +3797,119 @@ function getProbOperators() {
|
|
|
3380
3797
|
return PROB_OPERATORS;
|
|
3381
3798
|
}
|
|
3382
3799
|
|
|
3383
|
-
|
|
3800
|
+
// modules/os.ts
|
|
3801
|
+
var OS_OPERATORS = {
|
|
3802
|
+
"os/watch-files": {
|
|
3803
|
+
module: "os",
|
|
3804
|
+
category: "std-os",
|
|
3805
|
+
minArity: 1,
|
|
3806
|
+
maxArity: 2,
|
|
3807
|
+
description: "Register file system watcher. Emits OS_FILE_MODIFIED, OS_FILE_CREATED, OS_FILE_DELETED events with { path, name, dir, timestamp } payload.",
|
|
3808
|
+
hasSideEffects: true,
|
|
3809
|
+
returnType: "void",
|
|
3810
|
+
params: [
|
|
3811
|
+
{ name: "glob", type: "string", description: 'Glob pattern to watch (e.g., "**/*.orb")' },
|
|
3812
|
+
{ name: "options", type: "object", description: "Optional config: { recursive, ignoreInitial, debounceMs }", optional: true }
|
|
3813
|
+
],
|
|
3814
|
+
example: '["os/watch-files", "**/*.orb"]'
|
|
3815
|
+
},
|
|
3816
|
+
"os/watch-process": {
|
|
3817
|
+
module: "os",
|
|
3818
|
+
category: "std-os",
|
|
3819
|
+
minArity: 1,
|
|
3820
|
+
maxArity: 2,
|
|
3821
|
+
description: "Register process monitor. Emits OS_PROCESS_EXITED, OS_PROCESS_STARTED events with { pid, name, exitCode, signal, args, duration } payload.",
|
|
3822
|
+
hasSideEffects: true,
|
|
3823
|
+
returnType: "void",
|
|
3824
|
+
params: [
|
|
3825
|
+
{ name: "name", type: "string", description: 'Process name to monitor (e.g., "orbital")' },
|
|
3826
|
+
{ name: "subcommand", type: "string", description: 'Optional subcommand filter (e.g., "validate")', optional: true }
|
|
3827
|
+
],
|
|
3828
|
+
example: '["os/watch-process", "orbital", "validate"]'
|
|
3829
|
+
},
|
|
3830
|
+
"os/watch-port": {
|
|
3831
|
+
module: "os",
|
|
3832
|
+
category: "std-os",
|
|
3833
|
+
minArity: 1,
|
|
3834
|
+
maxArity: 2,
|
|
3835
|
+
description: "Register port monitor. Emits OS_PORT_OPENED, OS_PORT_CLOSED events with { port, protocol, pid, address } payload.",
|
|
3836
|
+
hasSideEffects: true,
|
|
3837
|
+
returnType: "void",
|
|
3838
|
+
params: [
|
|
3839
|
+
{ name: "port", type: "number", description: "Port number to monitor" },
|
|
3840
|
+
{ name: "protocol", type: "string", description: 'Protocol: "tcp" or "udp" (default: "tcp")', optional: true }
|
|
3841
|
+
],
|
|
3842
|
+
example: '["os/watch-port", 3000]'
|
|
3843
|
+
},
|
|
3844
|
+
"os/watch-http": {
|
|
3845
|
+
module: "os",
|
|
3846
|
+
category: "std-os",
|
|
3847
|
+
minArity: 1,
|
|
3848
|
+
maxArity: 2,
|
|
3849
|
+
description: "Register HTTP response interceptor. Emits OS_HTTP_RESPONSE events with { url, method, status, headers, body, duration } payload.",
|
|
3850
|
+
hasSideEffects: true,
|
|
3851
|
+
returnType: "void",
|
|
3852
|
+
params: [
|
|
3853
|
+
{ name: "urlPattern", type: "string", description: 'URL pattern to intercept (e.g., "https://api.example.com/*")' },
|
|
3854
|
+
{ name: "method", type: "string", description: 'HTTP method filter (e.g., "POST")', optional: true }
|
|
3855
|
+
],
|
|
3856
|
+
example: '["os/watch-http", "https://api.example.com/*", "POST"]'
|
|
3857
|
+
},
|
|
3858
|
+
"os/watch-cron": {
|
|
3859
|
+
module: "os",
|
|
3860
|
+
category: "std-os",
|
|
3861
|
+
minArity: 1,
|
|
3862
|
+
maxArity: 1,
|
|
3863
|
+
description: "Register cron schedule. Emits OS_CRON_FIRE events with { expression, timestamp } payload.",
|
|
3864
|
+
hasSideEffects: true,
|
|
3865
|
+
returnType: "void",
|
|
3866
|
+
params: [
|
|
3867
|
+
{ name: "expression", type: "string", description: 'Cron expression (e.g., "*/5 * * * *" for every 5 minutes)' }
|
|
3868
|
+
],
|
|
3869
|
+
example: '["os/watch-cron", "0 */6 * * *"]'
|
|
3870
|
+
},
|
|
3871
|
+
"os/watch-signal": {
|
|
3872
|
+
module: "os",
|
|
3873
|
+
category: "std-os",
|
|
3874
|
+
minArity: 1,
|
|
3875
|
+
maxArity: 1,
|
|
3876
|
+
description: "Register OS signal handler. Emits OS_SIGNAL_USR1, OS_SIGNAL_HUP, etc. with { pid, timestamp } payload.",
|
|
3877
|
+
hasSideEffects: true,
|
|
3878
|
+
returnType: "void",
|
|
3879
|
+
params: [
|
|
3880
|
+
{ name: "signal", type: "string", description: 'Signal name: "SIGUSR1", "SIGUSR2", "SIGHUP", "SIGTERM"' }
|
|
3881
|
+
],
|
|
3882
|
+
example: '["os/watch-signal", "SIGUSR1"]'
|
|
3883
|
+
},
|
|
3884
|
+
"os/watch-env": {
|
|
3885
|
+
module: "os",
|
|
3886
|
+
category: "std-os",
|
|
3887
|
+
minArity: 1,
|
|
3888
|
+
maxArity: 1,
|
|
3889
|
+
description: "Register environment variable watcher. Emits OS_ENV_CHANGED events with { variable, oldValue, newValue } payload.",
|
|
3890
|
+
hasSideEffects: true,
|
|
3891
|
+
returnType: "void",
|
|
3892
|
+
params: [
|
|
3893
|
+
{ name: "variable", type: "string", description: "Environment variable name to watch" }
|
|
3894
|
+
],
|
|
3895
|
+
example: '["os/watch-env", "NODE_ENV"]'
|
|
3896
|
+
},
|
|
3897
|
+
"os/debounce": {
|
|
3898
|
+
module: "os",
|
|
3899
|
+
category: "std-os",
|
|
3900
|
+
minArity: 2,
|
|
3901
|
+
maxArity: 2,
|
|
3902
|
+
description: "Configure debounce interval for an OS event type. Prevents trigger storms during rapid changes.",
|
|
3903
|
+
hasSideEffects: true,
|
|
3904
|
+
returnType: "void",
|
|
3905
|
+
params: [
|
|
3906
|
+
{ name: "ms", type: "number", description: "Debounce interval in milliseconds" },
|
|
3907
|
+
{ name: "eventType", type: "string", description: 'OS event type to debounce (e.g., "OS_FILE_MODIFIED")' }
|
|
3908
|
+
],
|
|
3909
|
+
example: '["os/debounce", 500, "OS_FILE_MODIFIED"]'
|
|
3910
|
+
}
|
|
3911
|
+
};
|
|
3912
|
+
|
|
3913
|
+
export { ARRAY_OPERATORS, ASYNC_OPERATORS, CONTRACT_OPERATORS, DATA_OPERATORS, FORMAT_OPERATORS, GRAPH_OPERATORS, MATH_OPERATORS, NN_OPERATORS, OBJECT_OPERATORS, OS_OPERATORS, PROB_OPERATORS, STR_OPERATORS, TENSOR_OPERATORS, TIME_OPERATORS, TRAIN_OPERATORS, VALIDATE_OPERATORS, getArrayOperators, getAsyncOperators, getContractOperators, getDataOperators, getFormatOperators, getGraphOperators, getLambdaArrayOperators, getMathOperators, getNnOperators, getObjectOperators, getProbOperators, getStrOperators, getTensorOperators, getTimeOperators, getTrainOperators, getValidateOperators };
|
|
3384
3914
|
//# sourceMappingURL=index.js.map
|
|
3385
3915
|
//# sourceMappingURL=index.js.map
|