@almadar/std 3.14.1 → 5.0.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/exports/validation-report.json +2 -2
- package/dist/behaviors/exports/validation-report.json +2 -2
- package/dist/behaviors/exports-reader.js +71 -122
- package/dist/behaviors/exports-reader.js.map +1 -1
- package/dist/behaviors/functions/index.d.ts +10 -4
- package/dist/behaviors/functions/index.js +71 -122
- package/dist/behaviors/functions/index.js.map +1 -1
- package/dist/behaviors/index.js +71 -122
- package/dist/behaviors/index.js.map +1 -1
- package/dist/behaviors/query.js +71 -122
- package/dist/behaviors/query.js.map +1 -1
- package/dist/exports/validation-report.json +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +176 -125
- package/dist/index.js.map +1 -1
- package/dist/modules/agent.d.ts +1 -1
- package/dist/modules/array.d.ts +1 -1
- package/dist/modules/async.d.ts +1 -1
- package/dist/modules/composition.d.ts +27 -0
- package/dist/modules/composition.js +98 -0
- package/dist/modules/composition.js.map +1 -0
- package/dist/modules/contract.d.ts +1 -1
- package/dist/modules/data.d.ts +1 -1
- package/dist/modules/format.d.ts +1 -1
- package/dist/modules/graph.d.ts +1 -1
- package/dist/modules/index.d.ts +2 -1
- package/dist/modules/index.js +96 -1
- 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/object.d.ts +1 -1
- package/dist/modules/os.d.ts +1 -1
- 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/time.d.ts +1 -1
- package/dist/modules/train.d.ts +1 -1
- package/dist/modules/validate.d.ts +1 -1
- package/dist/registry.d.ts +1 -1
- package/dist/registry.js +98 -3
- package/dist/registry.js.map +1 -1
- package/dist/{types-BjP5nVQd.d.ts → types-BGtQuBge.d.ts} +5 -3
- package/package.json +1 -1
package/dist/modules/math.d.ts
CHANGED
package/dist/modules/nn.d.ts
CHANGED
package/dist/modules/object.d.ts
CHANGED
package/dist/modules/os.d.ts
CHANGED
package/dist/modules/prob.d.ts
CHANGED
package/dist/modules/str.d.ts
CHANGED
package/dist/modules/tensor.d.ts
CHANGED
package/dist/modules/time.d.ts
CHANGED
package/dist/modules/train.d.ts
CHANGED
package/dist/registry.d.ts
CHANGED
package/dist/registry.js
CHANGED
|
@@ -16,7 +16,8 @@ var STD_MODULES = [
|
|
|
16
16
|
"agent",
|
|
17
17
|
"graph",
|
|
18
18
|
"contract",
|
|
19
|
-
"data"
|
|
19
|
+
"data",
|
|
20
|
+
"composition"
|
|
20
21
|
];
|
|
21
22
|
function getModuleFromOperator(operator) {
|
|
22
23
|
const parts = operator.split("/");
|
|
@@ -3800,6 +3801,98 @@ var AGENT_OPERATORS = {
|
|
|
3800
3801
|
}
|
|
3801
3802
|
};
|
|
3802
3803
|
|
|
3804
|
+
// modules/composition.ts
|
|
3805
|
+
var COMPOSITION_OPERATORS = {
|
|
3806
|
+
"behavior/compose": {
|
|
3807
|
+
module: "composition",
|
|
3808
|
+
category: "std-composition",
|
|
3809
|
+
minArity: 1,
|
|
3810
|
+
maxArity: 1,
|
|
3811
|
+
description: "Compose N orbitals into one application schema. Wires events, picks layout, generates pages.",
|
|
3812
|
+
hasSideEffects: false,
|
|
3813
|
+
compileTime: true,
|
|
3814
|
+
returnType: "object",
|
|
3815
|
+
params: [
|
|
3816
|
+
{
|
|
3817
|
+
name: "config",
|
|
3818
|
+
type: "object",
|
|
3819
|
+
description: "ComposeBehaviorsInput: { appName, orbitals[], layoutStrategy?, eventWiring?, entityMappings? }"
|
|
3820
|
+
}
|
|
3821
|
+
],
|
|
3822
|
+
example: '(behavior/compose { appName: "ShoppingApp" orbitals: [...] })'
|
|
3823
|
+
},
|
|
3824
|
+
"behavior/wire": {
|
|
3825
|
+
module: "composition",
|
|
3826
|
+
category: "std-composition",
|
|
3827
|
+
minArity: 2,
|
|
3828
|
+
maxArity: 2,
|
|
3829
|
+
description: "Apply cross-orbital event wiring. Adds external emits/listens to inline traits.",
|
|
3830
|
+
hasSideEffects: false,
|
|
3831
|
+
compileTime: true,
|
|
3832
|
+
returnType: "array",
|
|
3833
|
+
params: [
|
|
3834
|
+
{
|
|
3835
|
+
name: "orbitals",
|
|
3836
|
+
type: "array",
|
|
3837
|
+
description: "Array of OrbitalDefinition to wire"
|
|
3838
|
+
},
|
|
3839
|
+
{
|
|
3840
|
+
name: "wiring",
|
|
3841
|
+
type: "array",
|
|
3842
|
+
description: "Array of EventWiringEntry { from, event, to, triggers }"
|
|
3843
|
+
}
|
|
3844
|
+
],
|
|
3845
|
+
example: "(behavior/wire orbitals wiring)"
|
|
3846
|
+
},
|
|
3847
|
+
"behavior/detect-layout": {
|
|
3848
|
+
module: "composition",
|
|
3849
|
+
category: "std-composition",
|
|
3850
|
+
minArity: 1,
|
|
3851
|
+
maxArity: 2,
|
|
3852
|
+
description: "Auto-detect layout from orbital count and wiring topology. Returns single, tabs, sidebar, dashboard, or wizard-flow.",
|
|
3853
|
+
hasSideEffects: false,
|
|
3854
|
+
compileTime: true,
|
|
3855
|
+
returnType: "string",
|
|
3856
|
+
params: [
|
|
3857
|
+
{
|
|
3858
|
+
name: "orbitals",
|
|
3859
|
+
type: "array",
|
|
3860
|
+
description: "Array of OrbitalDefinition"
|
|
3861
|
+
},
|
|
3862
|
+
{
|
|
3863
|
+
name: "wiring",
|
|
3864
|
+
type: "array",
|
|
3865
|
+
description: "Optional EventWiringEntry array",
|
|
3866
|
+
optional: true
|
|
3867
|
+
}
|
|
3868
|
+
],
|
|
3869
|
+
example: "(behavior/detect-layout orbitals)"
|
|
3870
|
+
},
|
|
3871
|
+
"behavior/pipe": {
|
|
3872
|
+
module: "composition",
|
|
3873
|
+
category: "std-composition",
|
|
3874
|
+
minArity: 2,
|
|
3875
|
+
maxArity: null,
|
|
3876
|
+
description: "Left-to-right composition. Each step receives the previous result as its first arg.",
|
|
3877
|
+
hasSideEffects: false,
|
|
3878
|
+
compileTime: true,
|
|
3879
|
+
returnType: "any",
|
|
3880
|
+
params: [
|
|
3881
|
+
{
|
|
3882
|
+
name: "seed",
|
|
3883
|
+
type: "any",
|
|
3884
|
+
description: "Initial value to pipe through steps"
|
|
3885
|
+
},
|
|
3886
|
+
{
|
|
3887
|
+
name: "...steps",
|
|
3888
|
+
type: "function[]",
|
|
3889
|
+
description: "Functions, each receiving the previous result as first argument"
|
|
3890
|
+
}
|
|
3891
|
+
],
|
|
3892
|
+
example: '(behavior/pipe orbitals (behavior/wire wiring) (behavior/compose { appName: "X" }))'
|
|
3893
|
+
}
|
|
3894
|
+
};
|
|
3895
|
+
|
|
3803
3896
|
// registry.ts
|
|
3804
3897
|
var STD_OPERATORS = {
|
|
3805
3898
|
...MATH_OPERATORS,
|
|
@@ -3815,7 +3908,8 @@ var STD_OPERATORS = {
|
|
|
3815
3908
|
...TRAIN_OPERATORS,
|
|
3816
3909
|
...PROB_OPERATORS,
|
|
3817
3910
|
...OS_OPERATORS,
|
|
3818
|
-
...AGENT_OPERATORS
|
|
3911
|
+
...AGENT_OPERATORS,
|
|
3912
|
+
...COMPOSITION_OPERATORS
|
|
3819
3913
|
};
|
|
3820
3914
|
var STD_OPERATORS_BY_MODULE = {
|
|
3821
3915
|
math: MATH_OPERATORS,
|
|
@@ -3831,7 +3925,8 @@ var STD_OPERATORS_BY_MODULE = {
|
|
|
3831
3925
|
train: TRAIN_OPERATORS,
|
|
3832
3926
|
prob: PROB_OPERATORS,
|
|
3833
3927
|
os: OS_OPERATORS,
|
|
3834
|
-
agent: AGENT_OPERATORS
|
|
3928
|
+
agent: AGENT_OPERATORS,
|
|
3929
|
+
composition: COMPOSITION_OPERATORS
|
|
3835
3930
|
};
|
|
3836
3931
|
function getStdOperatorMeta(operator) {
|
|
3837
3932
|
return STD_OPERATORS[operator];
|