@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
  * Agent Module - AI Agent Intelligence 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
  * Array Module - Collection 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
  * Async Module - Asynchronous Operations
@@ -0,0 +1,27 @@
1
+ import { a as StdOperatorMeta } from '../types-BGtQuBge.js';
2
+
3
+ /**
4
+ * Composition Module - Behavior Composition Operators
5
+ *
6
+ * Provides compile-time operators for composing N orbitals into a single
7
+ * application schema. These operators are resolved during `.lolo` lowering
8
+ * (or by the parallel Rust composition pass), not at runtime.
9
+ *
10
+ * Surfaced here so that the lolo type sync tool can publish them in
11
+ * `signatures.lolo`, the Rust compiler can validate their arity and shape,
12
+ * and IDE tooling can discover them through the unified std registry.
13
+ *
14
+ * @packageDocumentation
15
+ */
16
+
17
+ /**
18
+ * Composition module operators.
19
+ * All operators are pure (no runtime side effects) and compile-time resolved.
20
+ */
21
+ declare const COMPOSITION_OPERATORS: Record<string, StdOperatorMeta>;
22
+ /**
23
+ * Get all composition operator names.
24
+ */
25
+ declare function getCompositionOperators(): string[];
26
+
27
+ export { COMPOSITION_OPERATORS, getCompositionOperators };
@@ -0,0 +1,98 @@
1
+ // modules/composition.ts
2
+ var COMPOSITION_OPERATORS = {
3
+ "behavior/compose": {
4
+ module: "composition",
5
+ category: "std-composition",
6
+ minArity: 1,
7
+ maxArity: 1,
8
+ description: "Compose N orbitals into one application schema. Wires events, picks layout, generates pages.",
9
+ hasSideEffects: false,
10
+ compileTime: true,
11
+ returnType: "object",
12
+ params: [
13
+ {
14
+ name: "config",
15
+ type: "object",
16
+ description: "ComposeBehaviorsInput: { appName, orbitals[], layoutStrategy?, eventWiring?, entityMappings? }"
17
+ }
18
+ ],
19
+ example: '(behavior/compose { appName: "ShoppingApp" orbitals: [...] })'
20
+ },
21
+ "behavior/wire": {
22
+ module: "composition",
23
+ category: "std-composition",
24
+ minArity: 2,
25
+ maxArity: 2,
26
+ description: "Apply cross-orbital event wiring. Adds external emits/listens to inline traits.",
27
+ hasSideEffects: false,
28
+ compileTime: true,
29
+ returnType: "array",
30
+ params: [
31
+ {
32
+ name: "orbitals",
33
+ type: "array",
34
+ description: "Array of OrbitalDefinition to wire"
35
+ },
36
+ {
37
+ name: "wiring",
38
+ type: "array",
39
+ description: "Array of EventWiringEntry { from, event, to, triggers }"
40
+ }
41
+ ],
42
+ example: "(behavior/wire orbitals wiring)"
43
+ },
44
+ "behavior/detect-layout": {
45
+ module: "composition",
46
+ category: "std-composition",
47
+ minArity: 1,
48
+ maxArity: 2,
49
+ description: "Auto-detect layout from orbital count and wiring topology. Returns single, tabs, sidebar, dashboard, or wizard-flow.",
50
+ hasSideEffects: false,
51
+ compileTime: true,
52
+ returnType: "string",
53
+ params: [
54
+ {
55
+ name: "orbitals",
56
+ type: "array",
57
+ description: "Array of OrbitalDefinition"
58
+ },
59
+ {
60
+ name: "wiring",
61
+ type: "array",
62
+ description: "Optional EventWiringEntry array",
63
+ optional: true
64
+ }
65
+ ],
66
+ example: "(behavior/detect-layout orbitals)"
67
+ },
68
+ "behavior/pipe": {
69
+ module: "composition",
70
+ category: "std-composition",
71
+ minArity: 2,
72
+ maxArity: null,
73
+ description: "Left-to-right composition. Each step receives the previous result as its first arg.",
74
+ hasSideEffects: false,
75
+ compileTime: true,
76
+ returnType: "any",
77
+ params: [
78
+ {
79
+ name: "seed",
80
+ type: "any",
81
+ description: "Initial value to pipe through steps"
82
+ },
83
+ {
84
+ name: "...steps",
85
+ type: "function[]",
86
+ description: "Functions, each receiving the previous result as first argument"
87
+ }
88
+ ],
89
+ example: '(behavior/pipe orbitals (behavior/wire wiring) (behavior/compose { appName: "X" }))'
90
+ }
91
+ };
92
+ function getCompositionOperators() {
93
+ return Object.keys(COMPOSITION_OPERATORS);
94
+ }
95
+
96
+ export { COMPOSITION_OPERATORS, getCompositionOperators };
97
+ //# sourceMappingURL=composition.js.map
98
+ //# sourceMappingURL=composition.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../modules/composition.ts"],"names":[],"mappings":";AAoBO,IAAM,qBAAA,GAAyD;AAAA,EACpE,kBAAA,EAAoB;AAAA,IAClB,MAAA,EAAQ,aAAA;AAAA,IACR,QAAA,EAAU,iBAAA;AAAA,IACV,QAAA,EAAU,CAAA;AAAA,IACV,QAAA,EAAU,CAAA;AAAA,IACV,WAAA,EAAa,8FAAA;AAAA,IACb,cAAA,EAAgB,KAAA;AAAA,IAChB,WAAA,EAAa,IAAA;AAAA,IACb,UAAA,EAAY,QAAA;AAAA,IACZ,MAAA,EAAQ;AAAA,MACN;AAAA,QACE,IAAA,EAAM,QAAA;AAAA,QACN,IAAA,EAAM,QAAA;AAAA,QACN,WAAA,EAAa;AAAA;AACf,KACF;AAAA,IACA,OAAA,EAAS;AAAA,GACX;AAAA,EACA,eAAA,EAAiB;AAAA,IACf,MAAA,EAAQ,aAAA;AAAA,IACR,QAAA,EAAU,iBAAA;AAAA,IACV,QAAA,EAAU,CAAA;AAAA,IACV,QAAA,EAAU,CAAA;AAAA,IACV,WAAA,EAAa,iFAAA;AAAA,IACb,cAAA,EAAgB,KAAA;AAAA,IAChB,WAAA,EAAa,IAAA;AAAA,IACb,UAAA,EAAY,OAAA;AAAA,IACZ,MAAA,EAAQ;AAAA,MACN;AAAA,QACE,IAAA,EAAM,UAAA;AAAA,QACN,IAAA,EAAM,OAAA;AAAA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A,IACA,OAAA,EAAS;AAAA;AAEb;AAKO,SAAS,uBAAA,GAAoC;AAClD,EAAA,OAAO,MAAA,CAAO,KAAK,qBAAqB,CAAA;AAC1C","file":"composition.js","sourcesContent":["/**\n * Composition Module - Behavior Composition Operators\n *\n * Provides compile-time operators for composing N orbitals into a single\n * application schema. These operators are resolved during `.lolo` lowering\n * (or by the parallel Rust composition pass), not at runtime.\n *\n * Surfaced here so that the lolo type sync tool can publish them in\n * `signatures.lolo`, the Rust compiler can validate their arity and shape,\n * and IDE tooling can discover them through the unified std registry.\n *\n * @packageDocumentation\n */\n\nimport type { StdOperatorMeta } from '../types.js';\n\n/**\n * Composition module operators.\n * All operators are pure (no runtime side effects) and compile-time resolved.\n */\nexport const COMPOSITION_OPERATORS: Record<string, StdOperatorMeta> = {\n 'behavior/compose': {\n module: 'composition',\n category: 'std-composition',\n minArity: 1,\n maxArity: 1,\n description: 'Compose N orbitals into one application schema. Wires events, picks layout, generates pages.',\n hasSideEffects: false,\n compileTime: true,\n returnType: 'object',\n params: [\n {\n name: 'config',\n type: 'object',\n description: 'ComposeBehaviorsInput: { appName, orbitals[], layoutStrategy?, eventWiring?, entityMappings? }',\n },\n ],\n example: '(behavior/compose { appName: \"ShoppingApp\" orbitals: [...] })',\n },\n 'behavior/wire': {\n module: 'composition',\n category: 'std-composition',\n minArity: 2,\n maxArity: 2,\n description: 'Apply cross-orbital event wiring. Adds external emits/listens to inline traits.',\n hasSideEffects: false,\n compileTime: true,\n returnType: 'array',\n params: [\n {\n name: 'orbitals',\n type: 'array',\n description: 'Array of OrbitalDefinition to wire',\n },\n {\n name: 'wiring',\n type: 'array',\n description: 'Array of EventWiringEntry { from, event, to, triggers }',\n },\n ],\n example: '(behavior/wire orbitals wiring)',\n },\n 'behavior/detect-layout': {\n module: 'composition',\n category: 'std-composition',\n minArity: 1,\n maxArity: 2,\n description: 'Auto-detect layout from orbital count and wiring topology. Returns single, tabs, sidebar, dashboard, or wizard-flow.',\n hasSideEffects: false,\n compileTime: true,\n returnType: 'string',\n params: [\n {\n name: 'orbitals',\n type: 'array',\n description: 'Array of OrbitalDefinition',\n },\n {\n name: 'wiring',\n type: 'array',\n description: 'Optional EventWiringEntry array',\n optional: true,\n },\n ],\n example: '(behavior/detect-layout orbitals)',\n },\n 'behavior/pipe': {\n module: 'composition',\n category: 'std-composition',\n minArity: 2,\n maxArity: null,\n description: 'Left-to-right composition. Each step receives the previous result as its first arg.',\n hasSideEffects: false,\n compileTime: true,\n returnType: 'any',\n params: [\n {\n name: 'seed',\n type: 'any',\n description: 'Initial value to pipe through steps',\n },\n {\n name: '...steps',\n type: 'function[]',\n description: 'Functions, each receiving the previous result as first argument',\n },\n ],\n example: '(behavior/pipe orbitals (behavior/wire wiring) (behavior/compose { appName: \"X\" }))',\n },\n};\n\n/**\n * Get all composition operator names.\n */\nexport function getCompositionOperators(): string[] {\n return Object.keys(COMPOSITION_OPERATORS);\n}\n"]}
@@ -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
  * Contract Module - ML Contract Validation 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
  * Data Module - ML Data Preprocessing 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
  * Format Module - Display Formatting
