@almadar/std 3.2.3 → 3.3.4
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/LICENSE +72 -21
- package/README.md +1 -1
- package/behaviors/exports/atoms/std-combat-log.orb +12 -12
- package/behaviors/exports/atoms/std-dialogue-box.orb +11 -11
- package/behaviors/exports/atoms/std-game-audio.orb +9 -9
- package/behaviors/exports/atoms/std-game-canvas3d.orb +24 -24
- package/behaviors/exports/atoms/std-game-hud.orb +10 -10
- package/behaviors/exports/atoms/std-game-menu.orb +12 -12
- package/behaviors/exports/atoms/std-game-over-screen.orb +9 -9
- package/behaviors/exports/atoms/std-inventory-panel.orb +13 -13
- package/behaviors/exports/atoms/std-isometric-canvas.orb +9 -9
- package/behaviors/exports/atoms/std-platformer-canvas.orb +9 -9
- package/behaviors/exports/atoms/std-score-board.orb +9 -9
- package/behaviors/exports/atoms/std-selection.orb +32 -18
- package/behaviors/exports/atoms/std-service-custom-bearer.orb +557 -0
- package/behaviors/exports/atoms/std-service-custom-header.orb +559 -0
- package/behaviors/exports/atoms/std-service-custom-noauth.orb +553 -0
- package/behaviors/exports/atoms/std-service-custom-query.orb +559 -0
- package/behaviors/exports/atoms/std-service-email.orb +540 -0
- package/behaviors/exports/atoms/std-service-github.orb +586 -0
- package/behaviors/exports/atoms/std-service-llm.orb +671 -0
- package/behaviors/exports/atoms/std-service-oauth.orb +764 -0
- package/behaviors/exports/atoms/std-service-redis.orb +580 -0
- package/behaviors/exports/atoms/std-service-storage.orb +664 -0
- package/behaviors/exports/atoms/std-service-stripe.orb +639 -0
- package/behaviors/exports/atoms/std-service-twilio.orb +611 -0
- package/behaviors/exports/atoms/std-service-youtube.orb +696 -0
- package/behaviors/exports/atoms/std-simulation-canvas.orb +9 -9
- package/behaviors/exports/atoms/std-sprite.orb +17 -17
- package/behaviors/exports/atoms/std-validate-on-save.orb +623 -0
- package/behaviors/exports/molecules/std-quiz.orb +48 -24
- package/behaviors/exports/molecules/std-service-content-pipeline.orb +915 -0
- package/behaviors/exports/molecules/std-service-custom-api-tester.orb +860 -0
- package/behaviors/exports/molecules/std-service-devops-toolkit.orb +1526 -0
- package/behaviors/exports/molecules/std-service-notification-hub.orb +696 -0
- package/behaviors/exports/molecules/std-service-payment-flow.orb +873 -0
- package/behaviors/exports/organisms/std-service-marketplace.orb +5191 -0
- package/behaviors/exports/organisms/std-service-research-assistant.orb +3568 -0
- package/behaviors/exports/test-schemas/os-trigger-simulation.orb +202 -0
- package/behaviors/exports/validation-report.json +2 -2
- package/dist/behaviors/exports/atoms/std-combat-log.orb +12 -12
- package/dist/behaviors/exports/atoms/std-dialogue-box.orb +11 -11
- package/dist/behaviors/exports/atoms/std-game-audio.orb +9 -9
- package/dist/behaviors/exports/atoms/std-game-canvas3d.orb +24 -24
- package/dist/behaviors/exports/atoms/std-game-hud.orb +10 -10
- package/dist/behaviors/exports/atoms/std-game-menu.orb +12 -12
- package/dist/behaviors/exports/atoms/std-game-over-screen.orb +9 -9
- package/dist/behaviors/exports/atoms/std-inventory-panel.orb +13 -13
- package/dist/behaviors/exports/atoms/std-isometric-canvas.orb +9 -9
- package/dist/behaviors/exports/atoms/std-platformer-canvas.orb +9 -9
- package/dist/behaviors/exports/atoms/std-score-board.orb +9 -9
- package/dist/behaviors/exports/atoms/std-selection.orb +32 -18
- package/dist/behaviors/exports/atoms/std-service-custom-bearer.orb +557 -0
- package/dist/behaviors/exports/atoms/std-service-custom-header.orb +559 -0
- package/dist/behaviors/exports/atoms/std-service-custom-noauth.orb +553 -0
- package/dist/behaviors/exports/atoms/std-service-custom-query.orb +559 -0
- package/dist/behaviors/exports/atoms/std-service-email.orb +540 -0
- package/dist/behaviors/exports/atoms/std-service-github.orb +586 -0
- package/dist/behaviors/exports/atoms/std-service-llm.orb +671 -0
- package/dist/behaviors/exports/atoms/std-service-oauth.orb +764 -0
- package/dist/behaviors/exports/atoms/std-service-redis.orb +580 -0
- package/dist/behaviors/exports/atoms/std-service-storage.orb +664 -0
- package/dist/behaviors/exports/atoms/std-service-stripe.orb +639 -0
- package/dist/behaviors/exports/atoms/std-service-twilio.orb +611 -0
- package/dist/behaviors/exports/atoms/std-service-youtube.orb +696 -0
- package/dist/behaviors/exports/atoms/std-simulation-canvas.orb +9 -9
- package/dist/behaviors/exports/atoms/std-sprite.orb +17 -17
- package/dist/behaviors/exports/atoms/std-validate-on-save.orb +623 -0
- package/dist/behaviors/exports/molecules/std-quiz.orb +48 -24
- package/dist/behaviors/exports/molecules/std-service-content-pipeline.orb +915 -0
- package/dist/behaviors/exports/molecules/std-service-custom-api-tester.orb +860 -0
- package/dist/behaviors/exports/molecules/std-service-devops-toolkit.orb +1526 -0
- package/dist/behaviors/exports/molecules/std-service-notification-hub.orb +696 -0
- package/dist/behaviors/exports/molecules/std-service-payment-flow.orb +873 -0
- package/dist/behaviors/exports/organisms/std-service-marketplace.orb +5191 -0
- package/dist/behaviors/exports/organisms/std-service-research-assistant.orb +3568 -0
- package/dist/behaviors/exports/test-schemas/os-trigger-simulation.orb +202 -0
- package/dist/behaviors/exports/validation-report.json +2 -2
- package/dist/behaviors/functions/index.d.ts +662 -1
- package/dist/behaviors/functions/index.js +7638 -2117
- package/dist/behaviors/functions/index.js.map +1 -1
- package/dist/behaviors/index.d.ts +1 -1
- package/dist/behaviors/index.js +7638 -2117
- package/dist/behaviors/index.js.map +1 -1
- package/dist/exports/atoms/std-combat-log.orb +12 -12
- package/dist/exports/atoms/std-dialogue-box.orb +11 -11
- package/dist/exports/atoms/std-game-audio.orb +9 -9
- package/dist/exports/atoms/std-game-canvas3d.orb +24 -24
- package/dist/exports/atoms/std-game-hud.orb +10 -10
- package/dist/exports/atoms/std-game-menu.orb +12 -12
- package/dist/exports/atoms/std-game-over-screen.orb +9 -9
- package/dist/exports/atoms/std-inventory-panel.orb +13 -13
- package/dist/exports/atoms/std-isometric-canvas.orb +9 -9
- package/dist/exports/atoms/std-platformer-canvas.orb +9 -9
- package/dist/exports/atoms/std-score-board.orb +9 -9
- package/dist/exports/atoms/std-selection.orb +32 -18
- package/dist/exports/atoms/std-service-custom-bearer.orb +557 -0
- package/dist/exports/atoms/std-service-custom-header.orb +559 -0
- package/dist/exports/atoms/std-service-custom-noauth.orb +553 -0
- package/dist/exports/atoms/std-service-custom-query.orb +559 -0
- package/dist/exports/atoms/std-service-email.orb +540 -0
- package/dist/exports/atoms/std-service-github.orb +586 -0
- package/dist/exports/atoms/std-service-llm.orb +671 -0
- package/dist/exports/atoms/std-service-oauth.orb +764 -0
- package/dist/exports/atoms/std-service-redis.orb +580 -0
- package/dist/exports/atoms/std-service-storage.orb +664 -0
- package/dist/exports/atoms/std-service-stripe.orb +639 -0
- package/dist/exports/atoms/std-service-twilio.orb +611 -0
- package/dist/exports/atoms/std-service-youtube.orb +696 -0
- package/dist/exports/atoms/std-simulation-canvas.orb +9 -9
- package/dist/exports/atoms/std-sprite.orb +17 -17
- package/dist/exports/atoms/std-validate-on-save.orb +623 -0
- package/dist/exports/molecules/std-quiz.orb +48 -24
- package/dist/exports/molecules/std-service-content-pipeline.orb +915 -0
- package/dist/exports/molecules/std-service-custom-api-tester.orb +860 -0
- package/dist/exports/molecules/std-service-devops-toolkit.orb +1526 -0
- package/dist/exports/molecules/std-service-notification-hub.orb +696 -0
- package/dist/exports/molecules/std-service-payment-flow.orb +873 -0
- package/dist/exports/organisms/std-service-marketplace.orb +5191 -0
- package/dist/exports/organisms/std-service-research-assistant.orb +3568 -0
- package/dist/exports/test-schemas/os-trigger-simulation.orb +202 -0
- package/dist/exports/validation-report.json +2 -2
- package/dist/index.d.ts +3 -3
- package/dist/index.js +7887 -2216
- package/dist/index.js.map +1 -1
- package/dist/modules/array.d.ts +1 -1
- package/dist/modules/async.d.ts +1 -1
- package/dist/modules/contract.d.ts +22 -0
- package/dist/modules/contract.js +100 -0
- package/dist/modules/contract.js.map +1 -0
- package/dist/modules/data.d.ts +22 -0
- package/dist/modules/data.js +117 -0
- package/dist/modules/data.js.map +1 -0
- package/dist/modules/format.d.ts +1 -1
- package/dist/modules/graph.d.ts +23 -0
- package/dist/modules/graph.js +209 -0
- package/dist/modules/graph.js.map +1 -0
- package/dist/modules/index.d.ts +5 -1
- package/dist/modules/index.js +593 -63
- 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/nn.js +14 -14
- package/dist/modules/nn.js.map +1 -1
- package/dist/modules/object.d.ts +1 -1
- package/dist/modules/os.d.ts +19 -0
- package/dist/modules/os.js +116 -0
- package/dist/modules/os.js.map +1 -0
- 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/tensor.js +29 -29
- package/dist/modules/tensor.js.map +1 -1
- package/dist/modules/time.d.ts +1 -1
- package/dist/modules/train.d.ts +1 -1
- package/dist/modules/train.js +19 -19
- package/dist/modules/train.js.map +1 -1
- package/dist/modules/validate.d.ts +1 -1
- package/dist/registry.d.ts +2 -2
- package/dist/registry.js +184 -65
- package/dist/registry.js.map +1 -1
- package/dist/{types-CmNM_IbV.d.ts → types-DOeGXRCm.d.ts} +3 -3
- package/package.json +2 -2
package/dist/modules/math.d.ts
CHANGED
package/dist/modules/nn.d.ts
CHANGED
package/dist/modules/nn.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
var NN_OPERATORS = {
|
|
3
3
|
"nn/sequential": {
|
|
4
4
|
module: "nn",
|
|
5
|
-
category: "
|
|
5
|
+
category: "ml-arch",
|
|
6
6
|
minArity: 1,
|
|
7
7
|
maxArity: null,
|
|
8
8
|
description: "Create a sequential neural network from layers",
|
|
@@ -15,7 +15,7 @@ var NN_OPERATORS = {
|
|
|
15
15
|
},
|
|
16
16
|
"nn/linear": {
|
|
17
17
|
module: "nn",
|
|
18
|
-
category: "
|
|
18
|
+
category: "ml-arch",
|
|
19
19
|
minArity: 2,
|
|
20
20
|
maxArity: 2,
|
|
21
21
|
description: "Fully connected linear layer (output = input * weights + bias)",
|
|
@@ -29,7 +29,7 @@ var NN_OPERATORS = {
|
|
|
29
29
|
},
|
|
30
30
|
"nn/relu": {
|
|
31
31
|
module: "nn",
|
|
32
|
-
category: "
|
|
32
|
+
category: "ml-arch",
|
|
33
33
|
minArity: 0,
|
|
34
34
|
maxArity: 0,
|
|
35
35
|
description: "ReLU activation function: max(0, x)",
|
|
@@ -40,7 +40,7 @@ var NN_OPERATORS = {
|
|
|
40
40
|
},
|
|
41
41
|
"nn/tanh": {
|
|
42
42
|
module: "nn",
|
|
43
|
-
category: "
|
|
43
|
+
category: "ml-arch",
|
|
44
44
|
minArity: 0,
|
|
45
45
|
maxArity: 0,
|
|
46
46
|
description: "Tanh activation function: (e^x - e^-x) / (e^x + e^-x)",
|
|
@@ -51,7 +51,7 @@ var NN_OPERATORS = {
|
|
|
51
51
|
},
|
|
52
52
|
"nn/sigmoid": {
|
|
53
53
|
module: "nn",
|
|
54
|
-
category: "
|
|
54
|
+
category: "ml-arch",
|
|
55
55
|
minArity: 0,
|
|
56
56
|
maxArity: 0,
|
|
57
57
|
description: "Sigmoid activation function: 1 / (1 + e^-x)",
|
|
@@ -62,7 +62,7 @@ var NN_OPERATORS = {
|
|
|
62
62
|
},
|
|
63
63
|
"nn/softmax": {
|
|
64
64
|
module: "nn",
|
|
65
|
-
category: "
|
|
65
|
+
category: "ml-arch",
|
|
66
66
|
minArity: 0,
|
|
67
67
|
maxArity: 1,
|
|
68
68
|
description: "Softmax activation function (normalizes to probability distribution)",
|
|
@@ -75,7 +75,7 @@ var NN_OPERATORS = {
|
|
|
75
75
|
},
|
|
76
76
|
"nn/dropout": {
|
|
77
77
|
module: "nn",
|
|
78
|
-
category: "
|
|
78
|
+
category: "ml-arch",
|
|
79
79
|
minArity: 0,
|
|
80
80
|
maxArity: 1,
|
|
81
81
|
description: "Dropout layer for regularization (randomly zeros elements during training)",
|
|
@@ -88,7 +88,7 @@ var NN_OPERATORS = {
|
|
|
88
88
|
},
|
|
89
89
|
"nn/batchnorm": {
|
|
90
90
|
module: "nn",
|
|
91
|
-
category: "
|
|
91
|
+
category: "ml-arch",
|
|
92
92
|
minArity: 1,
|
|
93
93
|
maxArity: 1,
|
|
94
94
|
description: "Batch normalization layer",
|
|
@@ -101,7 +101,7 @@ var NN_OPERATORS = {
|
|
|
101
101
|
},
|
|
102
102
|
"nn/layernorm": {
|
|
103
103
|
module: "nn",
|
|
104
|
-
category: "
|
|
104
|
+
category: "ml-arch",
|
|
105
105
|
minArity: 1,
|
|
106
106
|
maxArity: 1,
|
|
107
107
|
description: "Layer normalization",
|
|
@@ -114,7 +114,7 @@ var NN_OPERATORS = {
|
|
|
114
114
|
},
|
|
115
115
|
"nn/forward": {
|
|
116
116
|
module: "nn",
|
|
117
|
-
category: "
|
|
117
|
+
category: "ml-effect",
|
|
118
118
|
minArity: 2,
|
|
119
119
|
maxArity: 2,
|
|
120
120
|
description: "Execute forward pass through network",
|
|
@@ -128,7 +128,7 @@ var NN_OPERATORS = {
|
|
|
128
128
|
},
|
|
129
129
|
"nn/getWeights": {
|
|
130
130
|
module: "nn",
|
|
131
|
-
category: "
|
|
131
|
+
category: "ml-arch",
|
|
132
132
|
minArity: 1,
|
|
133
133
|
maxArity: 1,
|
|
134
134
|
description: "Get network weights as a flat tensor",
|
|
@@ -141,7 +141,7 @@ var NN_OPERATORS = {
|
|
|
141
141
|
},
|
|
142
142
|
"nn/setWeights": {
|
|
143
143
|
module: "nn",
|
|
144
|
-
category: "
|
|
144
|
+
category: "ml-arch",
|
|
145
145
|
minArity: 2,
|
|
146
146
|
maxArity: 2,
|
|
147
147
|
description: "Set network weights from a flat tensor",
|
|
@@ -155,7 +155,7 @@ var NN_OPERATORS = {
|
|
|
155
155
|
},
|
|
156
156
|
"nn/paramCount": {
|
|
157
157
|
module: "nn",
|
|
158
|
-
category: "
|
|
158
|
+
category: "ml-arch",
|
|
159
159
|
minArity: 1,
|
|
160
160
|
maxArity: 1,
|
|
161
161
|
description: "Get total number of trainable parameters",
|
|
@@ -168,7 +168,7 @@ var NN_OPERATORS = {
|
|
|
168
168
|
},
|
|
169
169
|
"nn/clone": {
|
|
170
170
|
module: "nn",
|
|
171
|
-
category: "
|
|
171
|
+
category: "ml-arch",
|
|
172
172
|
minArity: 1,
|
|
173
173
|
maxArity: 1,
|
|
174
174
|
description: "Create a deep copy of the network with same weights",
|
package/dist/modules/nn.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../modules/nn.ts"],"names":[],"mappings":";AAgBO,IAAM,YAAA,GAAgD;AAAA,EAC3D,eAAA,EAAiB;AAAA,IACf,MAAA,EAAQ,IAAA;AAAA,IACR,QAAA,EAAU,QAAA;AAAA,IACV,QAAA,EAAU,CAAA;AAAA,IACV,QAAA,EAAU,IAAA;AAAA,IACV,WAAA,EAAa,gDAAA;AAAA,IACb,cAAA,EAAgB,KAAA;AAAA,IAChB,UAAA,EAAY,WAAA;AAAA,IACZ,MAAA,EAAQ;AAAA,MACN,EAAE,IAAA,EAAM,WAAA,EAAa,IAAA,EAAM,YAAA,EAAc,aAAa,8BAAA;AAA+B,KACvF;AAAA,IACA,OAAA,EAAS;AAAA,GACX;AAAA,EACA,WAAA,EAAa;AAAA,IACX,MAAA,EAAQ,IAAA;AAAA,IACR,QAAA,EAAU,QAAA;AAAA,IACV,QAAA,EAAU,CAAA;AAAA,IACV,QAAA,EAAU,CAAA;AAAA,IACV,WAAA,EAAa,gEAAA;AAAA,IACb,cAAA,EAAgB,KAAA;AAAA,IAChB,UAAA,EAAY,UAAA;AAAA,IACZ,MAAA,EAAQ;AAAA,MACN,EAAE,IAAA,EAAM,YAAA,EAAc,IAAA,EAAM,QAAA,EAAU,aAAa,iBAAA,EAAkB;AAAA,MACrE,EAAE,IAAA,EAAM,aAAA,EAAe,IAAA,EAAM,QAAA,EAAU,aAAa,kBAAA;AAAmB,KACzE;AAAA,IACA,OAAA,EAAS;AAAA,GACX;AAAA,E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AE,IAAA,EAAM,SAAA,EAAW,IAAA,EAAM,QAAA,EAAU,aAAa,4BAAA;AAA6B,KAC/E;AAAA,IACA,OAAA,EAAS;AAAA,GACX;AAAA,EACA,eAAA,EAAiB;AAAA,IACf,MAAA,EAAQ,IAAA;AAAA,IACR,QAAA,EAAU,QAAA;AAAA,IACV,QAAA,EAAU,CAAA;AAAA,IACV,QAAA,EAAU,CAAA;AAAA,IACV,WAAA,EAAa,0CAAA;AAAA,IACb,cAAA,EAAgB,KAAA;AAAA,IAChB,UAAA,EAAY,QAAA;AAAA,IACZ,MAAA,EAAQ;AAAA,MACN,EAAE,IAAA,EAAM,QAAA,EAAU,IAAA,EAAM,WAAA,EAAa,aAAa,2BAAA;AAA4B,KAChF;AAAA,IACA,OAAA,EAAS;AAAA,GACX;AAAA,EACA,UAAA,EAAY;AAAA,IACV,MAAA,EAAQ,IAAA;AAAA,IACR,QAAA,EAAU,QAAA;AAAA,IACV,QAAA,EAAU,CAAA;AAAA,IACV,QAAA,EAAU,CAAA;AAAA,IACV,WAAA,EAAa,qDAAA;AAAA,IACb,cAAA,EAAgB,KAAA;AAAA,IAChB,UAAA,EAAY,WAAA;AAAA,IACZ,MAAA,EAAQ;AAAA,MACN,EAAE,IAAA,EAAM,QAAA,EAAU,IAAA,EAAM,WAAA,EAAa,aAAa,oCAAA;AAAqC,KACzF;AAAA,IACA,OAAA,EAAS;AAAA;AAEb;AAKO,SAAS,cAAA,GAA2B;AACzC,EAAA,OAAO,MAAA,CAAO,KAAK,YAAY,CAAA;AACjC","file":"nn.js","sourcesContent":["/**\n * Neural Network Module - Neural Network Operations\n *\n * Provides operators for defining and executing neural networks.\n * Networks are defined as S-expressions and compiled to native code\n * by the Rust compiler for each target backend (PyTorch, TensorFlow, etc.).\n *\n * @packageDocumentation\n */\n\nimport type { StdOperatorMeta } from '../types.js';\n\n/**\n * Neural network module operators.\n * These operators define network architecture and forward passes.\n */\nexport const NN_OPERATORS: Record<string, StdOperatorMeta> = {\n 'nn/sequential': {\n module: 'nn',\n category: 'std-nn',\n minArity: 1,\n maxArity: null,\n description: 'Create a sequential neural network from layers',\n hasSideEffects: false,\n returnType: 'nn/module',\n params: [\n { name: '...layers', type: 'nn/layer[]', description: 'Layers to stack sequentially' },\n ],\n example: '[\"nn/sequential\", [\"nn/linear\", 16, 64], [\"nn/relu\"], [\"nn/linear\", 64, 4]]',\n },\n 'nn/linear': {\n module: 'nn',\n category: 'std-nn',\n minArity: 2,\n maxArity: 2,\n description: 'Fully connected linear layer (output = input * weights + bias)',\n hasSideEffects: false,\n returnType: 'nn/layer',\n params: [\n { name: 'inFeatures', type: 'number', description: 'Input dimension' },\n { name: 'outFeatures', type: 'number', description: 'Output dimension' },\n ],\n example: '[\"nn/linear\", 16, 64] // 16 inputs -> 64 outputs',\n },\n 'nn/relu': {\n module: 'nn',\n category: 'std-nn',\n minArity: 0,\n maxArity: 0,\n description: 'ReLU activation function: max(0, x)',\n hasSideEffects: false,\n returnType: 'nn/layer',\n params: [],\n example: '[\"nn/relu\"]',\n },\n 'nn/tanh': {\n module: 'nn',\n category: 'std-nn',\n minArity: 0,\n maxArity: 0,\n description: 'Tanh activation function: (e^x - e^-x) / (e^x + e^-x)',\n hasSideEffects: false,\n returnType: 'nn/layer',\n params: [],\n example: '[\"nn/tanh\"]',\n },\n 'nn/sigmoid': {\n module: 'nn',\n category: 'std-nn',\n minArity: 0,\n maxArity: 0,\n description: 'Sigmoid activation function: 1 / (1 + e^-x)',\n hasSideEffects: false,\n returnType: 'nn/layer',\n params: [],\n example: '[\"nn/sigmoid\"]',\n },\n 'nn/softmax': {\n module: 'nn',\n category: 'std-nn',\n minArity: 0,\n maxArity: 1,\n description: 'Softmax activation function (normalizes to probability distribution)',\n hasSideEffects: false,\n returnType: 'nn/layer',\n params: [\n { name: 'dim', type: 'number', description: 'Dimension to apply softmax', optional: true, defaultValue: -1 },\n ],\n example: '[\"nn/softmax\"]',\n },\n 'nn/dropout': {\n module: 'nn',\n category: 'std-nn',\n minArity: 0,\n maxArity: 1,\n description: 'Dropout layer for regularization (randomly zeros elements during training)',\n hasSideEffects: false,\n returnType: 'nn/layer',\n params: [\n { name: 'p', type: 'number', description: 'Dropout probability', optional: true, defaultValue: 0.5 },\n ],\n example: '[\"nn/dropout\", 0.3] // 30% dropout',\n },\n 'nn/batchnorm': {\n module: 'nn',\n category: 'std-nn',\n minArity: 1,\n maxArity: 1,\n description: 'Batch normalization layer',\n hasSideEffects: false,\n returnType: 'nn/layer',\n params: [\n { name: 'numFeatures', type: 'number', description: 'Number of features to normalize' },\n ],\n example: '[\"nn/batchnorm\", 64]',\n },\n 'nn/layernorm': {\n module: 'nn',\n category: 'std-nn',\n minArity: 1,\n maxArity: 1,\n description: 'Layer normalization',\n hasSideEffects: false,\n returnType: 'nn/layer',\n params: [\n { name: 'normalizedShape', type: 'number | number[]', description: 'Shape to normalize over' },\n ],\n example: '[\"nn/layernorm\", 64]',\n },\n 'nn/forward': {\n module: 'nn',\n category: 'std-nn',\n minArity: 2,\n maxArity: 2,\n description: 'Execute forward pass through network',\n hasSideEffects: false,\n returnType: 'tensor',\n params: [\n { name: 'module', type: 'nn/module', description: 'The neural network module' },\n { name: 'input', type: 'tensor', description: 'Input tensor' },\n ],\n example: '[\"nn/forward\", \"@entity.architecture\", \"@entity.sensors\"]',\n },\n 'nn/getWeights': {\n module: 'nn',\n category: 'std-nn',\n minArity: 1,\n maxArity: 1,\n description: 'Get network weights as a flat tensor',\n hasSideEffects: false,\n returnType: 'tensor',\n params: [\n { name: 'module', type: 'nn/module', description: 'The neural network module' },\n ],\n example: '[\"nn/getWeights\", \"@entity.architecture\"]',\n },\n 'nn/setWeights': {\n module: 'nn',\n category: 'std-nn',\n minArity: 2,\n maxArity: 2,\n description: 'Set network weights from a flat tensor',\n hasSideEffects: true,\n returnType: 'nn/module',\n params: [\n { name: 'module', type: 'nn/module', description: 'The neural network module' },\n { name: 'weights', type: 'tensor', description: 'New weights as flat tensor' },\n ],\n example: '[\"nn/setWeights\", \"@entity.architecture\", \"@payload.newWeights\"]',\n },\n 'nn/paramCount': {\n module: 'nn',\n category: 'std-nn',\n minArity: 1,\n maxArity: 1,\n description: 'Get total number of trainable parameters',\n hasSideEffects: false,\n returnType: 'number',\n params: [\n { name: 'module', type: 'nn/module', description: 'The neural network module' },\n ],\n example: '[\"nn/paramCount\", \"@entity.architecture\"] // => 3300',\n },\n 'nn/clone': {\n module: 'nn',\n category: 'std-nn',\n minArity: 1,\n maxArity: 1,\n description: 'Create a deep copy of the network with same weights',\n hasSideEffects: false,\n returnType: 'nn/module',\n params: [\n { name: 'module', type: 'nn/module', description: 'The neural network module to clone' },\n ],\n example: '[\"nn/clone\", \"@entity.architecture\"]',\n },\n};\n\n/**\n * Get all nn operator names.\n */\nexport function getNnOperators(): string[] {\n return Object.keys(NN_OPERATORS);\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../../modules/nn.ts"],"names":[],"mappings":";AAgBO,IAAM,YAAA,GAAgD;AAAA,EAC3D,eAAA,EAAiB;AAAA,IACf,MAAA,EAAQ,IAAA;AAAA,IACR,QAAA,EAAU,SAAA;AAAA,IACV,QAAA,EAAU,CAAA;AAAA,IACV,QAAA,EAAU,IAAA;AAAA,IACV,WAAA,EAAa,gDAAA;AAAA,IACb,cAAA,EAAgB,KAAA;AAAA,IAChB,UAAA,EAAY,WAAA;AAAA,IACZ,MAAA,EAAQ;AAAA,MACN,EAAE,IAAA,EAAM,WAAA,EAAa,IAAA,EAAM,YAAA,EAAc,aAAa,8BAAA;AAA+B,KACvF;AAAA,IACA,OAAA,EAAS;AAAA,GACX;AAAA,EACA,WAAA,EAAa;AAAA,IACX,MAAA,EAAQ,IAAA;AAAA,IACR,QAAA,EAAU,SAAA;AAAA,IACV,QAAA,EAAU,CAAA;AAAA,IACV,QAAA,EAAU,CAAA;AAAA,IACV,WAAA,EAAa,gEAAA;AAAA,IACb,cAAA,EAAgB,KAAA;AAAA,IAChB,UAAA,EAAY,UAAA;AAAA,IACZ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ations\n *\n * Provides operators for defining and executing neural networks.\n * Networks are defined as S-expressions and compiled to native code\n * by the Rust compiler for each target backend (PyTorch, TensorFlow, etc.).\n *\n * @packageDocumentation\n */\n\nimport type { StdOperatorMeta } from '../types.js';\n\n/**\n * Neural network module operators.\n * These operators define network architecture and forward passes.\n */\nexport const NN_OPERATORS: Record<string, StdOperatorMeta> = {\n 'nn/sequential': {\n module: 'nn',\n category: 'ml-arch',\n minArity: 1,\n maxArity: null,\n description: 'Create a sequential neural network from layers',\n hasSideEffects: false,\n returnType: 'nn/module',\n params: [\n { name: '...layers', type: 'nn/layer[]', description: 'Layers to stack sequentially' },\n ],\n example: '[\"nn/sequential\", [\"nn/linear\", 16, 64], [\"nn/relu\"], [\"nn/linear\", 64, 4]]',\n },\n 'nn/linear': {\n module: 'nn',\n category: 'ml-arch',\n minArity: 2,\n maxArity: 2,\n description: 'Fully connected linear layer (output = input * weights + bias)',\n hasSideEffects: false,\n returnType: 'nn/layer',\n params: [\n { name: 'inFeatures', type: 'number', description: 'Input dimension' },\n { name: 'outFeatures', type: 'number', description: 'Output dimension' },\n ],\n example: '[\"nn/linear\", 16, 64] // 16 inputs -> 64 outputs',\n },\n 'nn/relu': {\n module: 'nn',\n category: 'ml-arch',\n minArity: 0,\n maxArity: 0,\n description: 'ReLU activation function: max(0, x)',\n hasSideEffects: false,\n returnType: 'nn/layer',\n params: [],\n example: '[\"nn/relu\"]',\n },\n 'nn/tanh': {\n module: 'nn',\n category: 'ml-arch',\n minArity: 0,\n maxArity: 0,\n description: 'Tanh activation function: (e^x - e^-x) / (e^x + e^-x)',\n hasSideEffects: false,\n returnType: 'nn/layer',\n params: [],\n example: '[\"nn/tanh\"]',\n },\n 'nn/sigmoid': {\n module: 'nn',\n category: 'ml-arch',\n minArity: 0,\n maxArity: 0,\n description: 'Sigmoid activation function: 1 / (1 + e^-x)',\n hasSideEffects: false,\n returnType: 'nn/layer',\n params: [],\n example: '[\"nn/sigmoid\"]',\n },\n 'nn/softmax': {\n module: 'nn',\n category: 'ml-arch',\n minArity: 0,\n maxArity: 1,\n description: 'Softmax activation function (normalizes to probability distribution)',\n hasSideEffects: false,\n returnType: 'nn/layer',\n params: [\n { name: 'dim', type: 'number', description: 'Dimension to apply softmax', optional: true, defaultValue: -1 },\n ],\n example: '[\"nn/softmax\"]',\n },\n 'nn/dropout': {\n module: 'nn',\n category: 'ml-arch',\n minArity: 0,\n maxArity: 1,\n description: 'Dropout layer for regularization (randomly zeros elements during training)',\n hasSideEffects: false,\n returnType: 'nn/layer',\n params: [\n { name: 'p', type: 'number', description: 'Dropout probability', optional: true, defaultValue: 0.5 },\n ],\n example: '[\"nn/dropout\", 0.3] // 30% dropout',\n },\n 'nn/batchnorm': {\n module: 'nn',\n category: 'ml-arch',\n minArity: 1,\n maxArity: 1,\n description: 'Batch normalization layer',\n hasSideEffects: false,\n returnType: 'nn/layer',\n params: [\n { name: 'numFeatures', type: 'number', description: 'Number of features to normalize' },\n ],\n example: '[\"nn/batchnorm\", 64]',\n },\n 'nn/layernorm': {\n module: 'nn',\n category: 'ml-arch',\n minArity: 1,\n maxArity: 1,\n description: 'Layer normalization',\n hasSideEffects: false,\n returnType: 'nn/layer',\n params: [\n { name: 'normalizedShape', type: 'number | number[]', description: 'Shape to normalize over' },\n ],\n example: '[\"nn/layernorm\", 64]',\n },\n 'nn/forward': {\n module: 'nn',\n category: 'ml-effect',\n minArity: 2,\n maxArity: 2,\n description: 'Execute forward pass through network',\n hasSideEffects: false,\n returnType: 'tensor',\n params: [\n { name: 'module', type: 'nn/module', description: 'The neural network module' },\n { name: 'input', type: 'tensor', description: 'Input tensor' },\n ],\n example: '[\"nn/forward\", \"@entity.architecture\", \"@entity.sensors\"]',\n },\n 'nn/getWeights': {\n module: 'nn',\n category: 'ml-arch',\n minArity: 1,\n maxArity: 1,\n description: 'Get network weights as a flat tensor',\n hasSideEffects: false,\n returnType: 'tensor',\n params: [\n { name: 'module', type: 'nn/module', description: 'The neural network module' },\n ],\n example: '[\"nn/getWeights\", \"@entity.architecture\"]',\n },\n 'nn/setWeights': {\n module: 'nn',\n category: 'ml-arch',\n minArity: 2,\n maxArity: 2,\n description: 'Set network weights from a flat tensor',\n hasSideEffects: true,\n returnType: 'nn/module',\n params: [\n { name: 'module', type: 'nn/module', description: 'The neural network module' },\n { name: 'weights', type: 'tensor', description: 'New weights as flat tensor' },\n ],\n example: '[\"nn/setWeights\", \"@entity.architecture\", \"@payload.newWeights\"]',\n },\n 'nn/paramCount': {\n module: 'nn',\n category: 'ml-arch',\n minArity: 1,\n maxArity: 1,\n description: 'Get total number of trainable parameters',\n hasSideEffects: false,\n returnType: 'number',\n params: [\n { name: 'module', type: 'nn/module', description: 'The neural network module' },\n ],\n example: '[\"nn/paramCount\", \"@entity.architecture\"] // => 3300',\n },\n 'nn/clone': {\n module: 'nn',\n category: 'ml-arch',\n minArity: 1,\n maxArity: 1,\n description: 'Create a deep copy of the network with same weights',\n hasSideEffects: false,\n returnType: 'nn/module',\n params: [\n { name: 'module', type: 'nn/module', description: 'The neural network module to clone' },\n ],\n example: '[\"nn/clone\", \"@entity.architecture\"]',\n },\n};\n\n/**\n * Get all nn operator names.\n */\nexport function getNnOperators(): string[] {\n return Object.keys(NN_OPERATORS);\n}\n"]}
|
package/dist/modules/object.d.ts
CHANGED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { a as StdOperatorMeta } from '../types-DOeGXRCm.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* OS Module - Operating System Event Watchers
|
|
5
|
+
*
|
|
6
|
+
* Provides operators for registering OS-level event watchers that
|
|
7
|
+
* translate kernel events (inotify, SIGCHLD, socket, timerfd) into
|
|
8
|
+
* Orb events on the EventBus. Used by trigger traits to interrupt
|
|
9
|
+
* agents with verified ground truth.
|
|
10
|
+
*
|
|
11
|
+
* All operators have side effects (they register watchers).
|
|
12
|
+
* Server-side only (no-op on client).
|
|
13
|
+
*
|
|
14
|
+
* @packageDocumentation
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
declare const OS_OPERATORS: Record<string, StdOperatorMeta>;
|
|
18
|
+
|
|
19
|
+
export { OS_OPERATORS };
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
// modules/os.ts
|
|
2
|
+
var OS_OPERATORS = {
|
|
3
|
+
"os/watch-files": {
|
|
4
|
+
module: "os",
|
|
5
|
+
category: "std-os",
|
|
6
|
+
minArity: 1,
|
|
7
|
+
maxArity: 2,
|
|
8
|
+
description: "Register file system watcher. Emits OS_FILE_MODIFIED, OS_FILE_CREATED, OS_FILE_DELETED events with { path, name, dir, timestamp } payload.",
|
|
9
|
+
hasSideEffects: true,
|
|
10
|
+
returnType: "void",
|
|
11
|
+
params: [
|
|
12
|
+
{ name: "glob", type: "string", description: 'Glob pattern to watch (e.g., "**/*.orb")' },
|
|
13
|
+
{ name: "options", type: "object", description: "Optional config: { recursive, ignoreInitial, debounceMs }", optional: true }
|
|
14
|
+
],
|
|
15
|
+
example: '["os/watch-files", "**/*.orb"]'
|
|
16
|
+
},
|
|
17
|
+
"os/watch-process": {
|
|
18
|
+
module: "os",
|
|
19
|
+
category: "std-os",
|
|
20
|
+
minArity: 1,
|
|
21
|
+
maxArity: 2,
|
|
22
|
+
description: "Register process monitor. Emits OS_PROCESS_EXITED, OS_PROCESS_STARTED events with { pid, name, exitCode, signal, args, duration } payload.",
|
|
23
|
+
hasSideEffects: true,
|
|
24
|
+
returnType: "void",
|
|
25
|
+
params: [
|
|
26
|
+
{ name: "name", type: "string", description: 'Process name to monitor (e.g., "orbital")' },
|
|
27
|
+
{ name: "subcommand", type: "string", description: 'Optional subcommand filter (e.g., "validate")', optional: true }
|
|
28
|
+
],
|
|
29
|
+
example: '["os/watch-process", "orbital", "validate"]'
|
|
30
|
+
},
|
|
31
|
+
"os/watch-port": {
|
|
32
|
+
module: "os",
|
|
33
|
+
category: "std-os",
|
|
34
|
+
minArity: 1,
|
|
35
|
+
maxArity: 2,
|
|
36
|
+
description: "Register port monitor. Emits OS_PORT_OPENED, OS_PORT_CLOSED events with { port, protocol, pid, address } payload.",
|
|
37
|
+
hasSideEffects: true,
|
|
38
|
+
returnType: "void",
|
|
39
|
+
params: [
|
|
40
|
+
{ name: "port", type: "number", description: "Port number to monitor" },
|
|
41
|
+
{ name: "protocol", type: "string", description: 'Protocol: "tcp" or "udp" (default: "tcp")', optional: true }
|
|
42
|
+
],
|
|
43
|
+
example: '["os/watch-port", 3000]'
|
|
44
|
+
},
|
|
45
|
+
"os/watch-http": {
|
|
46
|
+
module: "os",
|
|
47
|
+
category: "std-os",
|
|
48
|
+
minArity: 1,
|
|
49
|
+
maxArity: 2,
|
|
50
|
+
description: "Register HTTP response interceptor. Emits OS_HTTP_RESPONSE events with { url, method, status, headers, body, duration } payload.",
|
|
51
|
+
hasSideEffects: true,
|
|
52
|
+
returnType: "void",
|
|
53
|
+
params: [
|
|
54
|
+
{ name: "urlPattern", type: "string", description: 'URL pattern to intercept (e.g., "https://api.example.com/*")' },
|
|
55
|
+
{ name: "method", type: "string", description: 'HTTP method filter (e.g., "POST")', optional: true }
|
|
56
|
+
],
|
|
57
|
+
example: '["os/watch-http", "https://api.example.com/*", "POST"]'
|
|
58
|
+
},
|
|
59
|
+
"os/watch-cron": {
|
|
60
|
+
module: "os",
|
|
61
|
+
category: "std-os",
|
|
62
|
+
minArity: 1,
|
|
63
|
+
maxArity: 1,
|
|
64
|
+
description: "Register cron schedule. Emits OS_CRON_FIRE events with { expression, timestamp } payload.",
|
|
65
|
+
hasSideEffects: true,
|
|
66
|
+
returnType: "void",
|
|
67
|
+
params: [
|
|
68
|
+
{ name: "expression", type: "string", description: 'Cron expression (e.g., "*/5 * * * *" for every 5 minutes)' }
|
|
69
|
+
],
|
|
70
|
+
example: '["os/watch-cron", "0 */6 * * *"]'
|
|
71
|
+
},
|
|
72
|
+
"os/watch-signal": {
|
|
73
|
+
module: "os",
|
|
74
|
+
category: "std-os",
|
|
75
|
+
minArity: 1,
|
|
76
|
+
maxArity: 1,
|
|
77
|
+
description: "Register OS signal handler. Emits OS_SIGNAL_USR1, OS_SIGNAL_HUP, etc. with { pid, timestamp } payload.",
|
|
78
|
+
hasSideEffects: true,
|
|
79
|
+
returnType: "void",
|
|
80
|
+
params: [
|
|
81
|
+
{ name: "signal", type: "string", description: 'Signal name: "SIGUSR1", "SIGUSR2", "SIGHUP", "SIGTERM"' }
|
|
82
|
+
],
|
|
83
|
+
example: '["os/watch-signal", "SIGUSR1"]'
|
|
84
|
+
},
|
|
85
|
+
"os/watch-env": {
|
|
86
|
+
module: "os",
|
|
87
|
+
category: "std-os",
|
|
88
|
+
minArity: 1,
|
|
89
|
+
maxArity: 1,
|
|
90
|
+
description: "Register environment variable watcher. Emits OS_ENV_CHANGED events with { variable, oldValue, newValue } payload.",
|
|
91
|
+
hasSideEffects: true,
|
|
92
|
+
returnType: "void",
|
|
93
|
+
params: [
|
|
94
|
+
{ name: "variable", type: "string", description: "Environment variable name to watch" }
|
|
95
|
+
],
|
|
96
|
+
example: '["os/watch-env", "NODE_ENV"]'
|
|
97
|
+
},
|
|
98
|
+
"os/debounce": {
|
|
99
|
+
module: "os",
|
|
100
|
+
category: "std-os",
|
|
101
|
+
minArity: 2,
|
|
102
|
+
maxArity: 2,
|
|
103
|
+
description: "Configure debounce interval for an OS event type. Prevents trigger storms during rapid changes.",
|
|
104
|
+
hasSideEffects: true,
|
|
105
|
+
returnType: "void",
|
|
106
|
+
params: [
|
|
107
|
+
{ name: "ms", type: "number", description: "Debounce interval in milliseconds" },
|
|
108
|
+
{ name: "eventType", type: "string", description: 'OS event type to debounce (e.g., "OS_FILE_MODIFIED")' }
|
|
109
|
+
],
|
|
110
|
+
example: '["os/debounce", 500, "OS_FILE_MODIFIED"]'
|
|
111
|
+
}
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
export { OS_OPERATORS };
|
|
115
|
+
//# sourceMappingURL=os.js.map
|
|
116
|
+
//# sourceMappingURL=os.js.map
|
|
@@ -0,0 +1 @@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QAAA,EAAU,QAAA;AAAA,IACV,QAAA,EAAU,CAAA;AAAA,IACV,QAAA,EAAU,CAAA;AAAA,IACV,WAAA,EAAa,wGAAA;AAAA,IACb,cAAA,EAAgB,IAAA;AAAA,IAChB,UAAA,EAAY,MAAA;AAAA,IACZ,MAAA,EAAQ;AAAA,MACN,EAAE,IAAA,EAAM,QAAA,EAAU,IAAA,EAAM,QAAA,EAAU,aAAa,wDAAA;AAAyD,KAC1G;AAAA,IACA,OAAA,EAAS;AAAA,GACX;AAAA,EACA,cAAA,EAAgB;AAAA,IACd,MAAA,EAAQ,IAAA;AAAA,IACR,QAAA,EAAU,QAAA;AAAA,IACV,QAAA,EAAU,CAAA;AAAA,IACV,QAAA,EAAU,CAAA;AAAA,IACV,WAAA,EAAa,mHAAA;AAAA,IACb,cAAA,EAAgB,IAAA;AAAA,IAChB,UAAA,EAAY,MAAA;AAAA,IACZ,MAAA,EAAQ;AAAA,MACN,EAAE,IAAA,EAAM,UAAA,EAAY,IAAA,EAAM,QAAA,EAAU,aAAa,oCAAA;AAAqC,KACxF;AAAA,IACA,OAAA,EAAS;AAAA,GACX;AAAA,EACA,aAAA,EAAe;AAAA,IACb,MAAA,EAAQ,IAAA;AAAA,IACR,QAAA,EAAU,QAAA;AAAA,IACV,QAAA,EAAU,CAAA;AAAA,IACV,QAAA,EAAU,CAAA;AAAA,IACV,WAAA,EAAa,iGAAA;AAAA,IACb,cAAA,EAAgB,IAAA;AAAA,IAChB,UAAA,EAAY,MAAA;AAAA,IACZ,MAAA,EAAQ;AAAA,MACN,EAAE,IAAA,EAAM,IAAA,EAAM,IAAA,EAAM,QAAA,EAAU,aAAa,mCAAA,EAAoC;AAAA,MAC/E,EAAE,IAAA,EAAM,WAAA,EAAa,IAAA,EAAM,QAAA,EAAU,aAAa,sDAAA;AAAuD,KAC3G;AAAA,IACA,OAAA,EAAS;AAAA;AAEb","file":"os.js","sourcesContent":["/**\n * OS Module - Operating System Event Watchers\n *\n * Provides operators for registering OS-level event watchers that\n * translate kernel events (inotify, SIGCHLD, socket, timerfd) into\n * Orb events on the EventBus. Used by trigger traits to interrupt\n * agents with verified ground truth.\n *\n * All operators have side effects (they register watchers).\n * Server-side only (no-op on client).\n *\n * @packageDocumentation\n */\n\nimport type { StdOperatorMeta } from '../types.js';\n\nexport const OS_OPERATORS: Record<string, StdOperatorMeta> = {\n 'os/watch-files': {\n module: 'os',\n category: 'std-os',\n minArity: 1,\n maxArity: 2,\n description: 'Register file system watcher. Emits OS_FILE_MODIFIED, OS_FILE_CREATED, OS_FILE_DELETED events with { path, name, dir, timestamp } payload.',\n hasSideEffects: true,\n returnType: 'void',\n params: [\n { name: 'glob', type: 'string', description: 'Glob pattern to watch (e.g., \"**/*.orb\")' },\n { name: 'options', type: 'object', description: 'Optional config: { recursive, ignoreInitial, debounceMs }', optional: true },\n ],\n example: '[\"os/watch-files\", \"**/*.orb\"]',\n },\n 'os/watch-process': {\n module: 'os',\n category: 'std-os',\n minArity: 1,\n maxArity: 2,\n description: 'Register process monitor. Emits OS_PROCESS_EXITED, OS_PROCESS_STARTED events with { pid, name, exitCode, signal, args, duration } payload.',\n hasSideEffects: true,\n returnType: 'void',\n params: [\n { name: 'name', type: 'string', description: 'Process name to monitor (e.g., \"orbital\")' },\n { name: 'subcommand', type: 'string', description: 'Optional subcommand filter (e.g., \"validate\")', optional: true },\n ],\n example: '[\"os/watch-process\", \"orbital\", \"validate\"]',\n },\n 'os/watch-port': {\n module: 'os',\n category: 'std-os',\n minArity: 1,\n maxArity: 2,\n description: 'Register port monitor. Emits OS_PORT_OPENED, OS_PORT_CLOSED events with { port, protocol, pid, address } payload.',\n hasSideEffects: true,\n returnType: 'void',\n params: [\n { name: 'port', type: 'number', description: 'Port number to monitor' },\n { name: 'protocol', type: 'string', description: 'Protocol: \"tcp\" or \"udp\" (default: \"tcp\")', optional: true },\n ],\n example: '[\"os/watch-port\", 3000]',\n },\n 'os/watch-http': {\n module: 'os',\n category: 'std-os',\n minArity: 1,\n maxArity: 2,\n description: 'Register HTTP response interceptor. Emits OS_HTTP_RESPONSE events with { url, method, status, headers, body, duration } payload.',\n hasSideEffects: true,\n returnType: 'void',\n params: [\n { name: 'urlPattern', type: 'string', description: 'URL pattern to intercept (e.g., \"https://api.example.com/*\")' },\n { name: 'method', type: 'string', description: 'HTTP method filter (e.g., \"POST\")', optional: true },\n ],\n example: '[\"os/watch-http\", \"https://api.example.com/*\", \"POST\"]',\n },\n 'os/watch-cron': {\n module: 'os',\n category: 'std-os',\n minArity: 1,\n maxArity: 1,\n description: 'Register cron schedule. Emits OS_CRON_FIRE events with { expression, timestamp } payload.',\n hasSideEffects: true,\n returnType: 'void',\n params: [\n { name: 'expression', type: 'string', description: 'Cron expression (e.g., \"*/5 * * * *\" for every 5 minutes)' },\n ],\n example: '[\"os/watch-cron\", \"0 */6 * * *\"]',\n },\n 'os/watch-signal': {\n module: 'os',\n category: 'std-os',\n minArity: 1,\n maxArity: 1,\n description: 'Register OS signal handler. Emits OS_SIGNAL_USR1, OS_SIGNAL_HUP, etc. with { pid, timestamp } payload.',\n hasSideEffects: true,\n returnType: 'void',\n params: [\n { name: 'signal', type: 'string', description: 'Signal name: \"SIGUSR1\", \"SIGUSR2\", \"SIGHUP\", \"SIGTERM\"' },\n ],\n example: '[\"os/watch-signal\", \"SIGUSR1\"]',\n },\n 'os/watch-env': {\n module: 'os',\n category: 'std-os',\n minArity: 1,\n maxArity: 1,\n description: 'Register environment variable watcher. Emits OS_ENV_CHANGED events with { variable, oldValue, newValue } payload.',\n hasSideEffects: true,\n returnType: 'void',\n params: [\n { name: 'variable', type: 'string', description: 'Environment variable name to watch' },\n ],\n example: '[\"os/watch-env\", \"NODE_ENV\"]',\n },\n 'os/debounce': {\n module: 'os',\n category: 'std-os',\n minArity: 2,\n maxArity: 2,\n description: 'Configure debounce interval for an OS event type. Prevents trigger storms during rapid changes.',\n hasSideEffects: true,\n returnType: 'void',\n params: [\n { name: 'ms', type: 'number', description: 'Debounce interval in milliseconds' },\n { name: 'eventType', type: 'string', description: 'OS event type to debounce (e.g., \"OS_FILE_MODIFIED\")' },\n ],\n example: '[\"os/debounce\", 500, \"OS_FILE_MODIFIED\"]',\n },\n};\n"]}
|
package/dist/modules/prob.d.ts
CHANGED
package/dist/modules/str.d.ts
CHANGED
package/dist/modules/tensor.d.ts
CHANGED
package/dist/modules/tensor.js
CHANGED
|
@@ -5,7 +5,7 @@ var TENSOR_OPERATORS = {
|
|
|
5
5
|
// ============================================================================
|
|
6
6
|
"tensor/from": {
|
|
7
7
|
module: "tensor",
|
|
8
|
-
category: "
|
|
8
|
+
category: "ml-tensor",
|
|
9
9
|
minArity: 1,
|
|
10
10
|
maxArity: 1,
|
|
11
11
|
description: "Create tensor from array",
|
|
@@ -18,7 +18,7 @@ var TENSOR_OPERATORS = {
|
|
|
18
18
|
},
|
|
19
19
|
"tensor/zeros": {
|
|
20
20
|
module: "tensor",
|
|
21
|
-
category: "
|
|
21
|
+
category: "ml-tensor",
|
|
22
22
|
minArity: 1,
|
|
23
23
|
maxArity: 1,
|
|
24
24
|
description: "Create tensor filled with zeros",
|
|
@@ -31,7 +31,7 @@ var TENSOR_OPERATORS = {
|
|
|
31
31
|
},
|
|
32
32
|
"tensor/ones": {
|
|
33
33
|
module: "tensor",
|
|
34
|
-
category: "
|
|
34
|
+
category: "ml-tensor",
|
|
35
35
|
minArity: 1,
|
|
36
36
|
maxArity: 1,
|
|
37
37
|
description: "Create tensor filled with ones",
|
|
@@ -44,7 +44,7 @@ var TENSOR_OPERATORS = {
|
|
|
44
44
|
},
|
|
45
45
|
"tensor/rand": {
|
|
46
46
|
module: "tensor",
|
|
47
|
-
category: "
|
|
47
|
+
category: "ml-tensor",
|
|
48
48
|
minArity: 1,
|
|
49
49
|
maxArity: 1,
|
|
50
50
|
description: "Create tensor with random values in [0, 1)",
|
|
@@ -57,7 +57,7 @@ var TENSOR_OPERATORS = {
|
|
|
57
57
|
},
|
|
58
58
|
"tensor/randn": {
|
|
59
59
|
module: "tensor",
|
|
60
|
-
category: "
|
|
60
|
+
category: "ml-tensor",
|
|
61
61
|
minArity: 1,
|
|
62
62
|
maxArity: 1,
|
|
63
63
|
description: "Create tensor with random values from standard normal distribution",
|
|
@@ -73,7 +73,7 @@ var TENSOR_OPERATORS = {
|
|
|
73
73
|
// ============================================================================
|
|
74
74
|
"tensor/shape": {
|
|
75
75
|
module: "tensor",
|
|
76
|
-
category: "
|
|
76
|
+
category: "ml-tensor",
|
|
77
77
|
minArity: 1,
|
|
78
78
|
maxArity: 1,
|
|
79
79
|
description: "Get tensor shape as array",
|
|
@@ -86,7 +86,7 @@ var TENSOR_OPERATORS = {
|
|
|
86
86
|
},
|
|
87
87
|
"tensor/get": {
|
|
88
88
|
module: "tensor",
|
|
89
|
-
category: "
|
|
89
|
+
category: "ml-tensor",
|
|
90
90
|
minArity: 2,
|
|
91
91
|
maxArity: 2,
|
|
92
92
|
description: "Get element at index",
|
|
@@ -100,7 +100,7 @@ var TENSOR_OPERATORS = {
|
|
|
100
100
|
},
|
|
101
101
|
"tensor/slice": {
|
|
102
102
|
module: "tensor",
|
|
103
|
-
category: "
|
|
103
|
+
category: "ml-tensor",
|
|
104
104
|
minArity: 3,
|
|
105
105
|
maxArity: 3,
|
|
106
106
|
description: "Get slice of tensor",
|
|
@@ -115,7 +115,7 @@ var TENSOR_OPERATORS = {
|
|
|
115
115
|
},
|
|
116
116
|
"tensor/reshape": {
|
|
117
117
|
module: "tensor",
|
|
118
|
-
category: "
|
|
118
|
+
category: "ml-tensor",
|
|
119
119
|
minArity: 2,
|
|
120
120
|
maxArity: 2,
|
|
121
121
|
description: "Reshape tensor to new shape (total elements must match)",
|
|
@@ -129,7 +129,7 @@ var TENSOR_OPERATORS = {
|
|
|
129
129
|
},
|
|
130
130
|
"tensor/flatten": {
|
|
131
131
|
module: "tensor",
|
|
132
|
-
category: "
|
|
132
|
+
category: "ml-tensor",
|
|
133
133
|
minArity: 1,
|
|
134
134
|
maxArity: 1,
|
|
135
135
|
description: "Flatten tensor to 1D",
|
|
@@ -145,7 +145,7 @@ var TENSOR_OPERATORS = {
|
|
|
145
145
|
// ============================================================================
|
|
146
146
|
"tensor/add": {
|
|
147
147
|
module: "tensor",
|
|
148
|
-
category: "
|
|
148
|
+
category: "ml-tensor",
|
|
149
149
|
minArity: 2,
|
|
150
150
|
maxArity: 2,
|
|
151
151
|
description: "Element-wise addition",
|
|
@@ -159,7 +159,7 @@ var TENSOR_OPERATORS = {
|
|
|
159
159
|
},
|
|
160
160
|
"tensor/sub": {
|
|
161
161
|
module: "tensor",
|
|
162
|
-
category: "
|
|
162
|
+
category: "ml-tensor",
|
|
163
163
|
minArity: 2,
|
|
164
164
|
maxArity: 2,
|
|
165
165
|
description: "Element-wise subtraction",
|
|
@@ -173,7 +173,7 @@ var TENSOR_OPERATORS = {
|
|
|
173
173
|
},
|
|
174
174
|
"tensor/mul": {
|
|
175
175
|
module: "tensor",
|
|
176
|
-
category: "
|
|
176
|
+
category: "ml-tensor",
|
|
177
177
|
minArity: 2,
|
|
178
178
|
maxArity: 2,
|
|
179
179
|
description: "Element-wise multiplication",
|
|
@@ -187,7 +187,7 @@ var TENSOR_OPERATORS = {
|
|
|
187
187
|
},
|
|
188
188
|
"tensor/div": {
|
|
189
189
|
module: "tensor",
|
|
190
|
-
category: "
|
|
190
|
+
category: "ml-tensor",
|
|
191
191
|
minArity: 2,
|
|
192
192
|
maxArity: 2,
|
|
193
193
|
description: "Element-wise division",
|
|
@@ -201,7 +201,7 @@ var TENSOR_OPERATORS = {
|
|
|
201
201
|
},
|
|
202
202
|
"tensor/matmul": {
|
|
203
203
|
module: "tensor",
|
|
204
|
-
category: "
|
|
204
|
+
category: "ml-tensor",
|
|
205
205
|
minArity: 2,
|
|
206
206
|
maxArity: 2,
|
|
207
207
|
description: "Matrix multiplication",
|
|
@@ -215,7 +215,7 @@ var TENSOR_OPERATORS = {
|
|
|
215
215
|
},
|
|
216
216
|
"tensor/dot": {
|
|
217
217
|
module: "tensor",
|
|
218
|
-
category: "
|
|
218
|
+
category: "ml-tensor",
|
|
219
219
|
minArity: 2,
|
|
220
220
|
maxArity: 2,
|
|
221
221
|
description: "Dot product of two 1D tensors",
|
|
@@ -232,7 +232,7 @@ var TENSOR_OPERATORS = {
|
|
|
232
232
|
// ============================================================================
|
|
233
233
|
"tensor/sum": {
|
|
234
234
|
module: "tensor",
|
|
235
|
-
category: "
|
|
235
|
+
category: "ml-tensor",
|
|
236
236
|
minArity: 1,
|
|
237
237
|
maxArity: 2,
|
|
238
238
|
description: "Sum of tensor elements",
|
|
@@ -246,7 +246,7 @@ var TENSOR_OPERATORS = {
|
|
|
246
246
|
},
|
|
247
247
|
"tensor/mean": {
|
|
248
248
|
module: "tensor",
|
|
249
|
-
category: "
|
|
249
|
+
category: "ml-tensor",
|
|
250
250
|
minArity: 1,
|
|
251
251
|
maxArity: 2,
|
|
252
252
|
description: "Mean of tensor elements",
|
|
@@ -260,7 +260,7 @@ var TENSOR_OPERATORS = {
|
|
|
260
260
|
},
|
|
261
261
|
"tensor/max": {
|
|
262
262
|
module: "tensor",
|
|
263
|
-
category: "
|
|
263
|
+
category: "ml-tensor",
|
|
264
264
|
minArity: 1,
|
|
265
265
|
maxArity: 2,
|
|
266
266
|
description: "Maximum value in tensor",
|
|
@@ -274,7 +274,7 @@ var TENSOR_OPERATORS = {
|
|
|
274
274
|
},
|
|
275
275
|
"tensor/min": {
|
|
276
276
|
module: "tensor",
|
|
277
|
-
category: "
|
|
277
|
+
category: "ml-tensor",
|
|
278
278
|
minArity: 1,
|
|
279
279
|
maxArity: 2,
|
|
280
280
|
description: "Minimum value in tensor",
|
|
@@ -288,7 +288,7 @@ var TENSOR_OPERATORS = {
|
|
|
288
288
|
},
|
|
289
289
|
"tensor/argmax": {
|
|
290
290
|
module: "tensor",
|
|
291
|
-
category: "
|
|
291
|
+
category: "ml-tensor",
|
|
292
292
|
minArity: 1,
|
|
293
293
|
maxArity: 2,
|
|
294
294
|
description: "Index of maximum value",
|
|
@@ -302,7 +302,7 @@ var TENSOR_OPERATORS = {
|
|
|
302
302
|
},
|
|
303
303
|
"tensor/norm": {
|
|
304
304
|
module: "tensor",
|
|
305
|
-
category: "
|
|
305
|
+
category: "ml-tensor",
|
|
306
306
|
minArity: 1,
|
|
307
307
|
maxArity: 2,
|
|
308
308
|
description: "L2 norm of tensor",
|
|
@@ -319,7 +319,7 @@ var TENSOR_OPERATORS = {
|
|
|
319
319
|
// ============================================================================
|
|
320
320
|
"tensor/allInRange": {
|
|
321
321
|
module: "tensor",
|
|
322
|
-
category: "
|
|
322
|
+
category: "ml-tensor",
|
|
323
323
|
minArity: 2,
|
|
324
324
|
maxArity: 2,
|
|
325
325
|
description: "Check if all elements are within range [min, max]",
|
|
@@ -333,7 +333,7 @@ var TENSOR_OPERATORS = {
|
|
|
333
333
|
},
|
|
334
334
|
"tensor/outOfRangeIndices": {
|
|
335
335
|
module: "tensor",
|
|
336
|
-
category: "
|
|
336
|
+
category: "ml-tensor",
|
|
337
337
|
minArity: 2,
|
|
338
338
|
maxArity: 2,
|
|
339
339
|
description: "Get indices of elements outside range",
|
|
@@ -347,7 +347,7 @@ var TENSOR_OPERATORS = {
|
|
|
347
347
|
},
|
|
348
348
|
"tensor/clamp": {
|
|
349
349
|
module: "tensor",
|
|
350
|
-
category: "
|
|
350
|
+
category: "ml-tensor",
|
|
351
351
|
minArity: 3,
|
|
352
352
|
maxArity: 3,
|
|
353
353
|
description: "Clamp all elements to range [min, max]",
|
|
@@ -362,7 +362,7 @@ var TENSOR_OPERATORS = {
|
|
|
362
362
|
},
|
|
363
363
|
"tensor/clampPerDim": {
|
|
364
364
|
module: "tensor",
|
|
365
|
-
category: "
|
|
365
|
+
category: "ml-tensor",
|
|
366
366
|
minArity: 2,
|
|
367
367
|
maxArity: 2,
|
|
368
368
|
description: "Clamp each dimension to its specified range",
|
|
@@ -376,7 +376,7 @@ var TENSOR_OPERATORS = {
|
|
|
376
376
|
},
|
|
377
377
|
"tensor/outOfRangeDims": {
|
|
378
378
|
module: "tensor",
|
|
379
|
-
category: "
|
|
379
|
+
category: "ml-tensor",
|
|
380
380
|
minArity: 2,
|
|
381
381
|
maxArity: 2,
|
|
382
382
|
description: "Get dimensions that exceed their specified ranges",
|
|
@@ -393,7 +393,7 @@ var TENSOR_OPERATORS = {
|
|
|
393
393
|
// ============================================================================
|
|
394
394
|
"tensor/toArray": {
|
|
395
395
|
module: "tensor",
|
|
396
|
-
category: "
|
|
396
|
+
category: "ml-tensor",
|
|
397
397
|
minArity: 1,
|
|
398
398
|
maxArity: 1,
|
|
399
399
|
description: "Convert tensor to nested array",
|
|
@@ -406,7 +406,7 @@ var TENSOR_OPERATORS = {
|
|
|
406
406
|
},
|
|
407
407
|
"tensor/toList": {
|
|
408
408
|
module: "tensor",
|
|
409
|
-
category: "
|
|
409
|
+
category: "ml-tensor",
|
|
410
410
|
minArity: 1,
|
|
411
411
|
maxArity: 1,
|
|
412
412
|
description: "Convert 1D tensor to flat array",
|