@almadar/std 1.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 (78) hide show
  1. package/LICENSE +72 -0
  2. package/dist/behaviors/action-affinity.d.ts +88 -0
  3. package/dist/behaviors/action-affinity.js +290 -0
  4. package/dist/behaviors/action-affinity.js.map +1 -0
  5. package/dist/behaviors/async.d.ts +20 -0
  6. package/dist/behaviors/async.js +542 -0
  7. package/dist/behaviors/async.js.map +1 -0
  8. package/dist/behaviors/data-management.d.ts +40 -0
  9. package/dist/behaviors/data-management.js +495 -0
  10. package/dist/behaviors/data-management.js.map +1 -0
  11. package/dist/behaviors/feedback.d.ts +18 -0
  12. package/dist/behaviors/feedback.js +307 -0
  13. package/dist/behaviors/feedback.js.map +1 -0
  14. package/dist/behaviors/game-core.d.ts +40 -0
  15. package/dist/behaviors/game-core.js +443 -0
  16. package/dist/behaviors/game-core.js.map +1 -0
  17. package/dist/behaviors/game-entity.d.ts +39 -0
  18. package/dist/behaviors/game-entity.js +643 -0
  19. package/dist/behaviors/game-entity.js.map +1 -0
  20. package/dist/behaviors/game-ui.d.ts +29 -0
  21. package/dist/behaviors/game-ui.js +493 -0
  22. package/dist/behaviors/game-ui.js.map +1 -0
  23. package/dist/behaviors/index.d.ts +11 -0
  24. package/dist/behaviors/index.js +4539 -0
  25. package/dist/behaviors/index.js.map +1 -0
  26. package/dist/behaviors/registry.d.ts +103 -0
  27. package/dist/behaviors/registry.js +4166 -0
  28. package/dist/behaviors/registry.js.map +1 -0
  29. package/dist/behaviors/types.d.ts +179 -0
  30. package/dist/behaviors/types.js +111 -0
  31. package/dist/behaviors/types.js.map +1 -0
  32. package/dist/behaviors/ui-interaction.d.ts +36 -0
  33. package/dist/behaviors/ui-interaction.js +1104 -0
  34. package/dist/behaviors/ui-interaction.js.map +1 -0
  35. package/dist/index.d.ts +195 -0
  36. package/dist/index.js +8209 -0
  37. package/dist/index.js.map +1 -0
  38. package/dist/modules/array.d.ts +28 -0
  39. package/dist/modules/array.js +556 -0
  40. package/dist/modules/array.js.map +1 -0
  41. package/dist/modules/async.d.ts +22 -0
  42. package/dist/modules/async.js +112 -0
  43. package/dist/modules/async.js.map +1 -0
  44. package/dist/modules/format.d.ts +21 -0
  45. package/dist/modules/format.js +129 -0
  46. package/dist/modules/format.js.map +1 -0
  47. package/dist/modules/index.d.ts +12 -0
  48. package/dist/modules/index.js +3131 -0
  49. package/dist/modules/index.js.map +1 -0
  50. package/dist/modules/math.d.ts +22 -0
  51. package/dist/modules/math.js +215 -0
  52. package/dist/modules/math.js.map +1 -0
  53. package/dist/modules/nn.d.ts +23 -0
  54. package/dist/modules/nn.js +189 -0
  55. package/dist/modules/nn.js.map +1 -0
  56. package/dist/modules/object.d.ts +22 -0
  57. package/dist/modules/object.js +257 -0
  58. package/dist/modules/object.js.map +1 -0
  59. package/dist/modules/str.d.ts +21 -0
  60. package/dist/modules/str.js +344 -0
  61. package/dist/modules/str.js.map +1 -0
  62. package/dist/modules/tensor.d.ts +23 -0
  63. package/dist/modules/tensor.js +427 -0
  64. package/dist/modules/tensor.js.map +1 -0
  65. package/dist/modules/time.d.ts +24 -0
  66. package/dist/modules/time.js +323 -0
  67. package/dist/modules/time.js.map +1 -0
  68. package/dist/modules/train.d.ts +23 -0
  69. package/dist/modules/train.js +308 -0
  70. package/dist/modules/train.js.map +1 -0
  71. package/dist/modules/validate.d.ts +23 -0
  72. package/dist/modules/validate.js +301 -0
  73. package/dist/modules/validate.js.map +1 -0
  74. package/dist/registry.d.ts +140 -0
  75. package/dist/registry.js +3240 -0
  76. package/dist/registry.js.map +1 -0
  77. package/dist/types-I95R8_FN.d.ts +91 -0
  78. package/package.json +59 -0
