@almadar/std 13.6.0 → 13.8.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 (174) hide show
  1. package/behaviors/registry/agent/atoms/std-agent-activity-log.orb +69 -69
  2. package/behaviors/registry/agent/atoms/std-agent-chat-thread.orb +120 -120
  3. package/behaviors/registry/agent/atoms/std-agent-classifier.orb +114 -114
  4. package/behaviors/registry/agent/atoms/std-agent-completion.orb +124 -114
  5. package/behaviors/registry/agent/atoms/std-agent-context-window.orb +410 -395
  6. package/behaviors/registry/agent/atoms/std-agent-conversation.orb +93 -93
  7. package/behaviors/registry/agent/atoms/std-agent-memory.orb +67 -117
  8. package/behaviors/registry/agent/atoms/std-agent-provider.orb +149 -134
  9. package/behaviors/registry/agent/atoms/std-agent-search.orb +64 -64
  10. package/behaviors/registry/agent/atoms/std-agent-session.orb +106 -106
  11. package/behaviors/registry/agent/atoms/std-agent-step-progress.orb +194 -189
  12. package/behaviors/registry/agent/atoms/std-agent-token-gauge.orb +360 -355
  13. package/behaviors/registry/agent/atoms/std-agent-tool-call.orb +69 -69
  14. package/behaviors/registry/agent/molecules/std-agent-fix-loop.orb +204 -199
  15. package/behaviors/registry/agent/molecules/std-agent-learner.orb +174 -174
  16. package/behaviors/registry/agent/molecules/std-agent-planner.orb +125 -125
  17. package/behaviors/registry/agent/molecules/std-agent-rag.orb +127 -109
  18. package/behaviors/registry/agent/molecules/std-agent-tool-loop.orb +190 -185
  19. package/behaviors/registry/agent/organisms/std-agent-assistant.orb +1209 -1155
  20. package/behaviors/registry/agent/organisms/std-agent-builder.orb +3021 -3001
  21. package/behaviors/registry/agent/organisms/std-agent-pipeline.orb +2184 -2249
  22. package/behaviors/registry/agent/organisms/std-agent-reviewer.orb +1029 -1050
  23. package/behaviors/registry/agent/organisms/std-agent-tutor.orb +842 -804
  24. package/behaviors/registry/app/organisms/std-cms.orb +547 -547
  25. package/behaviors/registry/core/atoms/std-browse.orb +36 -36
  26. package/behaviors/registry/core/atoms/std-cache-aside.orb +111 -111
  27. package/behaviors/registry/core/atoms/std-calendar.orb +56 -51
  28. package/behaviors/registry/core/atoms/std-circuit-breaker.orb +202 -187
  29. package/behaviors/registry/core/atoms/std-confirmation.orb +24 -27
  30. package/behaviors/registry/core/atoms/std-display.orb +2 -2
  31. package/behaviors/registry/core/atoms/std-drawer.orb +58 -58
  32. package/behaviors/registry/core/atoms/std-filter.orb +6 -9
  33. package/behaviors/registry/core/atoms/std-gallery.orb +46 -46
  34. package/behaviors/registry/core/atoms/std-graphs.orb +24 -24
  35. package/behaviors/registry/core/atoms/std-modal.orb +19 -19
  36. package/behaviors/registry/core/atoms/std-pagination.orb +14 -14
  37. package/behaviors/registry/core/atoms/std-push.orb +48 -90
  38. package/behaviors/registry/core/atoms/std-rate-limiter.orb +205 -190
  39. package/behaviors/registry/core/atoms/std-related.orb +31 -31
  40. package/behaviors/registry/core/atoms/std-search.orb +3 -3
  41. package/behaviors/registry/core/atoms/std-selection.orb +102 -102
  42. package/behaviors/registry/core/atoms/std-stats.orb +64 -64
  43. package/behaviors/registry/core/atoms/std-tabs.orb +18 -18
  44. package/behaviors/registry/core/molecules/std-cart.orb +64 -64
  45. package/behaviors/registry/core/molecules/std-dashboard.orb +46 -46
  46. package/behaviors/registry/core/molecules/std-filtered-list.orb +21 -21
  47. package/behaviors/registry/core/molecules/std-form-advanced.orb +172 -127
  48. package/behaviors/registry/core/molecules/std-list.orb +63 -63
  49. package/behaviors/registry/core/molecules/std-wizard-form.orb +145 -130
  50. package/behaviors/registry/game/atoms/std-dialogue-box.orb +25 -25
  51. package/behaviors/registry/game/atoms/std-game-canvas2d.orb +42 -42
  52. package/behaviors/registry/game/atoms/std-overworld.orb +57 -57
  53. package/behaviors/registry/game/atoms/std-physics2d.orb +74 -74
  54. package/behaviors/registry/game/atoms/std-quest.orb +137 -137
  55. package/behaviors/registry/game/atoms/std-timer.orb +291 -291
  56. package/behaviors/registry/probes/molecules/std-source-scope-probe.orb +31 -31
  57. package/behaviors/registry/service/atoms/std-service-custom-bearer.orb +93 -78
  58. package/behaviors/registry/service/atoms/std-service-email.orb +91 -76
  59. package/behaviors/registry/service/atoms/std-service-github.orb +103 -83
  60. package/behaviors/registry/service/atoms/std-service-llm.orb +117 -112
  61. package/behaviors/registry/service/atoms/std-service-oauth.orb +131 -126
  62. package/behaviors/registry/service/atoms/std-service-redis.orb +123 -108
  63. package/behaviors/registry/service/atoms/std-service-storage.orb +125 -105
  64. package/behaviors/registry/service/atoms/std-service-stripe.orb +113 -103
  65. package/behaviors/registry/service/atoms/std-service-twilio.orb +102 -92
  66. package/behaviors/registry/service/atoms/std-service-youtube.orb +119 -114
  67. package/behaviors/registry/service/organisms/std-service-marketplace.orb +985 -873
  68. package/behaviors/registry/service/organisms/std-service-research-assistant.orb +1027 -972
  69. package/dist/behaviors/behaviors-registry.json +2913 -322
  70. package/dist/behaviors/registry/agent/atoms/std-agent-activity-log.orb +69 -69
  71. package/dist/behaviors/registry/agent/atoms/std-agent-chat-thread.orb +120 -120
  72. package/dist/behaviors/registry/agent/atoms/std-agent-classifier.orb +114 -114
  73. package/dist/behaviors/registry/agent/atoms/std-agent-completion.orb +124 -114
  74. package/dist/behaviors/registry/agent/atoms/std-agent-context-window.orb +410 -395
  75. package/dist/behaviors/registry/agent/atoms/std-agent-conversation.orb +93 -93
  76. package/dist/behaviors/registry/agent/atoms/std-agent-memory.orb +67 -117
  77. package/dist/behaviors/registry/agent/atoms/std-agent-provider.orb +149 -134
  78. package/dist/behaviors/registry/agent/atoms/std-agent-search.orb +64 -64
  79. package/dist/behaviors/registry/agent/atoms/std-agent-session.orb +106 -106
  80. package/dist/behaviors/registry/agent/atoms/std-agent-step-progress.orb +194 -189
  81. package/dist/behaviors/registry/agent/atoms/std-agent-token-gauge.orb +360 -355
  82. package/dist/behaviors/registry/agent/atoms/std-agent-tool-call.orb +69 -69
  83. package/dist/behaviors/registry/agent/molecules/std-agent-fix-loop.orb +204 -199
  84. package/dist/behaviors/registry/agent/molecules/std-agent-learner.orb +174 -174
  85. package/dist/behaviors/registry/agent/molecules/std-agent-planner.orb +125 -125
  86. package/dist/behaviors/registry/agent/molecules/std-agent-rag.orb +127 -109
  87. package/dist/behaviors/registry/agent/molecules/std-agent-tool-loop.orb +190 -185
  88. package/dist/behaviors/registry/agent/organisms/std-agent-assistant.orb +1209 -1155
  89. package/dist/behaviors/registry/agent/organisms/std-agent-builder.orb +3021 -3001
  90. package/dist/behaviors/registry/agent/organisms/std-agent-pipeline.orb +2184 -2249
  91. package/dist/behaviors/registry/agent/organisms/std-agent-reviewer.orb +1029 -1050
  92. package/dist/behaviors/registry/agent/organisms/std-agent-tutor.orb +842 -804
  93. package/dist/behaviors/registry/app/organisms/std-cms.orb +547 -547
  94. package/dist/behaviors/registry/core/atoms/std-browse.orb +36 -36
  95. package/dist/behaviors/registry/core/atoms/std-cache-aside.orb +111 -111
  96. package/dist/behaviors/registry/core/atoms/std-calendar.orb +56 -51
  97. package/dist/behaviors/registry/core/atoms/std-circuit-breaker.orb +202 -187
  98. package/dist/behaviors/registry/core/atoms/std-confirmation.orb +24 -27
  99. package/dist/behaviors/registry/core/atoms/std-display.orb +2 -2
  100. package/dist/behaviors/registry/core/atoms/std-drawer.orb +58 -58
  101. package/dist/behaviors/registry/core/atoms/std-filter.orb +6 -9
  102. package/dist/behaviors/registry/core/atoms/std-gallery.orb +46 -46
  103. package/dist/behaviors/registry/core/atoms/std-graphs.orb +24 -24
  104. package/dist/behaviors/registry/core/atoms/std-modal.orb +19 -19
  105. package/dist/behaviors/registry/core/atoms/std-pagination.orb +14 -14
  106. package/dist/behaviors/registry/core/atoms/std-push.orb +48 -90
  107. package/dist/behaviors/registry/core/atoms/std-rate-limiter.orb +205 -190
  108. package/dist/behaviors/registry/core/atoms/std-related.orb +31 -31
  109. package/dist/behaviors/registry/core/atoms/std-search.orb +3 -3
  110. package/dist/behaviors/registry/core/atoms/std-selection.orb +102 -102
  111. package/dist/behaviors/registry/core/atoms/std-stats.orb +64 -64
  112. package/dist/behaviors/registry/core/atoms/std-tabs.orb +18 -18
  113. package/dist/behaviors/registry/core/molecules/std-cart.orb +64 -64
  114. package/dist/behaviors/registry/core/molecules/std-dashboard.orb +46 -46
  115. package/dist/behaviors/registry/core/molecules/std-filtered-list.orb +21 -21
  116. package/dist/behaviors/registry/core/molecules/std-form-advanced.orb +172 -127
  117. package/dist/behaviors/registry/core/molecules/std-list.orb +63 -63
  118. package/dist/behaviors/registry/core/molecules/std-wizard-form.orb +145 -130
  119. package/dist/behaviors/registry/game/atoms/std-dialogue-box.orb +25 -25
  120. package/dist/behaviors/registry/game/atoms/std-game-canvas2d.orb +42 -42
  121. package/dist/behaviors/registry/game/atoms/std-overworld.orb +57 -57
  122. package/dist/behaviors/registry/game/atoms/std-physics2d.orb +74 -74
  123. package/dist/behaviors/registry/game/atoms/std-quest.orb +137 -137
  124. package/dist/behaviors/registry/game/atoms/std-timer.orb +291 -291
  125. package/dist/behaviors/registry/probes/molecules/std-source-scope-probe.orb +31 -31
  126. package/dist/behaviors/registry/service/atoms/std-service-custom-bearer.orb +93 -78
  127. package/dist/behaviors/registry/service/atoms/std-service-email.orb +91 -76
  128. package/dist/behaviors/registry/service/atoms/std-service-github.orb +103 -83
  129. package/dist/behaviors/registry/service/atoms/std-service-llm.orb +117 -112
  130. package/dist/behaviors/registry/service/atoms/std-service-oauth.orb +131 -126
  131. package/dist/behaviors/registry/service/atoms/std-service-redis.orb +123 -108
  132. package/dist/behaviors/registry/service/atoms/std-service-storage.orb +125 -105
  133. package/dist/behaviors/registry/service/atoms/std-service-stripe.orb +113 -103
  134. package/dist/behaviors/registry/service/atoms/std-service-twilio.orb +102 -92
  135. package/dist/behaviors/registry/service/atoms/std-service-youtube.orb +119 -114
  136. package/dist/behaviors/registry/service/organisms/std-service-marketplace.orb +985 -873
  137. package/dist/behaviors/registry/service/organisms/std-service-research-assistant.orb +1027 -972
  138. package/dist/behaviors-registry.json +2913 -322
  139. package/dist/index.d.ts +2 -2
  140. package/dist/index.js +26 -13
  141. package/dist/index.js.map +1 -1
  142. package/dist/modules/agent.d.ts +1 -1
  143. package/dist/modules/array.d.ts +1 -1
  144. package/dist/modules/array.js +16 -8
  145. package/dist/modules/array.js.map +1 -1
  146. package/dist/modules/async.d.ts +1 -1
  147. package/dist/modules/composition.d.ts +1 -1
  148. package/dist/modules/contract.d.ts +1 -1
  149. package/dist/modules/core.d.ts +1 -1
  150. package/dist/modules/core.js +6 -3
  151. package/dist/modules/core.js.map +1 -1
  152. package/dist/modules/data.d.ts +1 -1
  153. package/dist/modules/format.d.ts +1 -1
  154. package/dist/modules/graph.d.ts +1 -1
  155. package/dist/modules/index.d.ts +1 -1
  156. package/dist/modules/index.js +26 -13
  157. package/dist/modules/index.js.map +1 -1
  158. package/dist/modules/math.d.ts +1 -1
  159. package/dist/modules/nn.d.ts +1 -1
  160. package/dist/modules/object.d.ts +1 -1
  161. package/dist/modules/object.js +4 -2
  162. package/dist/modules/object.js.map +1 -1
  163. package/dist/modules/os.d.ts +1 -1
  164. package/dist/modules/prob.d.ts +1 -1
  165. package/dist/modules/str.d.ts +1 -1
  166. package/dist/modules/tensor.d.ts +1 -1
  167. package/dist/modules/time.d.ts +1 -1
  168. package/dist/modules/train.d.ts +1 -1
  169. package/dist/modules/validate.d.ts +1 -1
  170. package/dist/registry.d.ts +1 -1
  171. package/dist/registry.js +26 -13
  172. package/dist/registry.js.map +1 -1
  173. package/dist/{types-D7dG8fBF.d.ts → types-CdSN5hnD.d.ts} +43 -0
  174. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { a as StdModule, S as StdOperatorMeta } from './types-D7dG8fBF.js';
