@almadar/std 16.143.0 → 16.145.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 +154 -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-board.lolo +28 -6
- package/behaviors/lolo/ui/core/atoms/std-browse.lolo +23 -6
- package/behaviors/lolo/ui/core/atoms/std-calendar.lolo +85 -2
- package/behaviors/lolo/ui/core/atoms/std-file-store.lolo +17 -0
- package/behaviors/lolo/ui/core/atoms/std-version-history.lolo +17 -0
- 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/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 +862 -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-board.orb +90 -20
- package/behaviors/registry/ui/core/atoms/std-browse.orb +83 -48
- package/behaviors/registry/ui/core/atoms/std-calendar.orb +238 -3
- package/behaviors/registry/ui/core/atoms/std-file-store.orb +40 -0
- package/behaviors/registry/ui/core/atoms/std-version-history.orb +40 -0
- 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/canonical-operators.json +30 -6
- package/dist/behaviors/behaviors-embeddings.json +134 -134
- 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 +862 -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-board.orb +90 -20
- package/dist/behaviors/registry/ui/core/atoms/std-browse.orb +83 -48
- package/dist/behaviors/registry/ui/core/atoms/std-calendar.orb +238 -3
- package/dist/behaviors/registry/ui/core/atoms/std-file-store.orb +40 -0
- package/dist/behaviors/registry/ui/core/atoms/std-version-history.orb +40 -0
- 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-embeddings.json +134 -134
- 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 +6 -5
package/dist/modules/array.js
CHANGED
|
@@ -565,6 +565,34 @@ var ARRAY_OPERATORS = {
|
|
|
565
565
|
{ name: "n", type: "number", description: "Number of elements to skip" }
|
|
566
566
|
],
|
|
567
567
|
example: '["array/dropLast", "@items", 2]'
|
|
568
|
+
},
|
|
569
|
+
"array/cosine": {
|
|
570
|
+
module: "array",
|
|
571
|
+
category: "std-array",
|
|
572
|
+
minArity: 2,
|
|
573
|
+
maxArity: 2,
|
|
574
|
+
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.',
|
|
575
|
+
hasSideEffects: false,
|
|
576
|
+
returnType: "number",
|
|
577
|
+
params: [
|
|
578
|
+
{ name: "a", type: { kind: "array", of: "number" }, description: "First vector" },
|
|
579
|
+
{ name: "b", type: { kind: "array", of: "number" }, description: "Second vector" }
|
|
580
|
+
],
|
|
581
|
+
example: '["array/cosine", "@entity.answerEmbedding", "@entity.referenceEmbedding"]'
|
|
582
|
+
},
|
|
583
|
+
"array/nearest": {
|
|
584
|
+
module: "array",
|
|
585
|
+
category: "std-array",
|
|
586
|
+
minArity: 2,
|
|
587
|
+
maxArity: 2,
|
|
588
|
+
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.",
|
|
589
|
+
hasSideEffects: false,
|
|
590
|
+
returnType: "object",
|
|
591
|
+
params: [
|
|
592
|
+
{ name: "query", type: { kind: "array", of: "number" }, description: "Query vector" },
|
|
593
|
+
{ name: "candidates", type: { kind: "array", of: { kind: "array", of: "number" } }, description: "Candidate vectors to search" }
|
|
594
|
+
],
|
|
595
|
+
example: '["array/nearest", "@entity.queryEmbedding", "@entity.candidateEmbeddings"]'
|
|
568
596
|
}
|
|
569
597
|
};
|
|
570
598
|
function getArrayOperators() {
|
package/dist/modules/contract.js
CHANGED
|
@@ -8,9 +8,9 @@ var CONTRACT_OPERATORS = {
|
|
|
8
8
|
category: "ml-contract",
|
|
9
9
|
minArity: 2,
|
|
10
10
|
maxArity: 2,
|
|
11
|
-
description: "Validate tensor against input contract",
|
|
11
|
+
description: "Validate tensor against input contract. Returns { valid, violations } \u2014 guard on `valid`, or read `violations` for the detail.",
|
|
12
12
|
hasSideEffects: false,
|
|
13
|
-
returnType: "
|
|
13
|
+
returnType: "object",
|
|
14
14
|
params: [
|
|
15
15
|
{ name: "tensor", type: "tensor", description: "Input tensor" },
|
|
16
16
|
{ name: "contract", type: "object", description: "Input contract spec" }
|
|
@@ -22,9 +22,9 @@ var CONTRACT_OPERATORS = {
|
|
|
22
22
|
category: "ml-contract",
|
|
23
23
|
minArity: 2,
|
|
24
24
|
maxArity: 2,
|
|
25
|
-
description: "Validate tensor against output contract",
|
|
25
|
+
description: "Validate tensor against output contract. Returns { valid, violations } \u2014 guard on `valid`, or read `violations` for the detail.",
|
|
26
26
|
hasSideEffects: false,
|
|
27
|
-
returnType: "
|
|
27
|
+
returnType: "object",
|
|
28
28
|
params: [
|
|
29
29
|
{ name: "tensor", type: "tensor", description: "Output tensor" },
|
|
30
30
|
{ name: "contract", type: "object", description: "Output contract spec" }
|
package/dist/modules/data.js
CHANGED
|
@@ -36,14 +36,14 @@ var DATA_OPERATORS = {
|
|
|
36
36
|
category: "ml-data",
|
|
37
37
|
minArity: 2,
|
|
38
38
|
maxArity: 2,
|
|
39
|
-
description: "Train/
|
|
39
|
+
description: "Train/validation split. Config carries `trainRatio` (default 0.8); the remainder is the validation split.",
|
|
40
40
|
hasSideEffects: false,
|
|
41
41
|
returnType: "array",
|
|
42
42
|
params: [
|
|
43
43
|
{ name: "dataset", type: "object", description: "Dataset" },
|
|
44
|
-
{ name: "
|
|
44
|
+
{ name: "config", type: "object", description: "Split config, e.g. { trainRatio: 0.8 }" }
|
|
45
45
|
],
|
|
46
|
-
example: '["data/split", "@entity.dataset",
|
|
46
|
+
example: '["data/split", "@entity.dataset", { "trainRatio": 0.8 }]'
|
|
47
47
|
},
|
|
48
48
|
// ============================================================================
|
|
49
49
|
// Preprocessing
|
package/dist/modules/index.js
CHANGED
|
@@ -1988,6 +1988,34 @@ var ARRAY_OPERATORS = {
|
|
|
1988
1988
|
{ name: "n", type: "number", description: "Number of elements to skip" }
|
|
1989
1989
|
],
|
|
1990
1990
|
example: '["array/dropLast", "@items", 2]'
|
|
1991
|
+
},
|
|
1992
|
+
"array/cosine": {
|
|
1993
|
+
module: "array",
|
|
1994
|
+
category: "std-array",
|
|
1995
|
+
minArity: 2,
|
|
1996
|
+
maxArity: 2,
|
|
1997
|
+
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.',
|
|
1998
|
+
hasSideEffects: false,
|
|
1999
|
+
returnType: "number",
|
|
2000
|
+
params: [
|
|
2001
|
+
{ name: "a", type: { kind: "array", of: "number" }, description: "First vector" },
|
|
2002
|
+
{ name: "b", type: { kind: "array", of: "number" }, description: "Second vector" }
|
|
2003
|
+
],
|
|
2004
|
+
example: '["array/cosine", "@entity.answerEmbedding", "@entity.referenceEmbedding"]'
|
|
2005
|
+
},
|
|
2006
|
+
"array/nearest": {
|
|
2007
|
+
module: "array",
|
|
2008
|
+
category: "std-array",
|
|
2009
|
+
minArity: 2,
|
|
2010
|
+
maxArity: 2,
|
|
2011
|
+
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.",
|
|
2012
|
+
hasSideEffects: false,
|
|
2013
|
+
returnType: "object",
|
|
2014
|
+
params: [
|
|
2015
|
+
{ name: "query", type: { kind: "array", of: "number" }, description: "Query vector" },
|
|
2016
|
+
{ name: "candidates", type: { kind: "array", of: { kind: "array", of: "number" } }, description: "Candidate vectors to search" }
|
|
2017
|
+
],
|
|
2018
|
+
example: '["array/nearest", "@entity.queryEmbedding", "@entity.candidateEmbeddings"]'
|
|
1991
2019
|
}
|
|
1992
2020
|
};
|
|
1993
2021
|
function getArrayOperators() {
|
|
@@ -4403,9 +4431,9 @@ var CONTRACT_OPERATORS = {
|
|
|
4403
4431
|
category: "ml-contract",
|
|
4404
4432
|
minArity: 2,
|
|
4405
4433
|
maxArity: 2,
|
|
4406
|
-
description: "Validate tensor against input contract",
|
|
4434
|
+
description: "Validate tensor against input contract. Returns { valid, violations } \u2014 guard on `valid`, or read `violations` for the detail.",
|
|
4407
4435
|
hasSideEffects: false,
|
|
4408
|
-
returnType: "
|
|
4436
|
+
returnType: "object",
|
|
4409
4437
|
params: [
|
|
4410
4438
|
{ name: "tensor", type: "tensor", description: "Input tensor" },
|
|
4411
4439
|
{ name: "contract", type: "object", description: "Input contract spec" }
|
|
@@ -4417,9 +4445,9 @@ var CONTRACT_OPERATORS = {
|
|
|
4417
4445
|
category: "ml-contract",
|
|
4418
4446
|
minArity: 2,
|
|
4419
4447
|
maxArity: 2,
|
|
4420
|
-
description: "Validate tensor against output contract",
|
|
4448
|
+
description: "Validate tensor against output contract. Returns { valid, violations } \u2014 guard on `valid`, or read `violations` for the detail.",
|
|
4421
4449
|
hasSideEffects: false,
|
|
4422
|
-
returnType: "
|
|
4450
|
+
returnType: "object",
|
|
4423
4451
|
params: [
|
|
4424
4452
|
{ name: "tensor", type: "tensor", description: "Output tensor" },
|
|
4425
4453
|
{ name: "contract", type: "object", description: "Output contract spec" }
|
|
@@ -4528,14 +4556,14 @@ var DATA_OPERATORS = {
|
|
|
4528
4556
|
category: "ml-data",
|
|
4529
4557
|
minArity: 2,
|
|
4530
4558
|
maxArity: 2,
|
|
4531
|
-
description: "Train/
|
|
4559
|
+
description: "Train/validation split. Config carries `trainRatio` (default 0.8); the remainder is the validation split.",
|
|
4532
4560
|
hasSideEffects: false,
|
|
4533
4561
|
returnType: "array",
|
|
4534
4562
|
params: [
|
|
4535
4563
|
{ name: "dataset", type: "object", description: "Dataset" },
|
|
4536
|
-
{ name: "
|
|
4564
|
+
{ name: "config", type: "object", description: "Split config, e.g. { trainRatio: 0.8 }" }
|
|
4537
4565
|
],
|
|
4538
|
-
example: '["data/split", "@entity.dataset",
|
|
4566
|
+
example: '["data/split", "@entity.dataset", { "trainRatio": 0.8 }]'
|
|
4539
4567
|
},
|
|
4540
4568
|
// ============================================================================
|
|
4541
4569
|
// Preprocessing
|