@@ -0,0 +1,308 @@
1
+ // modules/train.ts
2
+ var TRAIN_OPERATORS = {
3
+ // ============================================================================
4
+ // Training Loop
5
+ // ============================================================================
6
+ "train/loop": {
7
+ module: "train",
8
+ category: "std-train",
9
+ minArity: 3,
10
+ maxArity: 3,
11
+ description: "Execute training loop with constraints",
12
+ hasSideEffects: true,
13
+ returnType: "train/result",
14
+ params: [
15
+ { name: "module", type: "nn/module", description: "The neural network to train" },
16
+ { name: "data", type: "array", description: "Training data (array of {input, target} or experiences)" },
17
+ { name: "config", type: "train/config", description: "Training configuration with constraints" }
18
+ ],
19
+ example: '["train/loop", "@entity.architecture", "@entity.buffer", "@entity.trainingConfig"]'
20
+ },
21
+ "train/step": {
22
+ module: "train",
23
+ category: "std-train",
24
+ minArity: 4,
25
+ maxArity: 4,
26
+ description: "Execute single training step (forward, loss, backward, update)",
27
+ hasSideEffects: true,
28
+ returnType: "train/stepResult",
29
+ params: [
30
+ { name: "module", type: "nn/module", description: "The neural network" },
31
+ { name: "input", type: "tensor", description: "Input tensor" },
32
+ { name: "target", type: "tensor", description: "Target tensor" },
33
+ { name: "config", type: "train/config", description: "Training configuration" }
34
+ ],
35
+ example: '["train/step", "@entity.architecture", "@batch.input", "@batch.target", "@entity.config"]'
36
+ },
37
+ // ============================================================================
38
+ // Validation
39
+ // ============================================================================
40
+ "train/validate": {
41
+ module: "train",
42
+ category: "std-train",
43
+ minArity: 2,
44
+ maxArity: 2,
45
+ description: "Validate model on test cases, returns pass/fail metrics",
46
+ hasSideEffects: false,
47
+ returnType: "train/validationResult",
48
+ params: [
49
+ { name: "module", type: "nn/module", description: "The neural network" },
50
+ { name: "testCases", type: "array", description: "Array of {input, expected, tolerance?}" }
51
+ ],
52
+ example: '["train/validate", "@entity.architecture", "@entity.validationSet"]'
53
+ },
54
+ "train/checkRegression": {
55
+ module: "train",
56
+ category: "std-train",
57
+ minArity: 3,
58
+ maxArity: 3,
59
+ description: "Check if new model regresses on required invariants",
60
+ hasSideEffects: false,
61
+ returnType: "train/regressionResult",
62
+ params: [
63
+ { name: "newModule", type: "nn/module", description: "Newly trained network" },
64
+ { name: "oldModule", type: "nn/module", description: "Previous network" },
65
+ { name: "invariants", type: "array", description: "Test cases that must not regress" }
66
+ ],
67
+ example: '["train/checkRegression", "@payload.newWeights", "@entity.architecture", "@entity.requiredInvariants"]'
68
+ },
69
+ // ============================================================================
70
+ // Constraint Checking
71
+ // ============================================================================
72
+ "train/checkConstraints": {
73
+ module: "train",
74
+ category: "std-train",
75
+ minArity: 2,
76
+ maxArity: 2,
77
+ description: "Check if network weights satisfy all constraints",
78
+ hasSideEffects: false,
79
+ returnType: "train/constraintResult",
80
+ params: [
81
+ { name: "module", type: "nn/module", description: "The neural network" },
82
+ { name: "constraints", type: "train/constraints", description: "Constraint specification" }
83
+ ],
84
+ example: '["train/checkConstraints", "@payload.newWeights", "@entity.constraints"]'
85
+ },
86
+ "train/checkWeightMagnitude": {
87
+ module: "train",
88
+ category: "std-train",
89
+ minArity: 2,
90
+ maxArity: 2,
91
+ description: "Check if all weights are within magnitude limit",
92
+ hasSideEffects: false,
93
+ returnType: "boolean",
94
+ params: [
95
+ { name: "module", type: "nn/module", description: "The neural network" },
96
+ { name: "maxMagnitude", type: "number", description: "Maximum allowed weight magnitude" }
97
+ ],
98
+ example: '["train/checkWeightMagnitude", "@entity.architecture", 10.0]'
99
+ },
100
+ "train/checkForbiddenOutputs": {
101
+ module: "train",
102
+ category: "std-train",
103
+ minArity: 3,
104
+ maxArity: 3,
105
+ description: "Check if model produces outputs in forbidden regions",
106
+ hasSideEffects: false,
107
+ returnType: "train/forbiddenResult",
108
+ params: [
109
+ { name: "module", type: "nn/module", description: "The neural network" },
110
+ { name: "testInputs", type: "array", description: "Inputs to test" },
111
+ { name: "forbiddenRegions", type: "array", description: "Forbidden output regions" }
112
+ ],
113
+ example: '["train/checkForbiddenOutputs", "@entity.architecture", "@entity.testInputs", "@entity.forbiddenOutputRegions"]'
114
+ },
115
+ // ============================================================================
116
+ // Gradient Operations
117
+ // ============================================================================
118
+ "train/clipGradients": {
119
+ module: "train",
120
+ category: "std-train",
121
+ minArity: 2,
122
+ maxArity: 2,
123
+ description: "Clip gradients to max norm (modifies in place)",
124
+ hasSideEffects: true,
125
+ returnType: "number",
126
+ params: [
127
+ { name: "module", type: "nn/module", description: "The neural network" },
128
+ { name: "maxNorm", type: "number", description: "Maximum gradient norm" }
129
+ ],
130
+ example: '["train/clipGradients", "@entity.architecture", 1.0]'
131
+ },
132
+ "train/getGradientNorm": {
133
+ module: "train",
134
+ category: "std-train",
135
+ minArity: 1,
136
+ maxArity: 1,
137
+ description: "Get current gradient norm",
138
+ hasSideEffects: false,
139
+ returnType: "number",
140
+ params: [
141
+ { name: "module", type: "nn/module", description: "The neural network" }
142
+ ],
143
+ example: '["train/getGradientNorm", "@entity.architecture"]'
144
+ },
145
+ // ============================================================================
146
+ // Weight Operations
147
+ // ============================================================================
148
+ "train/clipWeights": {
149
+ module: "train",
150
+ category: "std-train",
151
+ minArity: 2,
152
+ maxArity: 2,
153
+ description: "Clip weights to max magnitude (modifies in place)",
154
+ hasSideEffects: true,
155
+ returnType: "void",
156
+ params: [
157
+ { name: "module", type: "nn/module", description: "The neural network" },
158
+ { name: "maxMagnitude", type: "number", description: "Maximum weight magnitude" }
159
+ ],
160
+ example: '["train/clipWeights", "@entity.architecture", 10.0]'
161
+ },
162
+ "train/getMaxWeightMagnitude": {
163
+ module: "train",
164
+ category: "std-train",
165
+ minArity: 1,
166
+ maxArity: 1,
167
+ description: "Get maximum weight magnitude in network",
168
+ hasSideEffects: false,
169
+ returnType: "number",
170
+ params: [
171
+ { name: "module", type: "nn/module", description: "The neural network" }
172
+ ],
173
+ example: '["train/getMaxWeightMagnitude", "@entity.architecture"]'
174
+ },
175
+ // ============================================================================
176
+ // Loss Functions
177
+ // ============================================================================
178
+ "train/mse": {
179
+ module: "train",
180
+ category: "std-train",
181
+ minArity: 2,
182
+ maxArity: 2,
183
+ description: "Mean squared error loss",
184
+ hasSideEffects: false,
185
+ returnType: "number",
186
+ params: [
187
+ { name: "predicted", type: "tensor", description: "Predicted values" },
188
+ { name: "target", type: "tensor", description: "Target values" }
189
+ ],
190
+ example: '["train/mse", "@entity.output", "@batch.target"]'
191
+ },
192
+ "train/crossEntropy": {
193
+ module: "train",
194
+ category: "std-train",
195
+ minArity: 2,
196
+ maxArity: 2,
197
+ description: "Cross-entropy loss for classification",
198
+ hasSideEffects: false,
199
+ returnType: "number",
200
+ params: [
201
+ { name: "logits", type: "tensor", description: "Raw model outputs (logits)" },
202
+ { name: "labels", type: "tensor", description: "Target class labels" }
203
+ ],
204
+ example: '["train/crossEntropy", "@entity.logits", "@batch.labels"]'
205
+ },
206
+ "train/huber": {
207
+ module: "train",
208
+ category: "std-train",
209
+ minArity: 2,
210
+ maxArity: 3,
211
+ description: "Huber loss (smooth L1, robust to outliers)",
212
+ hasSideEffects: false,
213
+ returnType: "number",
214
+ params: [
215
+ { name: "predicted", type: "tensor", description: "Predicted values" },
216
+ { name: "target", type: "tensor", description: "Target values" },
217
+ { name: "delta", type: "number", description: "Threshold for quadratic vs linear", optional: true, defaultValue: 1 }
218
+ ],
219
+ example: '["train/huber", "@entity.qValues", "@batch.targets", 1.0]'
220
+ },
221
+ // ============================================================================
222
+ // Optimizers
223
+ // ============================================================================
224
+ "train/sgd": {
225
+ module: "train",
226
+ category: "std-train",
227
+ minArity: 2,
228
+ maxArity: 3,
229
+ description: "Stochastic gradient descent optimizer step",
230
+ hasSideEffects: true,
231
+ returnType: "void",
232
+ params: [
233
+ { name: "module", type: "nn/module", description: "The neural network" },
234
+ { name: "lr", type: "number", description: "Learning rate" },
235
+ { name: "momentum", type: "number", description: "Momentum factor", optional: true, defaultValue: 0 }
236
+ ],
237
+ example: '["train/sgd", "@entity.architecture", 0.01, 0.9]'
238
+ },
239
+ "train/adam": {
240
+ module: "train",
241
+ category: "std-train",
242
+ minArity: 2,
243
+ maxArity: 4,
244
+ description: "Adam optimizer step",
245
+ hasSideEffects: true,
246
+ returnType: "void",
247
+ params: [
248
+ { name: "module", type: "nn/module", description: "The neural network" },
249
+ { name: "lr", type: "number", description: "Learning rate" },
250
+ { name: "beta1", type: "number", description: "First moment decay", optional: true, defaultValue: 0.9 },
251
+ { name: "beta2", type: "number", description: "Second moment decay", optional: true, defaultValue: 0.999 }
252
+ ],
253
+ example: '["train/adam", "@entity.architecture", 0.001]'
254
+ },
255
+ // ============================================================================
256
+ // Experience Replay (for RL)
257
+ // ============================================================================
258
+ "train/sampleBatch": {
259
+ module: "train",
260
+ category: "std-train",
261
+ minArity: 2,
262
+ maxArity: 2,
263
+ description: "Sample random batch from experience buffer",
264
+ hasSideEffects: false,
265
+ returnType: "array",
266
+ params: [
267
+ { name: "buffer", type: "array", description: "Experience buffer" },
268
+ { name: "batchSize", type: "number", description: "Number of samples" }
269
+ ],
270
+ example: '["train/sampleBatch", "@entity.experienceBuffer", 32]'
271
+ },
272
+ "train/computeReturns": {
273
+ module: "train",
274
+ category: "std-train",
275
+ minArity: 2,
276
+ maxArity: 2,
277
+ description: "Compute discounted returns from rewards",
278
+ hasSideEffects: false,
279
+ returnType: "tensor",
280
+ params: [
281
+ { name: "rewards", type: "array", description: "Array of rewards" },
282
+ { name: "gamma", type: "number", description: "Discount factor" }
283
+ ],
284
+ example: '["train/computeReturns", "@episode.rewards", 0.99]'
285
+ },
286
+ "train/computeAdvantages": {
287
+ module: "train",
288
+ category: "std-train",
289
+ minArity: 3,
290
+ maxArity: 3,
291
+ description: "Compute GAE advantages for policy gradient",
292
+ hasSideEffects: false,
293
+ returnType: "tensor",
294
+ params: [
295
+ { name: "rewards", type: "array", description: "Array of rewards" },
296
+ { name: "values", type: "tensor", description: "Value estimates" },
297
+ { name: "config", type: "object", description: "Config with gamma, lambda" }
298
+ ],
299
+ example: '["train/computeAdvantages", "@episode.rewards", "@episode.values", { "gamma": 0.99, "lambda": 0.95 }]'
300
+ }
301
+ };
302
+ function getTrainOperators() {
303
+ return Object.keys(TRAIN_OPERATORS);
304
+ }
305
+
306
+ export { TRAIN_OPERATORS, getTrainOperators };
307
+ //# sourceMappingURL=train.js.map
308
+ //# sourceMappingURL=train.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../modules/train.ts"],"names":[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,EAAM,QAAA,EAAU,aAAa,iBAAA,EAAkB;AAAA,MACjE,EAAE,IAAA,EAAM,QAAA,EAAU,IAAA,EAAM,QAAA,EAAU,aAAa,2BAAA;AAA4B,KAC7E;AAAA,IACA,OAAA,EAAS;AAAA;AAEb;AAKO,SAAS,iBAAA,GAA8B;AAC5C,EAAA,OAAO,MAAA,CAAO,KAAK,eAAe,CAAA;AACpC","file":"train.js","sourcesContent":["/**\n * Training Module - Neural Network Training Operations\n *\n * Provides operators for training neural networks with explicit constraints.\n * Training is bounded by readable rules: gradient clipping, weight constraints,\n * forbidden output regions, and validation gates.\n *\n * @packageDocumentation\n */\n\nimport type { StdOperatorMeta } from '../types.js';\n\n/**\n * Training module operators.\n * These operators handle training loops, validation, and constraint enforcement.\n */\nexport const TRAIN_OPERATORS: Record<string, StdOperatorMeta> = {\n // ============================================================================\n // Training Loop\n // ============================================================================\n\n 'train/loop': {\n module: 'train',\n category: 'std-train',\n minArity: 3,\n maxArity: 3,\n description: 'Execute training loop with constraints',\n hasSideEffects: true,\n returnType: 'train/result',\n params: [\n { name: 'module', type: 'nn/module', description: 'The neural network to train' },\n { name: 'data', type: 'array', description: 'Training data (array of {input, target} or experiences)' },\n { name: 'config', type: 'train/config', description: 'Training configuration with constraints' },\n ],\n example: '[\"train/loop\", \"@entity.architecture\", \"@entity.buffer\", \"@entity.trainingConfig\"]',\n },\n 'train/step': {\n module: 'train',\n category: 'std-train',\n minArity: 4,\n maxArity: 4,\n description: 'Execute single training step (forward, loss, backward, update)',\n hasSideEffects: true,\n returnType: 'train/stepResult',\n params: [\n { name: 'module', type: 'nn/module', description: 'The neural network' },\n { name: 'input', type: 'tensor', description: 'Input tensor' },\n { name: 'target', type: 'tensor', description: 'Target tensor' },\n { name: 'config', type: 'train/config', description: 'Training configuration' },\n ],\n example: '[\"train/step\", \"@entity.architecture\", \"@batch.input\", \"@batch.target\", \"@entity.config\"]',\n },\n\n // ============================================================================\n // Validation\n // ============================================================================\n\n 'train/validate': {\n module: 'train',\n category: 'std-train',\n minArity: 2,\n maxArity: 2,\n description: 'Validate model on test cases, returns pass/fail metrics',\n hasSideEffects: false,\n returnType: 'train/validationResult',\n params: [\n { name: 'module', type: 'nn/module', description: 'The neural network' },\n { name: 'testCases', type: 'array', description: 'Array of {input, expected, tolerance?}' },\n ],\n example: '[\"train/validate\", \"@entity.architecture\", \"@entity.validationSet\"]',\n },\n 'train/checkRegression': {\n module: 'train',\n category: 'std-train',\n minArity: 3,\n maxArity: 3,\n description: 'Check if new model regresses on required invariants',\n hasSideEffects: false,\n returnType: 'train/regressionResult',\n params: [\n { name: 'newModule', type: 'nn/module', description: 'Newly trained network' },\n { name: 'oldModule', type: 'nn/module', description: 'Previous network' },\n { name: 'invariants', type: 'array', description: 'Test cases that must not regress' },\n ],\n example: '[\"train/checkRegression\", \"@payload.newWeights\", \"@entity.architecture\", \"@entity.requiredInvariants\"]',\n },\n\n // ============================================================================\n // Constraint Checking\n // ============================================================================\n\n 'train/checkConstraints': {\n module: 'train',\n category: 'std-train',\n minArity: 2,\n maxArity: 2,\n description: 'Check if network weights satisfy all constraints',\n hasSideEffects: false,\n returnType: 'train/constraintResult',\n params: [\n { name: 'module', type: 'nn/module', description: 'The neural network' },\n { name: 'constraints', type: 'train/constraints', description: 'Constraint specification' },\n ],\n example: '[\"train/checkConstraints\", \"@payload.newWeights\", \"@entity.constraints\"]',\n },\n 'train/checkWeightMagnitude': {\n module: 'train',\n category: 'std-train',\n minArity: 2,\n maxArity: 2,\n description: 'Check if all weights are within magnitude limit',\n hasSideEffects: false,\n returnType: 'boolean',\n params: [\n { name: 'module', type: 'nn/module', description: 'The neural network' },\n { name: 'maxMagnitude', type: 'number', description: 'Maximum allowed weight magnitude' },\n ],\n example: '[\"train/checkWeightMagnitude\", \"@entity.architecture\", 10.0]',\n },\n 'train/checkForbiddenOutputs': {\n module: 'train',\n category: 'std-train',\n minArity: 3,\n maxArity: 3,\n description: 'Check if model produces outputs in forbidden regions',\n hasSideEffects: false,\n returnType: 'train/forbiddenResult',\n params: [\n { name: 'module', type: 'nn/module', description: 'The neural network' },\n { name: 'testInputs', type: 'array', description: 'Inputs to test' },\n { name: 'forbiddenRegions', type: 'array', description: 'Forbidden output regions' },\n ],\n example: '[\"train/checkForbiddenOutputs\", \"@entity.architecture\", \"@entity.testInputs\", \"@entity.forbiddenOutputRegions\"]',\n },\n\n // ============================================================================\n // Gradient Operations\n // ============================================================================\n\n 'train/clipGradients': {\n module: 'train',\n category: 'std-train',\n minArity: 2,\n maxArity: 2,\n description: 'Clip gradients to max norm (modifies in place)',\n hasSideEffects: true,\n returnType: 'number',\n params: [\n { name: 'module', type: 'nn/module', description: 'The neural network' },\n { name: 'maxNorm', type: 'number', description: 'Maximum gradient norm' },\n ],\n example: '[\"train/clipGradients\", \"@entity.architecture\", 1.0]',\n },\n 'train/getGradientNorm': {\n module: 'train',\n category: 'std-train',\n minArity: 1,\n maxArity: 1,\n description: 'Get current gradient norm',\n hasSideEffects: false,\n returnType: 'number',\n params: [\n { name: 'module', type: 'nn/module', description: 'The neural network' },\n ],\n example: '[\"train/getGradientNorm\", \"@entity.architecture\"]',\n },\n\n // ============================================================================\n // Weight Operations\n // ============================================================================\n\n 'train/clipWeights': {\n module: 'train',\n category: 'std-train',\n minArity: 2,\n maxArity: 2,\n description: 'Clip weights to max magnitude (modifies in place)',\n hasSideEffects: true,\n returnType: 'void',\n params: [\n { name: 'module', type: 'nn/module', description: 'The neural network' },\n { name: 'maxMagnitude', type: 'number', description: 'Maximum weight magnitude' },\n ],\n example: '[\"train/clipWeights\", \"@entity.architecture\", 10.0]',\n },\n 'train/getMaxWeightMagnitude': {\n module: 'train',\n category: 'std-train',\n minArity: 1,\n maxArity: 1,\n description: 'Get maximum weight magnitude in network',\n hasSideEffects: false,\n returnType: 'number',\n params: [\n { name: 'module', type: 'nn/module', description: 'The neural network' },\n ],\n example: '[\"train/getMaxWeightMagnitude\", \"@entity.architecture\"]',\n },\n\n // ============================================================================\n // Loss Functions\n // ============================================================================\n\n 'train/mse': {\n module: 'train',\n category: 'std-train',\n minArity: 2,\n maxArity: 2,\n description: 'Mean squared error loss',\n hasSideEffects: false,\n returnType: 'number',\n params: [\n { name: 'predicted', type: 'tensor', description: 'Predicted values' },\n { name: 'target', type: 'tensor', description: 'Target values' },\n ],\n example: '[\"train/mse\", \"@entity.output\", \"@batch.target\"]',\n },\n 'train/crossEntropy': {\n module: 'train',\n category: 'std-train',\n minArity: 2,\n maxArity: 2,\n description: 'Cross-entropy loss for classification',\n hasSideEffects: false,\n returnType: 'number',\n params: [\n { name: 'logits', type: 'tensor', description: 'Raw model outputs (logits)' },\n { name: 'labels', type: 'tensor', description: 'Target class labels' },\n ],\n example: '[\"train/crossEntropy\", \"@entity.logits\", \"@batch.labels\"]',\n },\n 'train/huber': {\n module: 'train',\n category: 'std-train',\n minArity: 2,\n maxArity: 3,\n description: 'Huber loss (smooth L1, robust to outliers)',\n hasSideEffects: false,\n returnType: 'number',\n params: [\n { name: 'predicted', type: 'tensor', description: 'Predicted values' },\n { name: 'target', type: 'tensor', description: 'Target values' },\n { name: 'delta', type: 'number', description: 'Threshold for quadratic vs linear', optional: true, defaultValue: 1.0 },\n ],\n example: '[\"train/huber\", \"@entity.qValues\", \"@batch.targets\", 1.0]',\n },\n\n // ============================================================================\n // Optimizers\n // ============================================================================\n\n 'train/sgd': {\n module: 'train',\n category: 'std-train',\n minArity: 2,\n maxArity: 3,\n description: 'Stochastic gradient descent optimizer step',\n hasSideEffects: true,\n returnType: 'void',\n params: [\n { name: 'module', type: 'nn/module', description: 'The neural network' },\n { name: 'lr', type: 'number', description: 'Learning rate' },\n { name: 'momentum', type: 'number', description: 'Momentum factor', optional: true, defaultValue: 0 },\n ],\n example: '[\"train/sgd\", \"@entity.architecture\", 0.01, 0.9]',\n },\n 'train/adam': {\n module: 'train',\n category: 'std-train',\n minArity: 2,\n maxArity: 4,\n description: 'Adam optimizer step',\n hasSideEffects: true,\n returnType: 'void',\n params: [\n { name: 'module', type: 'nn/module', description: 'The neural network' },\n { name: 'lr', type: 'number', description: 'Learning rate' },\n { name: 'beta1', type: 'number', description: 'First moment decay', optional: true, defaultValue: 0.9 },\n { name: 'beta2', type: 'number', description: 'Second moment decay', optional: true, defaultValue: 0.999 },\n ],\n example: '[\"train/adam\", \"@entity.architecture\", 0.001]',\n },\n\n // ============================================================================\n // Experience Replay (for RL)\n // ============================================================================\n\n 'train/sampleBatch': {\n module: 'train',\n category: 'std-train',\n minArity: 2,\n maxArity: 2,\n description: 'Sample random batch from experience buffer',\n hasSideEffects: false,\n returnType: 'array',\n params: [\n { name: 'buffer', type: 'array', description: 'Experience buffer' },\n { name: 'batchSize', type: 'number', description: 'Number of samples' },\n ],\n example: '[\"train/sampleBatch\", \"@entity.experienceBuffer\", 32]',\n },\n 'train/computeReturns': {\n module: 'train',\n category: 'std-train',\n minArity: 2,\n maxArity: 2,\n description: 'Compute discounted returns from rewards',\n hasSideEffects: false,\n returnType: 'tensor',\n params: [\n { name: 'rewards', type: 'array', description: 'Array of rewards' },\n { name: 'gamma', type: 'number', description: 'Discount factor' },\n ],\n example: '[\"train/computeReturns\", \"@episode.rewards\", 0.99]',\n },\n 'train/computeAdvantages': {\n module: 'train',\n category: 'std-train',\n minArity: 3,\n maxArity: 3,\n description: 'Compute GAE advantages for policy gradient',\n hasSideEffects: false,\n returnType: 'tensor',\n params: [\n { name: 'rewards', type: 'array', description: 'Array of rewards' },\n { name: 'values', type: 'tensor', description: 'Value estimates' },\n { name: 'config', type: 'object', description: 'Config with gamma, lambda' },\n ],\n example: '[\"train/computeAdvantages\", \"@episode.rewards\", \"@episode.values\", { \"gamma\": 0.99, \"lambda\": 0.95 }]',\n },\n};\n\n/**\n * Get all train operator names.\n */\nexport function getTrainOperators(): string[] {\n return Object.keys(TRAIN_OPERATORS);\n}\n"]}
@@ -0,0 +1,23 @@
1
+ import { a as StdOperatorMeta } from '../types-I95R8_FN.js';
2
+
3
+ /**
4
+ * Validate Module - Input Validation
5
+ *
6
+ * Provides validation functions for form inputs and data.
7
+ * Returns true/false for single validations.
8
+ * validate/check returns { valid: boolean, errors: [...] } for multiple rules.
9
+ *
10
+ * @packageDocumentation
11
+ */
12
+
13
+ /**
14
+ * Validate module operators.
15
+ * All operators return boolean or validation result objects and have no side effects.
16
+ */
17
+ declare const VALIDATE_OPERATORS: Record<string, StdOperatorMeta>;
18
+ /**
19
+ * Get all validate operator names.
20
+ */
21
+ declare function getValidateOperators(): string[];
22
+
23
+ export { VALIDATE_OPERATORS, getValidateOperators };