2
- export { B as BasicReturnType, b as OPERATOR_CATEGORIES, c as OperatorCategory, d as OperatorEffectMeta, O as OperatorMeta, e as OperatorTypeRef, f as STD_MODULES, g as STD_OPERATOR_CATEGORIES, h as StdOperatorCategory, i as getFunctionFromOperator, j as getModuleFromOperator, k as isStdCategory, l as isStdOperator, m as makeStdOperator } from './types-D7dG8fBF.js';
1
+ import { a as StdModule, S as StdOperatorMeta } from './types-CdSN5hnD.js';
2
+ export { B as BasicReturnType, b as OPERATOR_CATEGORIES, c as OperatorCategory, d as OperatorEffectMeta, O as OperatorMeta, e as OperatorTypeRef, f as STD_MODULES, g as STD_OPERATOR_CATEGORIES, h as StdOperatorCategory, i as getFunctionFromOperator, j as getModuleFromOperator, k as isStdCategory, l as isStdOperator, m as makeStdOperator } from './types-CdSN5hnD.js';
3
3
  export { STD_OPERATORS as OPERATORS, OPERATOR_NAMES, STD_OPERATORS, STD_OPERATORS_BY_MODULE, getAllStdOperators as getAllOperatorNames, getAllStdOperators, getLambdaOperators, getModuleOperators, getOperatorMetaExtended, getStdEffectOperators, getStdLibStats, getStdOperatorMeta, getStdOperatorsByModule, getStdPureOperators, isEffectOperatorExtended, isKnownStdOperator as isKnownOperator, isKnownOperatorExtended, isKnownStdOperator, isStdEffectOperator, isStdGuardOperator, validateStdOperatorArity as validateOperatorArity, validateOperatorArityExtended, validateStdOperatorArity } from './registry.js';
