@almadar/std 16.144.0 → 16.146.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/ml/atoms/std-ml-classify.lolo +121 -0
- package/behaviors/lolo/ml/atoms/std-ml-exact-check.lolo +90 -0
- package/behaviors/lolo/ml/atoms/std-ml-infer.lolo +141 -0
- package/behaviors/lolo/ml/atoms/std-ml-label-capture.lolo +75 -0
- package/behaviors/lolo/ml/atoms/std-ml-lookup.lolo +83 -0
- package/behaviors/lolo/ml/atoms/std-ml-posterior.lolo +104 -0
- package/behaviors/lolo/ml/atoms/std-ml-similarity.lolo +166 -0
- package/behaviors/lolo/ml/molecules/std-escalating-decision.lolo +271 -0
- package/behaviors/lolo/ml/molecules/std-knowledge-tracing.lolo +115 -0
- package/behaviors/lolo/ui/core/atoms/std-app-layout.lolo +14 -0
- package/behaviors/lolo/ui/core/atoms/std-board.lolo +20 -6
- package/behaviors/lolo/ui/core/atoms/std-browse.lolo +23 -6
- package/behaviors/lolo/ui/core/atoms/std-calendar.lolo +80 -2
- package/behaviors/lolo/ui/core/atoms/std-stats.lolo +1 -1
- package/behaviors/lolo/ui/core/atoms/std-tag-taxonomy.lolo +3 -3
- package/behaviors/lolo/ui/core/atoms/ui-typography.lolo +1 -1
- package/behaviors/lolo/ui/core/molecules/ui-calendar-grid.lolo +18 -0
- package/behaviors/lolo/ui/core/molecules/ui-data-grid.lolo +2 -0
- package/behaviors/lolo/ui/core/molecules/ui-data-list.lolo +3 -2
- package/behaviors/lolo/ui/core/molecules/ui-filter-group.lolo +20 -0
- package/behaviors/lolo/ui/core/molecules/ui-search-input.lolo +7 -2
- package/behaviors/lolo/ui/core/molecules/ui-table-view.lolo +3 -2
- package/behaviors/lolo/ui/core/organisms/ui-entity-cards.lolo +2 -0
- package/behaviors/lolo/ui/core/organisms/ui-entity-list.lolo +2 -0
- package/behaviors/lolo/ui/core/organisms/ui-entity-table.lolo +2 -0
- package/behaviors/lolo/ui/core/organisms/ui-timeline.lolo +2 -0
- package/behaviors/lolo/ui/game/atoms/std-dungeon-combat.lolo +2 -2
- package/behaviors/lolo/ui/game/molecules/std-worldmap-board-2d.lolo +1 -1
- package/behaviors/lolo/ui/game/organisms/ui-boardgame-board.lolo +2 -2
- package/behaviors/lolo/ui/game/organisms/ui-builder-board.lolo +2 -2
- package/behaviors/lolo/ui/game/organisms/ui-debugger-board.lolo +3 -3
- package/behaviors/lolo/ui/game/organisms/ui-physics-sandbox-board.lolo +3 -3
- package/behaviors/lolo/ui/game/organisms/ui-roguelike-board.lolo +1 -1
- package/behaviors/lolo/ui/game/organisms/ui-sequencer-board.lolo +1 -1
- package/behaviors/lolo/ui/learning/atoms/std-algo-heapsort.lolo +2 -2
- package/behaviors/lolo/ui/learning/atoms/std-algo-mst.lolo +3 -3
- package/behaviors/registry/factory-signatures.json +5018 -824
- package/behaviors/registry/ml/atoms/std-ml-classify.orb +622 -0
- package/behaviors/registry/ml/atoms/std-ml-exact-check.orb +505 -0
- package/behaviors/registry/ml/atoms/std-ml-infer.orb +770 -0
- package/behaviors/registry/ml/atoms/std-ml-label-capture.orb +367 -0
- package/behaviors/registry/ml/atoms/std-ml-lookup.orb +473 -0
- package/behaviors/registry/ml/atoms/std-ml-posterior.orb +669 -0
- package/behaviors/registry/ml/atoms/std-ml-similarity.orb +917 -0
- package/behaviors/registry/ml/molecules/std-escalating-decision.orb +1553 -0
- package/behaviors/registry/ml/molecules/std-knowledge-tracing.orb +577 -0
- package/behaviors/registry/ui/core/atoms/std-app-layout.orb +33 -1
- package/behaviors/registry/ui/core/atoms/std-board.orb +64 -20
- package/behaviors/registry/ui/core/atoms/std-browse.orb +83 -48
- package/behaviors/registry/ui/core/atoms/std-calendar.orb +213 -3
- package/behaviors/registry/ui/core/atoms/ui-typography.orb +1 -1
- package/behaviors/registry/ui/core/molecules/ui-calendar-grid.orb +27 -0
- package/behaviors/registry/ui/core/molecules/ui-data-grid.orb +25 -12
- package/behaviors/registry/ui/core/molecules/ui-data-list.orb +26 -13
- package/behaviors/registry/ui/core/molecules/ui-filter-group.orb +86 -0
- package/behaviors/registry/ui/core/molecules/ui-search-input.orb +37 -1
- package/behaviors/registry/ui/core/molecules/ui-table-view.orb +25 -12
- package/behaviors/registry/ui/core/organisms/ui-entity-cards.orb +13 -0
- package/behaviors/registry/ui/core/organisms/ui-entity-list.orb +21 -8
- package/behaviors/registry/ui/core/organisms/ui-entity-table.orb +13 -0
- package/behaviors/registry/ui/core/organisms/ui-timeline.orb +13 -0
- package/behaviors/registry/ui/game/atoms/std-dungeon-combat.orb +4 -4
- package/behaviors/registry/ui/game/molecules/std-worldmap-board-2d.orb +6 -9
- package/behaviors/registry/ui/game/organisms/ui-boardgame-board.orb +4 -4
- package/behaviors/registry/ui/game/organisms/ui-builder-board.orb +4 -4
- package/behaviors/registry/ui/game/organisms/ui-debugger-board.orb +12 -12
- package/behaviors/registry/ui/game/organisms/ui-physics-sandbox-board.orb +19 -19
- package/behaviors/registry/ui/game/organisms/ui-roguelike-board.orb +1 -1
- package/behaviors/registry/ui/game/organisms/ui-sequencer-board.orb +2 -2
- package/behaviors/registry/ui/learning/atoms/std-algo-heapsort.orb +8 -8
- package/canonical-operators.json +30 -6
- package/dist/behaviors/behaviors-embeddings.json +267 -267
- package/dist/behaviors/exports-reader.js +2462 -2080
- package/dist/behaviors/functions/index.d.ts +725 -1
- package/dist/behaviors/functions/index.js +2437 -2081
- package/dist/behaviors/index.d.ts +1 -1
- package/dist/behaviors/index.js +2463 -2081
- package/dist/behaviors/knob-embeddings.json +1 -1
- package/dist/behaviors/query.js +2462 -2080
- package/dist/behaviors/registry/factory-signatures.json +5018 -824
- package/dist/behaviors/registry/ml/atoms/std-ml-classify.orb +622 -0
- package/dist/behaviors/registry/ml/atoms/std-ml-exact-check.orb +505 -0
- package/dist/behaviors/registry/ml/atoms/std-ml-infer.orb +770 -0
- package/dist/behaviors/registry/ml/atoms/std-ml-label-capture.orb +367 -0
- package/dist/behaviors/registry/ml/atoms/std-ml-lookup.orb +473 -0
- package/dist/behaviors/registry/ml/atoms/std-ml-posterior.orb +669 -0
- package/dist/behaviors/registry/ml/atoms/std-ml-similarity.orb +917 -0
- package/dist/behaviors/registry/ml/molecules/std-escalating-decision.orb +1553 -0
- package/dist/behaviors/registry/ml/molecules/std-knowledge-tracing.orb +577 -0
- package/dist/behaviors/registry/ui/core/atoms/std-app-layout.orb +33 -1
- package/dist/behaviors/registry/ui/core/atoms/std-board.orb +64 -20
- package/dist/behaviors/registry/ui/core/atoms/std-browse.orb +83 -48
- package/dist/behaviors/registry/ui/core/atoms/std-calendar.orb +213 -3
- package/dist/behaviors/registry/ui/core/atoms/ui-typography.orb +1 -1
- package/dist/behaviors/registry/ui/core/molecules/ui-calendar-grid.orb +27 -0
- package/dist/behaviors/registry/ui/core/molecules/ui-data-grid.orb +25 -12
- package/dist/behaviors/registry/ui/core/molecules/ui-data-list.orb +26 -13
- package/dist/behaviors/registry/ui/core/molecules/ui-filter-group.orb +86 -0
- package/dist/behaviors/registry/ui/core/molecules/ui-search-input.orb +37 -1
- package/dist/behaviors/registry/ui/core/molecules/ui-table-view.orb +25 -12
- package/dist/behaviors/registry/ui/core/organisms/ui-entity-cards.orb +13 -0
- package/dist/behaviors/registry/ui/core/organisms/ui-entity-list.orb +21 -8
- package/dist/behaviors/registry/ui/core/organisms/ui-entity-table.orb +13 -0
- package/dist/behaviors/registry/ui/core/organisms/ui-timeline.orb +13 -0
- package/dist/behaviors/registry/ui/game/atoms/std-dungeon-combat.orb +4 -4
- package/dist/behaviors/registry/ui/game/molecules/std-worldmap-board-2d.orb +6 -9
- package/dist/behaviors/registry/ui/game/organisms/ui-boardgame-board.orb +4 -4
- package/dist/behaviors/registry/ui/game/organisms/ui-builder-board.orb +4 -4
- package/dist/behaviors/registry/ui/game/organisms/ui-debugger-board.orb +12 -12
- package/dist/behaviors/registry/ui/game/organisms/ui-physics-sandbox-board.orb +19 -19
- package/dist/behaviors/registry/ui/game/organisms/ui-roguelike-board.orb +1 -1
- package/dist/behaviors/registry/ui/game/organisms/ui-sequencer-board.orb +2 -2
- package/dist/behaviors/registry/ui/learning/atoms/std-algo-heapsort.orb +8 -8
- package/dist/behaviors-embeddings.json +267 -267
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2498 -2088
- package/dist/knob-embeddings.json +1 -1
- package/dist/modules/array.js +28 -0
- package/dist/modules/contract.js +4 -4
- package/dist/modules/data.js +3 -3
- package/dist/modules/index.js +35 -7
- package/dist/registry/factory-signatures.json +5018 -824
- package/dist/registry.js +35 -7
- package/package.json +3 -3
package/dist/registry.js
CHANGED
|
@@ -2026,6 +2026,34 @@ var ARRAY_OPERATORS = {
|
|
|
2026
2026
|
{ name: "n", type: "number", description: "Number of elements to skip" }
|
|
2027
2027
|
],
|
|
2028
2028
|
example: '["array/dropLast", "@items", 2]'
|
|
2029
|
+
},
|
|
2030
|
+
"array/cosine": {
|
|
2031
|
+
module: "array",
|
|
2032
|
+
category: "std-array",
|
|
2033
|
+
minArity: 2,
|
|
2034
|
+
maxArity: 2,
|
|
2035
|
+
description: 'Cosine similarity between two numeric vectors, in [-1, 1] (1 = identical direction). The building block for "is this answer semantically the reference answer" checks over embeddings. Pure math \u2014 usable in guards and value position, unlike the async llm/* substrate operators.',
|
|
2036
|
+
hasSideEffects: false,
|
|
2037
|
+
returnType: "number",
|
|
2038
|
+
params: [
|
|
2039
|
+
{ name: "a", type: { kind: "array", of: "number" }, description: "First vector" },
|
|
2040
|
+
{ name: "b", type: { kind: "array", of: "number" }, description: "Second vector" }
|
|
2041
|
+
],
|
|
2042
|
+
example: '["array/cosine", "@entity.answerEmbedding", "@entity.referenceEmbedding"]'
|
|
2043
|
+
},
|
|
2044
|
+
"array/nearest": {
|
|
2045
|
+
module: "array",
|
|
2046
|
+
category: "std-array",
|
|
2047
|
+
minArity: 2,
|
|
2048
|
+
maxArity: 2,
|
|
2049
|
+
description: "Find the candidate vector nearest a query vector by cosine similarity. Returns { index, score, margin } \u2014 index/score of the best match, and margin (best score minus second-best), which is what makes an abstaining gate possible: a small margin means the top match is not confidently distinguished from the runner-up.",
|
|
2050
|
+
hasSideEffects: false,
|
|
2051
|
+
returnType: "object",
|
|
2052
|
+
params: [
|
|
2053
|
+
{ name: "query", type: { kind: "array", of: "number" }, description: "Query vector" },
|
|
2054
|
+
{ name: "candidates", type: { kind: "array", of: { kind: "array", of: "number" } }, description: "Candidate vectors to search" }
|
|
2055
|
+
],
|
|
2056
|
+
example: '["array/nearest", "@entity.queryEmbedding", "@entity.candidateEmbeddings"]'
|
|
2029
2057
|
}
|
|
2030
2058
|
};
|
|
2031
2059
|
|
|
@@ -4408,9 +4436,9 @@ var CONTRACT_OPERATORS = {
|
|
|
4408
4436
|
category: "ml-contract",
|
|
4409
4437
|
minArity: 2,
|
|
4410
4438
|
maxArity: 2,
|
|
4411
|
-
description: "Validate tensor against input contract",
|
|
4439
|
+
description: "Validate tensor against input contract. Returns { valid, violations } \u2014 guard on `valid`, or read `violations` for the detail.",
|
|
4412
4440
|
hasSideEffects: false,
|
|
4413
|
-
returnType: "
|
|
4441
|
+
returnType: "object",
|
|
4414
4442
|
params: [
|
|
4415
4443
|
{ name: "tensor", type: "tensor", description: "Input tensor" },
|
|
4416
4444
|
{ name: "contract", type: "object", description: "Input contract spec" }
|
|
@@ -4422,9 +4450,9 @@ var CONTRACT_OPERATORS = {
|
|
|
4422
4450
|
category: "ml-contract",
|
|
4423
4451
|
minArity: 2,
|
|
4424
4452
|
maxArity: 2,
|
|
4425
|
-
description: "Validate tensor against output contract",
|
|
4453
|
+
description: "Validate tensor against output contract. Returns { valid, violations } \u2014 guard on `valid`, or read `violations` for the detail.",
|
|
4426
4454
|
hasSideEffects: false,
|
|
4427
|
-
returnType: "
|
|
4455
|
+
returnType: "object",
|
|
4428
4456
|
params: [
|
|
4429
4457
|
{ name: "tensor", type: "tensor", description: "Output tensor" },
|
|
4430
4458
|
{ name: "contract", type: "object", description: "Output contract spec" }
|
|
@@ -4530,14 +4558,14 @@ var DATA_OPERATORS = {
|
|
|
4530
4558
|
category: "ml-data",
|
|
4531
4559
|
minArity: 2,
|
|
4532
4560
|
maxArity: 2,
|
|
4533
|
-
description: "Train/
|
|
4561
|
+
description: "Train/validation split. Config carries `trainRatio` (default 0.8); the remainder is the validation split.",
|
|
4534
4562
|
hasSideEffects: false,
|
|
4535
4563
|
returnType: "array",
|
|
4536
4564
|
params: [
|
|
4537
4565
|
{ name: "dataset", type: "object", description: "Dataset" },
|
|
4538
|
-
{ name: "
|
|
4566
|
+
{ name: "config", type: "object", description: "Split config, e.g. { trainRatio: 0.8 }" }
|
|
4539
4567
|
],
|
|
4540
|
-
example: '["data/split", "@entity.dataset",
|
|
4568
|
+
example: '["data/split", "@entity.dataset", { "trainRatio": 0.8 }]'
|
|
4541
4569
|
},
|
|
4542
4570
|
// ============================================================================
|
|
4543
4571
|
// Preprocessing
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@almadar/std",
|
|
3
|
-
"version": "16.
|
|
3
|
+
"version": "16.146.0",
|
|
4
4
|
"description": "Standard library operators for Almadar (math, string, array, etc.)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -49,11 +49,11 @@
|
|
|
49
49
|
"access": "public"
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@almadar/core": "^10.
|
|
52
|
+
"@almadar/core": "^10.36.0"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"@almadar/eslint-plugin": "^2.15.0",
|
|
56
|
-
"@almadar/llm": "^2.
|
|
56
|
+
"@almadar/llm": "^2.37.0",
|
|
57
57
|
"@types/node": "^20.0.0",
|
|
58
58
|
"@typescript-eslint/parser": "8.56.0",
|
|
59
59
|
"eslint": "10.0.0",
|