@almadar/std 16.44.0 → 16.46.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.
- package/canonical-operators.json +55 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +115 -3
- package/dist/index.js.map +1 -1
- package/dist/modules/agent.d.ts +1 -1
- package/dist/modules/anim.d.ts +1 -1
- package/dist/modules/array.d.ts +1 -1
- package/dist/modules/async.d.ts +1 -1
- package/dist/modules/composition.d.ts +1 -1
- package/dist/modules/contract.d.ts +1 -1
- package/dist/modules/core.d.ts +1 -1
- package/dist/modules/data.d.ts +1 -1
- package/dist/modules/ease.d.ts +1 -1
- package/dist/modules/format.d.ts +1 -1
- package/dist/modules/geo.d.ts +1 -1
- package/dist/modules/graph.d.ts +1 -1
- package/dist/modules/grid.d.ts +1 -1
- package/dist/modules/index.d.ts +3 -1
- package/dist/modules/index.js +97 -1
- 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/noise.d.ts +22 -0
- package/dist/modules/noise.js +56 -0
- package/dist/modules/noise.js.map +1 -0
- package/dist/modules/object.d.ts +1 -1
- package/dist/modules/os.d.ts +1 -1
- package/dist/modules/path.d.ts +22 -0
- package/dist/modules/path.js +46 -0
- package/dist/modules/path.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/time.d.ts +1 -1
- package/dist/modules/train.d.ts +1 -1
- package/dist/modules/validate.d.ts +1 -1
- package/dist/modules/vector.d.ts +1 -1
- package/dist/registry.d.ts +1 -1
- package/dist/registry.js +99 -3
- package/dist/registry.js.map +1 -1
- package/dist/{types-Bc_qzeWd.d.ts → types-cxNzLgmy.d.ts} +3 -3
- package/package.json +1 -1
package/canonical-operators.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": "2.0.0",
|
|
3
3
|
"description": "Canonical operator registry for Almadar. Generated from @almadar/std/modules. Consumed by orbital-compiler via include_str!.",
|
|
4
|
-
"generated": "2026-06-
|
|
4
|
+
"generated": "2026-06-19T13:16:14.315Z",
|
|
5
5
|
"categories": {
|
|
6
6
|
"arithmetic": {
|
|
7
7
|
"description": "Numeric operations",
|
|
@@ -160,6 +160,20 @@
|
|
|
160
160
|
"rust"
|
|
161
161
|
]
|
|
162
162
|
},
|
|
163
|
+
"std-noise": {
|
|
164
|
+
"description": "Coherent noise (procedural gen)",
|
|
165
|
+
"target": [
|
|
166
|
+
"ts",
|
|
167
|
+
"rust"
|
|
168
|
+
]
|
|
169
|
+
},
|
|
170
|
+
"std-path": {
|
|
171
|
+
"description": "Grid pathfinding",
|
|
172
|
+
"target": [
|
|
173
|
+
"ts",
|
|
174
|
+
"rust"
|
|
175
|
+
]
|
|
176
|
+
},
|
|
163
177
|
"std-nn": {
|
|
164
178
|
"description": "Neural network layer definitions",
|
|
165
179
|
"target": [
|
|
@@ -1648,6 +1662,30 @@
|
|
|
1648
1662
|
"description": "Tanh activation function: (e^x - e^-x) / (e^x + e^-x)",
|
|
1649
1663
|
"module": "nn"
|
|
1650
1664
|
},
|
|
1665
|
+
"noise/fbm": {
|
|
1666
|
+
"category": "std-noise",
|
|
1667
|
+
"minArity": 3,
|
|
1668
|
+
"maxArity": 4,
|
|
1669
|
+
"returnType": "number",
|
|
1670
|
+
"description": "Fractal Brownian motion: summed perlin octaves (clamped 1..8); output [-1,1]",
|
|
1671
|
+
"module": "noise"
|
|
1672
|
+
},
|
|
1673
|
+
"noise/perlin": {
|
|
1674
|
+
"category": "std-noise",
|
|
1675
|
+
"minArity": 2,
|
|
1676
|
+
"maxArity": 3,
|
|
1677
|
+
"returnType": "number",
|
|
1678
|
+
"description": "2D Perlin noise at (x,y) with optional seed; output [-1,1]",
|
|
1679
|
+
"module": "noise"
|
|
1680
|
+
},
|
|
1681
|
+
"noise/simplex": {
|
|
1682
|
+
"category": "std-noise",
|
|
1683
|
+
"minArity": 2,
|
|
1684
|
+
"maxArity": 3,
|
|
1685
|
+
"returnType": "number",
|
|
1686
|
+
"description": "Value-coherent noise (perlin-derived) at (x,y) with optional seed; output [-1,1]",
|
|
1687
|
+
"module": "noise"
|
|
1688
|
+
},
|
|
1651
1689
|
"not": {
|
|
1652
1690
|
"category": "logic",
|
|
1653
1691
|
"minArity": 1,
|
|
@@ -1903,6 +1941,22 @@
|
|
|
1903
1941
|
"description": "Build a dot-separated path string from segments. Used with set effect for dynamic field paths.",
|
|
1904
1942
|
"module": "object"
|
|
1905
1943
|
},
|
|
1944
|
+
"path/astar": {
|
|
1945
|
+
"category": "std-path",
|
|
1946
|
+
"minArity": 5,
|
|
1947
|
+
"maxArity": 6,
|
|
1948
|
+
"returnType": "array",
|
|
1949
|
+
"description": "A* shortest path on a w×h grid; returns cells start→goal (incl. both) or [] if none",
|
|
1950
|
+
"module": "path"
|
|
1951
|
+
},
|
|
1952
|
+
"path/reachable": {
|
|
1953
|
+
"category": "std-path",
|
|
1954
|
+
"minArity": 5,
|
|
1955
|
+
"maxArity": 6,
|
|
1956
|
+
"returnType": "array",
|
|
1957
|
+
"description": "BFS cells reachable within N moves from start (incl. start); sorted row-major",
|
|
1958
|
+
"module": "path"
|
|
1959
|
+
},
|
|
1906
1960
|
"persist": {
|
|
1907
1961
|
"category": "effect",
|
|
1908
1962
|
"minArity": 2,
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as StdModule, S as StdOperatorMeta } from './types-
|
|
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-
|
|
1
|
+
import { a as StdModule, S as StdOperatorMeta } from './types-cxNzLgmy.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-cxNzLgmy.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
|
@@ -36,6 +36,8 @@ var OPERATOR_CATEGORIES = [
|
|
|
36
36
|
"std-grid",
|
|
37
37
|
"std-anim",
|
|
38
38
|
"std-ease",
|
|
39
|
+
"std-noise",
|
|
40
|
+
"std-path",
|
|
39
41
|
"ml-arch",
|
|
40
42
|
"ml-effect",
|
|
41
43
|
"ml-tensor",
|
|
@@ -67,7 +69,9 @@ var STD_MODULES = [
|
|
|
67
69
|
"geo",
|
|
68
70
|
"grid",
|
|
69
71
|
"anim",
|
|
70
|
-
"ease"
|
|
72
|
+
"ease",
|
|
73
|
+
"noise",
|
|
74
|
+
"path"
|
|
71
75
|
];
|
|
72
76
|
var STD_OPERATOR_CATEGORIES = [
|
|
73
77
|
"std-math",
|
|
@@ -90,6 +94,8 @@ var STD_OPERATOR_CATEGORIES = [
|
|
|
90
94
|
"std-grid",
|
|
91
95
|
"std-anim",
|
|
92
96
|
"std-ease",
|
|
97
|
+
"std-noise",
|
|
98
|
+
"std-path",
|
|
93
99
|
"ml-arch",
|
|
94
100
|
"ml-effect",
|
|
95
101
|
"ml-tensor",
|
|
@@ -5328,6 +5334,96 @@ var EASE_OPERATORS = {
|
|
|
5328
5334
|
}
|
|
5329
5335
|
};
|
|
5330
5336
|
|
|
5337
|
+
// modules/noise.ts
|
|
5338
|
+
var NOISE_OPERATORS = {
|
|
5339
|
+
"noise/perlin": {
|
|
5340
|
+
module: "noise",
|
|
5341
|
+
category: "std-noise",
|
|
5342
|
+
minArity: 2,
|
|
5343
|
+
maxArity: 3,
|
|
5344
|
+
description: "2D Perlin noise at (x,y) with optional seed; output [-1,1]",
|
|
5345
|
+
hasSideEffects: false,
|
|
5346
|
+
returnType: "number",
|
|
5347
|
+
params: [
|
|
5348
|
+
{ name: "x", type: "number", description: "X coordinate" },
|
|
5349
|
+
{ name: "y", type: "number", description: "Y coordinate" },
|
|
5350
|
+
{ name: "seed", type: "number", description: "Optional integer seed (default 0)", optional: true }
|
|
5351
|
+
],
|
|
5352
|
+
example: '["noise/perlin", 1.5, 2.5, 0] // => coherent value in [-1,1]'
|
|
5353
|
+
},
|
|
5354
|
+
"noise/simplex": {
|
|
5355
|
+
module: "noise",
|
|
5356
|
+
category: "std-noise",
|
|
5357
|
+
minArity: 2,
|
|
5358
|
+
maxArity: 3,
|
|
5359
|
+
description: "Value-coherent noise (perlin-derived) at (x,y) with optional seed; output [-1,1]",
|
|
5360
|
+
hasSideEffects: false,
|
|
5361
|
+
returnType: "number",
|
|
5362
|
+
params: [
|
|
5363
|
+
{ name: "x", type: "number", description: "X coordinate" },
|
|
5364
|
+
{ name: "y", type: "number", description: "Y coordinate" },
|
|
5365
|
+
{ name: "seed", type: "number", description: "Optional integer seed (default 0)", optional: true }
|
|
5366
|
+
],
|
|
5367
|
+
example: '["noise/simplex", 1.5, 2.5, 0] // => coherent value in [-1,1]'
|
|
5368
|
+
},
|
|
5369
|
+
"noise/fbm": {
|
|
5370
|
+
module: "noise",
|
|
5371
|
+
category: "std-noise",
|
|
5372
|
+
minArity: 3,
|
|
5373
|
+
maxArity: 4,
|
|
5374
|
+
description: "Fractal Brownian motion: summed perlin octaves (clamped 1..8); output [-1,1]",
|
|
5375
|
+
hasSideEffects: false,
|
|
5376
|
+
returnType: "number",
|
|
5377
|
+
params: [
|
|
5378
|
+
{ name: "x", type: "number", description: "X coordinate" },
|
|
5379
|
+
{ name: "y", type: "number", description: "Y coordinate" },
|
|
5380
|
+
{ name: "octaves", type: "number", description: "Octave count (floored, clamped to 1..8)" },
|
|
5381
|
+
{ name: "seed", type: "number", description: "Optional integer seed (default 0)", optional: true }
|
|
5382
|
+
],
|
|
5383
|
+
example: '["noise/fbm", 1.5, 2.5, 4, 0] // => layered value in [-1,1]'
|
|
5384
|
+
}
|
|
5385
|
+
};
|
|
5386
|
+
|
|
5387
|
+
// modules/path.ts
|
|
5388
|
+
var PATH_OPERATORS = {
|
|
5389
|
+
"path/astar": {
|
|
5390
|
+
module: "path",
|
|
5391
|
+
category: "std-path",
|
|
5392
|
+
minArity: 5,
|
|
5393
|
+
maxArity: 6,
|
|
5394
|
+
description: "A* shortest path on a w\xD7h grid; returns cells start\u2192goal (incl. both) or [] if none",
|
|
5395
|
+
hasSideEffects: false,
|
|
5396
|
+
returnType: "array",
|
|
5397
|
+
params: [
|
|
5398
|
+
{ name: "start", type: "vector", description: "Start cell {x,y}" },
|
|
5399
|
+
{ name: "goal", type: "vector", description: "Goal cell {x,y}" },
|
|
5400
|
+
{ name: "blocked", type: { kind: "array", of: "vector" }, description: "Blocked cells [{x,y}, ...]" },
|
|
5401
|
+
{ name: "w", type: "number", description: "Grid width (x in [0,w))" },
|
|
5402
|
+
{ name: "h", type: "number", description: "Grid height (y in [0,h))" },
|
|
5403
|
+
{ name: "diagonal", type: "boolean", description: "Allow 8-direction moves (default false)", optional: true }
|
|
5404
|
+
],
|
|
5405
|
+
example: '["path/astar", {"x":0,"y":0}, {"x":2,"y":0}, [], 3, 1] // => [{"x":0,"y":0},{"x":1,"y":0},{"x":2,"y":0}]'
|
|
5406
|
+
},
|
|
5407
|
+
"path/reachable": {
|
|
5408
|
+
module: "path",
|
|
5409
|
+
category: "std-path",
|
|
5410
|
+
minArity: 5,
|
|
5411
|
+
maxArity: 6,
|
|
5412
|
+
description: "BFS cells reachable within N moves from start (incl. start); sorted row-major",
|
|
5413
|
+
hasSideEffects: false,
|
|
5414
|
+
returnType: "array",
|
|
5415
|
+
params: [
|
|
5416
|
+
{ name: "start", type: "vector", description: "Start cell {x,y}" },
|
|
5417
|
+
{ name: "steps", type: "number", description: "Maximum number of moves" },
|
|
5418
|
+
{ name: "blocked", type: { kind: "array", of: "vector" }, description: "Blocked cells [{x,y}, ...]" },
|
|
5419
|
+
{ name: "w", type: "number", description: "Grid width (x in [0,w))" },
|
|
5420
|
+
{ name: "h", type: "number", description: "Grid height (y in [0,h))" },
|
|
5421
|
+
{ name: "diagonal", type: "boolean", description: "Allow 8-direction moves (default false)", optional: true }
|
|
5422
|
+
],
|
|
5423
|
+
example: '["path/reachable", {"x":1,"y":1}, 1, [], 3, 3, false] // => 5 cross-shaped cells, row-major'
|
|
5424
|
+
}
|
|
5425
|
+
};
|
|
5426
|
+
|
|
5331
5427
|
// registry.ts
|
|
5332
5428
|
var STD_OPERATORS = {
|
|
5333
5429
|
...CORE_OPERATORS,
|
|
@@ -5350,7 +5446,9 @@ var STD_OPERATORS = {
|
|
|
5350
5446
|
...GEO_OPERATORS,
|
|
5351
5447
|
...GRID_OPERATORS,
|
|
5352
5448
|
...ANIM_OPERATORS,
|
|
5353
|
-
...EASE_OPERATORS
|
|
5449
|
+
...EASE_OPERATORS,
|
|
5450
|
+
...NOISE_OPERATORS,
|
|
5451
|
+
...PATH_OPERATORS
|
|
5354
5452
|
};
|
|
5355
5453
|
var OPERATOR_NAMES = Object.keys(STD_OPERATORS);
|
|
5356
5454
|
var STD_OPERATORS_BY_MODULE = {
|
|
@@ -5374,7 +5472,9 @@ var STD_OPERATORS_BY_MODULE = {
|
|
|
5374
5472
|
geo: GEO_OPERATORS,
|
|
5375
5473
|
grid: GRID_OPERATORS,
|
|
5376
5474
|
anim: ANIM_OPERATORS,
|
|
5377
|
-
ease: EASE_OPERATORS
|
|
5475
|
+
ease: EASE_OPERATORS,
|
|
5476
|
+
noise: NOISE_OPERATORS,
|
|
5477
|
+
path: PATH_OPERATORS
|
|
5378
5478
|
};
|
|
5379
5479
|
function getStdOperatorMeta(operator) {
|
|
5380
5480
|
return STD_OPERATORS[operator];
|
|
@@ -105236,6 +105336,18 @@ var MODULE_DESCRIPTIONS = {
|
|
|
105236
105336
|
displayName: "Easing Curves",
|
|
105237
105337
|
description: "Penner easing curves and smoothstep interpolation.",
|
|
105238
105338
|
icon: "\u303D\uFE0F"
|
|
105339
|
+
},
|
|
105340
|
+
noise: {
|
|
105341
|
+
name: "Noise",
|
|
105342
|
+
displayName: "Coherent Noise",
|
|
105343
|
+
description: "Deterministic perlin-derived coherent noise (perlin/simplex/fbm) for procedural generation.",
|
|
105344
|
+
icon: "\u{1F32B}\uFE0F"
|
|
105345
|
+
},
|
|
105346
|
+
path: {
|
|
105347
|
+
name: "Path",
|
|
105348
|
+
displayName: "Grid Pathfinding",
|
|
105349
|
+
description: "Deterministic A* shortest path and BFS reachability over integer grid cells.",
|
|
105350
|
+
icon: "\u{1F9ED}"
|
|
105239
105351
|
}
|
|
105240
105352
|
};
|
|
105241
105353
|
var BEHAVIOR_GROUPINGS = {
|