4
4
  export { CORE_OPERATORS, getCoreOperators } from './modules/core.js';
5
5
  export { MATH_OPERATORS } from './modules/math.js';
package/dist/index.js CHANGED
@@ -299,9 +299,10 @@ var CORE_OPERATORS = {
299
299
  category: "logic",
300
300
  minArity: 2,
301
301
  maxArity: null,
302
- description: "Logical AND",
302
+ description: "Logical AND (returns the last truthy value, NOT a boolean \u2014 short-circuit)",
303
303
  hasSideEffects: false,
304
304
  returnType: "boolean",
305
+ returnSemantics: "last-truthy-of-args",
305
306
  params: [{ name: "...conds", type: BOOLEAN, description: "Boolean expressions to AND" }],
306
307
  example: '["and", ["=", "@entity.active", true], [">", "@entity.score", 0]]'
307
308
  },
@@ -310,9 +311,10 @@ var CORE_OPERATORS = {
310
311
  category: "logic",
311
312
  minArity: 2,
312
313
  maxArity: null,
313
- description: "Logical OR",
314
+ description: "Logical OR (returns the first truthy value, NOT a boolean \u2014 short-circuit)",
314
315
  hasSideEffects: false,
315
316
  returnType: "boolean",
317
+ returnSemantics: "first-truthy-of-args",
316
318
  params: [{ name: "...conds", type: BOOLEAN, description: "Boolean expressions to OR" }],
317
319
  example: '["or", ["=", "@entity.role", "admin"], ["=", "@entity.role", "owner"]]'
318
320
  },