@@ -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
  * Graph Module - Graph Neural Network Operations
@@ -15,4 +15,5 @@ export { DATA_OPERATORS, getDataOperators } from './data.js';
15
15
  export { PROB_OPERATORS, getProbOperators } from './prob.js';
16
16
  export { OS_OPERATORS } from './os.js';
17
17
  export { AGENT_OPERATORS, getAgentOperators } from './agent.js';
18
- import '../types-BjP5nVQd.js';
18
+ export { COMPOSITION_OPERATORS, getCompositionOperators } from './composition.js';
19
+ import '../types-BGtQuBge.js';
@@ -4229,6 +4229,101 @@ function getAgentOperators() {
4229
4229
  return Object.keys(AGENT_OPERATORS);
4230
4230
  }
4231
4231
 
4232
- export { AGENT_OPERATORS, ARRAY_OPERATORS, ASYNC_OPERATORS, CONTRACT_OPERATORS, DATA_OPERATORS, FORMAT_OPERATORS, GRAPH_OPERATORS, MATH_OPERATORS, NN_OPERATORS, OBJECT_OPERATORS, OS_OPERATORS, PROB_OPERATORS, STR_OPERATORS, TENSOR_OPERATORS, TIME_OPERATORS, TRAIN_OPERATORS, VALIDATE_OPERATORS, getAgentOperators, getArrayOperators, getAsyncOperators, getContractOperators, getDataOperators, getFormatOperators, getGraphOperators, getLambdaArrayOperators, getMathOperators, getNnOperators, getObjectOperators, getProbOperators, getStrOperators, getTensorOperators, getTimeOperators, getTrainOperators, getValidateOperators };
4232
+ // modules/composition.ts
4233
+ var COMPOSITION_OPERATORS = {
4234
+ "behavior/compose": {
4235
+ module: "composition",
4236
+ category: "std-composition",
4237
+ minArity: 1,
4238
+ maxArity: 1,
4239
+ description: "Compose N orbitals into one application schema. Wires events, picks layout, generates pages.",
4240
+ hasSideEffects: false,
4241
+ compileTime: true,
4242
+ returnType: "object",
4243
+ params: [
4244
+ {
4245
+ name: "config",
4246
+ type: "object",
4247
+ description: "ComposeBehaviorsInput: { appName, orbitals[], layoutStrategy?, eventWiring?, entityMappings? }"
4248
+ }
4249
+ ],
4250
+ example: '(behavior/compose { appName: "ShoppingApp" orbitals: [...] })'
4251
+ },
4252
+ "behavior/wire": {
4253
+ module: "composition",
4254
+ category: "std-composition",
4255
+ minArity: 2,
4256
+ maxArity: 2,
4257
+ description: "Apply cross-orbital event wiring. Adds external emits/listens to inline traits.",
4258
+ hasSideEffects: false,
4259
+ compileTime: true,
4260
+ returnType: "array",
4261
+ params: [
4262
+ {
4263
+ name: "orbitals",
4264
+ type: "array",
4265
+ description: "Array of OrbitalDefinition to wire"
4266
+ },
4267
+ {
4268
+ name: "wiring",
4269
+ type: "array",
4270
+ description: "Array of EventWiringEntry { from, event, to, triggers }"
4271
+ }
4272
+ ],
4273
+ example: "(behavior/wire orbitals wiring)"
4274
+ },
4275
+ "behavior/detect-layout": {
4276
+ module: "composition",
4277
+ category: "std-composition",
4278
+ minArity: 1,
4279
+ maxArity: 2,
4280
+ description: "Auto-detect layout from orbital count and wiring topology. Returns single, tabs, sidebar, dashboard, or wizard-flow.",
4281
+ hasSideEffects: false,
4282
+ compileTime: true,
4283
+ returnType: "string",
4284
+ params: [
4285
+ {
4286
+ name: "orbitals",
4287
+ type: "array",
4288
+ description: "Array of OrbitalDefinition"
4289
+ },
4290
+ {
4291
+ name: "wiring",
4292
+ type: "array",
4293
+ description: "Optional EventWiringEntry array",
4294
+ optional: true
4295
+ }
4296
+ ],
4297
+ example: "(behavior/detect-layout orbitals)"
4298
+ },
4299
+ "behavior/pipe": {
4300
+ module: "composition",
4301
+ category: "std-composition",
4302
+ minArity: 2,
4303
+ maxArity: null,
4304
+ description: "Left-to-right composition. Each step receives the previous result as its first arg.",
4305
+ hasSideEffects: false,
4306
+ compileTime: true,
4307
+ returnType: "any",
4308
+ params: [
4309
+ {
4310
+ name: "seed",
4311
+ type: "any",
4312
+ description: "Initial value to pipe through steps"
4313
+ },
4314
+ {
4315
+ name: "...steps",
4316
+ type: "function[]",
4317
+ description: "Functions, each receiving the previous result as first argument"
4318
+ }
4319
+ ],
4320
+ example: '(behavior/pipe orbitals (behavior/wire wiring) (behavior/compose { appName: "X" }))'
4321
+ }
4322
+ };
4323
+ function getCompositionOperators() {
4324
+ return Object.keys(COMPOSITION_OPERATORS);
4325
+ }
4326
+
4327
+ export { AGENT_OPERATORS, ARRAY_OPERATORS, ASYNC_OPERATORS, COMPOSITION_OPERATORS, CONTRACT_OPERATORS, DATA_OPERATORS, FORMAT_OPERATORS, GRAPH_OPERATORS, MATH_OPERATORS, NN_OPERATORS, OBJECT_OPERATORS, OS_OPERATORS, PROB_OPERATORS, STR_OPERATORS, TENSOR_OPERATORS, TIME_OPERATORS, TRAIN_OPERATORS, VALIDATE_OPERATORS, getAgentOperators, getArrayOperators, getAsyncOperators, getCompositionOperators, getContractOperators, getDataOperators, getFormatOperators, getGraphOperators, getLambdaArrayOperators, getMathOperators, getNnOperators, getObjectOperators, getProbOperators, getStrOperators, getTensorOperators, getTimeOperators, getTrainOperators, getValidateOperators };
4233
4328
  //# sourceMappingURL=index.js.map
4234
4329
  //# sourceMappingURL=index.js.map