@almadar/std 3.14.1 → 4.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/exports/validation-report.json +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +105 -3
- 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
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
[
|
|
2
2
|
{
|
|
3
|
-
"name": "std-
|
|
3
|
+
"name": "std-cart",
|
|
4
4
|
"errors": 0,
|
|
5
5
|
"warnings": 0,
|
|
6
6
|
"output": [
|
|
7
7
|
"Loaded 22 services from packages/almadar-patterns/src/services-registry.json",
|
|
8
|
-
"Validating schema: /home/osamah/kflow.ai.builder/packages/almadar-std/behaviors/exports/
|
|
8
|
+
"Validating schema: /home/osamah/kflow.ai.builder/packages/almadar-std/behaviors/exports/molecules/std-cart.orb"
|
|
9
9
|
]
|
|
10
10
|
}
|
|
11
11
|
]
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
[
|
|
2
2
|
{
|
|
3
|
-
"name": "std-
|
|
3
|
+
"name": "std-cart",
|
|
4
4
|
"errors": 0,
|
|
5
5
|
"warnings": 0,
|
|
6
6
|
"output": [
|
|
7
7
|
"Loaded 22 services from packages/almadar-patterns/src/services-registry.json",
|
|
8
|
-
"Validating schema: /home/osamah/kflow.ai.builder/packages/almadar-std/behaviors/exports/
|
|
8
|
+
"Validating schema: /home/osamah/kflow.ai.builder/packages/almadar-std/behaviors/exports/molecules/std-cart.orb"
|
|
9
9
|
]
|
|
10
10
|
}
|
|
11
11
|
]
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
[
|
|
2
2
|
{
|
|
3
|
-
"name": "std-
|
|
3
|
+
"name": "std-cart",
|
|
4
4
|
"errors": 0,
|
|
5
5
|
"warnings": 0,
|
|
6
6
|
"output": [
|
|
7
7
|
"Loaded 22 services from packages/almadar-patterns/src/services-registry.json",
|
|
8
|
-
"Validating schema: /home/osamah/kflow.ai.builder/packages/almadar-std/behaviors/exports/
|
|
8
|
+
"Validating schema: /home/osamah/kflow.ai.builder/packages/almadar-std/behaviors/exports/molecules/std-cart.orb"
|
|
9
9
|
]
|
|
10
10
|
}
|
|
11
11
|
]
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { S as StdModule, a as StdOperatorMeta } from './types-
|
|
2
|
-
export { b as STD_MODULES, c as STD_OPERATOR_CATEGORIES, d as StdOperatorCategory, g as getFunctionFromOperator, e as getModuleFromOperator, i as isStdCategory, f as isStdOperator, m as makeStdOperator } from './types-
|
|
1
|
+
import { S as StdModule, a as StdOperatorMeta } from './types-BGtQuBge.js';
|
|
2
|
+
export { b as STD_MODULES, c as STD_OPERATOR_CATEGORIES, d as StdOperatorCategory, g as getFunctionFromOperator, e as getModuleFromOperator, i as isStdCategory, f as isStdOperator, m as makeStdOperator } from './types-BGtQuBge.js';
|
|
3
3
|
export { STD_OPERATORS, STD_OPERATORS_BY_MODULE, getAllStdOperators, getLambdaOperators, getModuleOperators, getOperatorMetaExtended, getStdEffectOperators, getStdLibStats, getStdOperatorMeta, getStdOperatorsByModule, getStdPureOperators, isEffectOperatorExtended, isKnownOperatorExtended, isKnownStdOperator, isStdEffectOperator, isStdGuardOperator, validateOperatorArityExtended, validateStdOperatorArity } from './registry.js';
|
|
4
4
|
export { MATH_OPERATORS } from './modules/math.js';
|
|
5
5
|
export { STR_OPERATORS } from './modules/str.js';
|
package/dist/index.js
CHANGED
|
@@ -25,7 +25,8 @@ var STD_MODULES = [
|
|
|
25
25
|
"agent",
|
|
26
26
|
"graph",
|
|
27
27
|
"contract",
|
|
28
|
-
"data"
|
|
28
|
+
"data",
|
|
29
|
+
"composition"
|
|
29
30
|
];
|
|
30
31
|
var STD_OPERATOR_CATEGORIES = [
|
|
31
32
|
"std-math",
|
|
@@ -42,6 +43,7 @@ var STD_OPERATOR_CATEGORIES = [
|
|
|
42
43
|
"std-prob",
|
|
43
44
|
"std-os",
|
|
44
45
|
"std-agent",
|
|
46
|
+
"std-composition",
|
|
45
47
|
"ml-arch",
|
|
46
48
|
"ml-effect",
|
|
47
49
|
"ml-tensor",
|
|
@@ -3841,6 +3843,98 @@ var AGENT_OPERATORS = {
|
|
|
3841
3843
|
}
|
|
3842
3844
|
};
|
|
3843
3845
|
|
|
3846
|
+
// modules/composition.ts
|
|
3847
|
+
var COMPOSITION_OPERATORS = {
|
|
3848
|
+
"behavior/compose": {
|
|
3849
|
+
module: "composition",
|
|
3850
|
+
category: "std-composition",
|
|
3851
|
+
minArity: 1,
|
|
3852
|
+
maxArity: 1,
|
|
3853
|
+
description: "Compose N orbitals into one application schema. Wires events, picks layout, generates pages.",
|
|
3854
|
+
hasSideEffects: false,
|
|
3855
|
+
compileTime: true,
|
|
3856
|
+
returnType: "object",
|
|
3857
|
+
params: [
|
|
3858
|
+
{
|
|
3859
|
+
name: "config",
|
|
3860
|
+
type: "object",
|
|
3861
|
+
description: "ComposeBehaviorsInput: { appName, orbitals[], layoutStrategy?, eventWiring?, entityMappings? }"
|
|
3862
|
+
}
|
|
3863
|
+
],
|
|
3864
|
+
example: '(behavior/compose { appName: "ShoppingApp" orbitals: [...] })'
|
|
3865
|
+
},
|
|
3866
|
+
"behavior/wire": {
|
|
3867
|
+
module: "composition",
|
|
3868
|
+
category: "std-composition",
|
|
3869
|
+
minArity: 2,
|
|
3870
|
+
maxArity: 2,
|
|
3871
|
+
description: "Apply cross-orbital event wiring. Adds external emits/listens to inline traits.",
|
|
3872
|
+
hasSideEffects: false,
|
|
3873
|
+
compileTime: true,
|
|
3874
|
+
returnType: "array",
|
|
3875
|
+
params: [
|
|
3876
|
+
{
|
|
3877
|
+
name: "orbitals",
|
|
3878
|
+
type: "array",
|
|
3879
|
+
description: "Array of OrbitalDefinition to wire"
|
|
3880
|
+
},
|
|
3881
|
+
{
|
|
3882
|
+
name: "wiring",
|
|
3883
|
+
type: "array",
|
|
3884
|
+
description: "Array of EventWiringEntry { from, event, to, triggers }"
|
|
3885
|
+
}
|
|
3886
|
+
],
|
|
3887
|
+
example: "(behavior/wire orbitals wiring)"
|
|
3888
|
+
},
|
|
3889
|
+
"behavior/detect-layout": {
|
|
3890
|
+
module: "composition",
|
|
3891
|
+
category: "std-composition",
|
|
3892
|
+
minArity: 1,
|
|
3893
|
+
maxArity: 2,
|
|
3894
|
+
description: "Auto-detect layout from orbital count and wiring topology. Returns single, tabs, sidebar, dashboard, or wizard-flow.",
|
|
3895
|
+
hasSideEffects: false,
|
|
3896
|
+
compileTime: true,
|
|
3897
|
+
returnType: "string",
|
|
3898
|
+
params: [
|
|
3899
|
+
{
|
|
3900
|
+
name: "orbitals",
|
|
3901
|
+
type: "array",
|
|
3902
|
+
description: "Array of OrbitalDefinition"
|
|
3903
|
+
},
|
|
3904
|
+
{
|
|
3905
|
+
name: "wiring",
|
|
3906
|
+
type: "array",
|
|
3907
|
+
description: "Optional EventWiringEntry array",
|
|
3908
|
+
optional: true
|
|
3909
|
+
}
|
|
3910
|
+
],
|
|
3911
|
+
example: "(behavior/detect-layout orbitals)"
|
|
3912
|
+
},
|
|
3913
|
+
"behavior/pipe": {
|
|
3914
|
+
module: "composition",
|
|
3915
|
+
category: "std-composition",
|
|
3916
|
+
minArity: 2,
|
|
3917
|
+
maxArity: null,
|
|
3918
|
+
description: "Left-to-right composition. Each step receives the previous result as its first arg.",
|
|
3919
|
+
hasSideEffects: false,
|
|
3920
|
+
compileTime: true,
|
|
3921
|
+
returnType: "any",
|
|
3922
|
+
params: [
|
|
3923
|
+
{
|
|
3924
|
+
name: "seed",
|
|
3925
|
+
type: "any",
|
|
3926
|
+
description: "Initial value to pipe through steps"
|
|
3927
|
+
},
|
|
3928
|
+
{
|
|
3929
|
+
name: "...steps",
|
|
3930
|
+
type: "function[]",
|
|
3931
|
+
description: "Functions, each receiving the previous result as first argument"
|
|
3932
|
+
}
|
|
3933
|
+
],
|
|
3934
|
+
example: '(behavior/pipe orbitals (behavior/wire wiring) (behavior/compose { appName: "X" }))'
|
|
3935
|
+
}
|
|
3936
|
+
};
|
|
3937
|
+
|
|
3844
3938
|
// registry.ts
|
|
3845
3939
|
var STD_OPERATORS = {
|
|
3846
3940
|
...MATH_OPERATORS,
|
|
@@ -3856,7 +3950,8 @@ var STD_OPERATORS = {
|
|
|
3856
3950
|
...TRAIN_OPERATORS,
|
|
3857
3951
|
...PROB_OPERATORS,
|
|
3858
3952
|
...OS_OPERATORS,
|
|
3859
|
-
...AGENT_OPERATORS
|
|
3953
|
+
...AGENT_OPERATORS,
|
|
3954
|
+
...COMPOSITION_OPERATORS
|
|
3860
3955
|
};
|
|
3861
3956
|
var STD_OPERATORS_BY_MODULE = {
|
|
3862
3957
|
math: MATH_OPERATORS,
|
|
@@ -3872,7 +3967,8 @@ var STD_OPERATORS_BY_MODULE = {
|
|
|
3872
3967
|
train: TRAIN_OPERATORS,
|
|
3873
3968
|
prob: PROB_OPERATORS,
|
|
3874
3969
|
os: OS_OPERATORS,
|
|
3875
|
-
agent: AGENT_OPERATORS
|
|
3970
|
+
agent: AGENT_OPERATORS,
|
|
3971
|
+
composition: COMPOSITION_OPERATORS
|
|
3876
3972
|
};
|
|
3877
3973
|
function getStdOperatorMeta(operator) {
|
|
3878
3974
|
return STD_OPERATORS[operator];
|
|
@@ -32348,6 +32444,12 @@ var MODULE_DESCRIPTIONS = {
|
|
|
32348
32444
|
displayName: "Agent Intelligence",
|
|
32349
32445
|
description: "Agent memory management, LLM access, tool invocation, context management, and session control.",
|
|
32350
32446
|
icon: "\u{1F916}"
|
|
32447
|
+
},
|
|
32448
|
+
composition: {
|
|
32449
|
+
name: "Composition",
|
|
32450
|
+
displayName: "Behavior Composition",
|
|
32451
|
+
description: "Compile-time operators for composing N orbitals into a single application schema.",
|
|
32452
|
+
icon: "\u{1F9E9}"
|
|
32351
32453
|
}
|
|
32352
32454
|
};
|
|
32353
32455
|
var BEHAVIOR_GROUPINGS = {
|