@@ -332,9 +334,10 @@ var CORE_OPERATORS = {
332
334
  category: "logic",
333
335
  minArity: 3,
334
336
  maxArity: 3,
335
- description: "Conditional expression (ternary)",
337
+ description: "Conditional expression (ternary). Return type is union of branch types.",
336
338
  hasSideEffects: false,
337
339
  returnType: "any",
340
+ returnSemantics: "branch-union",
338
341
  params: [
339
342
  { name: "cond", type: BOOLEAN, description: "Condition to evaluate" },
340
343
  { name: "then", type: ANY, description: "Value or effect if true" },
@@ -1311,9 +1314,10 @@ var ARRAY_OPERATORS = {
1311
1314
  category: "std-array",
1312
1315
  minArity: 1,
1313
1316
  maxArity: 1,
1314
- description: "Get first element",
1317
+ description: "Get first element (element type of input array, may be undefined when empty)",
1315
1318
  hasSideEffects: false,
1316
1319
  returnType: "any",
1320
+ returnSemantics: "element-of-arg<0>?",
1317
1321
  params: [{ name: "arr", type: "array", description: "The array" }],
1318
1322
  example: '["array/first", [1, 2, 3]] // => 1'
1319
1323
  },
@@ -1322,9 +1326,10 @@ var ARRAY_OPERATORS = {
1322
1326
  category: "std-array",
1323
1327
  minArity: 1,
1324
1328
  maxArity: 1,
1325
- description: "Get last element",
1329
+ description: "Get last element (element type of input array, may be undefined when empty)",
1326
1330
  hasSideEffects: false,
1327
1331
  returnType: "any",
1332
+ returnSemantics: "element-of-arg<0>?",
1328
1333
  params: [{ name: "arr", type: "array", description: "The array" }],
1329
1334
  example: '["array/last", [1, 2, 3]] // => 3'
1330
1335
  },
@@ -1333,9 +1338,10 @@ var ARRAY_OPERATORS = {
1333
1338
  category: "std-array",
1334
1339
  minArity: 2,
1335
1340
  maxArity: 2,
1336
- description: "Get element at index",
1341
+ description: "Get element at index (element type of input array, may be undefined out-of-bounds)",
1337
1342
  hasSideEffects: false,
1338
1343
  returnType: "any",
1344
+ returnSemantics: "element-of-arg<0>?",
1339
1345
  params: [
1340
1346
  { name: "arr", type: "array", description: "The array" },
1341
1347
  { name: "index", type: "number", description: "Index (0-based)" }
@@ -1545,9 +1551,10 @@ var ARRAY_OPERATORS = {
1545
1551
  category: "std-array",
1546
1552
  minArity: 2,
1547
1553
  maxArity: 2,
1548
- description: "Find first element matching predicate",
1554
+ description: "Find first element matching predicate (element type of input array, undefined when no match)",
1549
1555
  hasSideEffects: false,
1550
1556
  returnType: "any",
1557
+ returnSemantics: "element-of-arg<0>?",
1551
1558
  acceptsLambda: true,
1552
1559
  lambdaArgPosition: 1,
1553
1560
  params: [
@@ -1577,9 +1584,10 @@ var ARRAY_OPERATORS = {
1577
1584
  category: "std-array",
1578
1585
  minArity: 2,
1579
1586
  maxArity: 2,
1580
- description: "Keep elements matching predicate",
1587
+ description: "Keep elements matching predicate (returns same array element type as input)",
1581
1588
  hasSideEffects: false,
1582
1589
  returnType: "array",
1590
+ returnSemantics: "identity-of-arg<0>",
1583
1591
  acceptsLambda: true,
1584
1592
  lambdaArgPosition: 1,
1585
1593
  params: [
@@ -1593,9 +1601,10 @@ var ARRAY_OPERATORS = {
1593
1601
  category: "std-array",
1594
1602
  minArity: 2,
1595
1603
  maxArity: 2,
1596
- description: "Remove elements matching predicate",
1604
+ description: "Remove elements matching predicate (returns same array element type as input)",
1597
1605
  hasSideEffects: false,
1598
1606
  returnType: "array",
1607
+ returnSemantics: "identity-of-arg<0>",
1599
1608
  acceptsLambda: true,
1600
1609
  lambdaArgPosition: 1,
1601
1610
  params: [
@@ -1609,9 +1618,10 @@ var ARRAY_OPERATORS = {
1609
1618
  category: "std-array",
1610
1619
  minArity: 2,
1611
1620
  maxArity: 2,
1612
- description: "Transform each element",
1621
+ description: "Transform each element (return type wraps the lambda result in an array)",
1613
1622
  hasSideEffects: false,
1614
1623
  returnType: "array",
1624
+ returnSemantics: "lambda-result",
1615
1625
  acceptsLambda: true,
1616
1626
  lambdaArgPosition: 1,
1617
1627
  params: [
@@ -1625,9 +1635,10 @@ var ARRAY_OPERATORS = {
1625
1635
  category: "std-array",
1626
1636
  minArity: 3,
1627
1637
  maxArity: 3,
1628
- description: "Reduce array to single value",
1638
+ description: "Reduce array to single value (return type matches the lambda result / init type)",
1629
1639
  hasSideEffects: false,
1630
1640
  returnType: "any",
1641
+ returnSemantics: "lambda-result",
1631
1642
  acceptsLambda: true,
1632
1643
  lambdaArgPosition: 1,
1633
1644
  params: [
@@ -1880,9 +1891,10 @@ var OBJECT_OPERATORS = {
1880
1891
  category: "std-object",
1881
1892
  minArity: 2,
1882
1893
  maxArity: 3,
1883
- description: "Get nested value by path",
1894
+ description: "Get nested value by path (return type derived from input object shape and key)",
1884
1895
  hasSideEffects: false,
1885
1896
  returnType: "any",
1897
+ returnSemantics: "object-key-lookup",
1886
1898
  params: [
1887
1899
  { name: "obj", type: "object", description: "The object" },
1888
1900
  { name: "path", type: "string", description: 'Dot-separated path (e.g., "user.name")' },
@@ -1946,9 +1958,10 @@ var OBJECT_OPERATORS = {
1946
1958
  category: "std-object",
1947
1959
  minArity: 2,
1948
1960
  maxArity: 2,
1949
- description: "Select only specified keys",
1961
+ description: "Select only specified keys (return type is subset of input object shape)",
1950
1962
  hasSideEffects: false,
1951
1963
  returnType: "any",
1964
+ returnSemantics: "object-key-lookup",
1952
1965
  params: [
1953
1966
  { name: "obj", type: "object", description: "The object" },
1954
1967
  { name: "keys", type: "array", description: "Keys to keep" }