@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.
Files changed (43) hide show
  1. package/behaviors/exports/validation-report.json +2 -2
  2. package/dist/behaviors/exports/validation-report.json +2 -2
  3. package/dist/behaviors/exports-reader.js +71 -122
  4. package/dist/behaviors/exports-reader.js.map +1 -1
  5. package/dist/behaviors/functions/index.d.ts +10 -4
  6. package/dist/behaviors/functions/index.js +71 -122
  7. package/dist/behaviors/functions/index.js.map +1 -1
  8. package/dist/behaviors/index.js +71 -122
  9. package/dist/behaviors/index.js.map +1 -1
  10. package/dist/behaviors/query.js +71 -122
  11. package/dist/behaviors/query.js.map +1 -1
  12. package/dist/exports/validation-report.json +2 -2
  13. package/dist/index.d.ts +2 -2
  14. package/dist/index.js +176 -125
  15. package/dist/index.js.map +1 -1
  16. package/dist/modules/agent.d.ts +1 -1
  17. package/dist/modules/array.d.ts +1 -1
  18. package/dist/modules/async.d.ts +1 -1
  19. package/dist/modules/composition.d.ts +27 -0
  20. package/dist/modules/composition.js +98 -0
  21. package/dist/modules/composition.js.map +1 -0
  22. package/dist/modules/contract.d.ts +1 -1
  23. package/dist/modules/data.d.ts +1 -1
  24. package/dist/modules/format.d.ts +1 -1
  25. package/dist/modules/graph.d.ts +1 -1
  26. package/dist/modules/index.d.ts +2 -1
  27. package/dist/modules/index.js +96 -1
  28. package/dist/modules/index.js.map +1 -1
  29. package/dist/modules/math.d.ts +1 -1
  30. package/dist/modules/nn.d.ts +1 -1
  31. package/dist/modules/object.d.ts +1 -1
  32. package/dist/modules/os.d.ts +1 -1
  33. package/dist/modules/prob.d.ts +1 -1
  34. package/dist/modules/str.d.ts +1 -1
  35. package/dist/modules/tensor.d.ts +1 -1
  36. package/dist/modules/time.d.ts +1 -1
  37. package/dist/modules/train.d.ts +1 -1
  38. package/dist/modules/validate.d.ts +1 -1
  39. package/dist/registry.d.ts +1 -1
  40. package/dist/registry.js +98 -3
  41. package/dist/registry.js.map +1 -1
  42. package/dist/{types-BjP5nVQd.d.ts → types-BGtQuBge.d.ts} +5 -3
  43. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import { a as StdOperatorMeta } from '../types-BjP5nVQd.js';
1
+ import { a as StdOperatorMeta } from '../types-BGtQuBge.js';
2
2
 
3
3
  /**
4
4
  * Math Module - Numeric Operations
@@ -1,4 +1,4 @@
1
- import { a as StdOperatorMeta } from '../types-BjP5nVQd.js';
1
+ import { a as StdOperatorMeta } from '../types-BGtQuBge.js';
2
2
 
3
3
  /**
4
4
  * Neural Network Module - Neural Network Operations
@@ -1,4 +1,4 @@
1
- import { a as StdOperatorMeta } from '../types-BjP5nVQd.js';
1
+ import { a as StdOperatorMeta } from '../types-BGtQuBge.js';
2
2
 
3
3
  /**
4
4
  * Object Module - Object Operations
@@ -1,4 +1,4 @@
1
- import { a as StdOperatorMeta } from '../types-BjP5nVQd.js';
1
+ import { a as StdOperatorMeta } from '../types-BGtQuBge.js';
2
2
 
3
3
  /**
4
4
  * OS Module - Operating System Event Watchers
@@ -1,4 +1,4 @@
1
- import { a as StdOperatorMeta } from '../types-BjP5nVQd.js';
1
+ import { a as StdOperatorMeta } from '../types-BGtQuBge.js';
2
2
 
3
3
  /**
4
4
  * Prob Module - Probabilistic Programming Operators
@@ -1,4 +1,4 @@
1
- import { a as StdOperatorMeta } from '../types-BjP5nVQd.js';
1
+ import { a as StdOperatorMeta } from '../types-BGtQuBge.js';
2
2
 
3
3
  /**
4
4
  * String Module - String Operations
@@ -1,4 +1,4 @@
1
- import { a as StdOperatorMeta } from '../types-BjP5nVQd.js';
1
+ import { a as StdOperatorMeta } from '../types-BGtQuBge.js';
2
2
 
3
3
  /**
4
4
  * Tensor Module - Tensor Operations
@@ -1,4 +1,4 @@
1
- import { a as StdOperatorMeta } from '../types-BjP5nVQd.js';
1
+ import { a as StdOperatorMeta } from '../types-BGtQuBge.js';
2
2
 
3
3
  /**
4
4
  * Time Module - Date and Time Operations
@@ -1,4 +1,4 @@
1
- import { a as StdOperatorMeta } from '../types-BjP5nVQd.js';
1
+ import { a as StdOperatorMeta } from '../types-BGtQuBge.js';
2
2
 
3
3
  /**
4
4
  * Training Module - Neural Network Training Operations
@@ -1,4 +1,4 @@
1
- import { a as StdOperatorMeta } from '../types-BjP5nVQd.js';
1
+ import { a as StdOperatorMeta } from '../types-BGtQuBge.js';
2
2
 
3
3
  /**
4
4
  * Validate Module - Input Validation
@@ -1,5 +1,5 @@
1
1
  import { OperatorMeta } from '@almadar/core/types';
2
- import { a as StdOperatorMeta, S as StdModule } from './types-BjP5nVQd.js';
2
+ import { a as StdOperatorMeta, S as StdModule } from './types-BGtQuBge.js';
3
3
 
4
4
  /**
5
5
  * Standard Library Registry
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];