@almadar/std 16.233.0 → 16.235.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/behaviors/behaviors-registry.json +1378 -130
- package/behaviors/lolo/ui/avl/atoms/ui-avl-glyph.lolo +54 -0
- package/behaviors/lolo/ui/avl/atoms/ui-avl-state-machine.lolo +132 -0
- package/behaviors/lolo/ui/avl/atoms/ui-behavior-view.lolo +5 -6
- package/behaviors/lolo/ui/avl/atoms/ui-module-card.lolo +7 -8
- package/behaviors/lolo/ui/core/molecules/ui-code-block.lolo +74 -0
- package/behaviors/lolo/ui/core/molecules/ui-file-tree.lolo +16 -0
- package/behaviors/lolo/ui/core/organisms/ui-state-machine-view.lolo +104 -2
- package/behaviors/lolo/ui/game/atoms/ui-draw-skinned-mesh.lolo +1 -1
- package/behaviors/lolo-behavior-contracts.json +1 -1
- package/behaviors/registry/factory-signatures.json +1 -1
- package/behaviors/registry/ui/avl/atoms/ui-avl-glyph.orb +211 -0
- package/behaviors/registry/ui/avl/atoms/ui-avl-state-machine.orb +761 -0
- package/behaviors/registry/ui/avl/atoms/ui-behavior-view.orb +157 -66
- package/behaviors/registry/ui/avl/atoms/ui-module-card.orb +158 -67
- package/behaviors/registry/ui/core/molecules/ui-code-block.orb +185 -0
- package/behaviors/registry/ui/core/molecules/ui-file-tree.orb +68 -0
- package/behaviors/registry/ui/core/organisms/ui-state-machine-view.orb +487 -2
- package/behaviors/registry/ui/game/atoms/ui-draw-skinned-mesh.orb +1 -2
- package/dist/behaviors/exports-reader.js +1863 -1472
- package/dist/behaviors/functions/index.d.ts +241 -7
- package/dist/behaviors/functions/index.js +1858 -1473
- package/dist/behaviors/index.d.ts +1 -1
- package/dist/behaviors/index.js +1864 -1473
- package/dist/behaviors/query.js +1863 -1472
- package/dist/behaviors-embeddings.hash.json +3 -3
- package/dist/behaviors-embeddings.json +19 -11
- package/dist/behaviors-registry.json +1378 -130
- package/dist/index.d.ts +3 -3
- package/dist/index.js +1881 -1473
- package/dist/knob-embeddings.hash.json +3 -3
- package/dist/knob-embeddings.json +159 -7
- 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/async.js +9 -0
- package/dist/modules/behavior.d.ts +1 -1
- package/dist/modules/browser.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/core.js +8 -0
- 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 +1 -1
- package/dist/modules/index.js +17 -0
- package/dist/modules/integration.d.ts +1 -1
- package/dist/modules/json.d.ts +1 -1
- package/dist/modules/llm.d.ts +1 -1
- package/dist/modules/math.d.ts +1 -1
- package/dist/modules/memory.d.ts +1 -1
- package/dist/modules/nn.d.ts +1 -1
- package/dist/modules/noise.d.ts +1 -1
- package/dist/modules/object.d.ts +1 -1
- package/dist/modules/os.d.ts +1 -1
- package/dist/modules/path.d.ts +1 -1
- package/dist/modules/prob.d.ts +1 -1
- package/dist/modules/session.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/trace.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/modules/workspace.d.ts +1 -1
- package/dist/registry/factory-signatures.json +1 -1
- package/dist/registry.d.ts +5 -2
- package/dist/registry.js +38 -1
- package/dist/{types-DwAW4Nni.d.ts → types-Ggla7OK7.d.ts} +8 -1
- package/package.json +2 -2
package/dist/registry.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { S as StdOperatorMeta, a as StdModule, O as OperatorMeta, R as RunsOn } from './types-
|
|
1
|
+
import { S as StdOperatorMeta, a as StdModule, O as OperatorMeta, R as RunsOn, b as OperatorVisualForm } from './types-Ggla7OK7.js';
|
|
2
|
+
export { c as OPERATOR_VISUAL_FORMS } from './types-Ggla7OK7.js';
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* Standard Library Registry
|
|
@@ -152,5 +153,7 @@ declare function getStdLibStats(): {
|
|
|
152
153
|
effectOperators: number;
|
|
153
154
|
lambdaOperators: number;
|
|
154
155
|
};
|
|
156
|
+
/** The AVL circuit form of an operator: its declared form, else conveyor (takes a lambda), actuator (side effect) or block. Null when unregistered. */
|
|
157
|
+
declare function operatorVisualForm(operator: string): OperatorVisualForm | null;
|
|
155
158
|
|
|
156
|
-
export { OPERATOR_NAMES, STD_OPERATORS, STD_OPERATORS_BY_MODULE, assertOperatorArity, getAllStdOperators, getLambdaOperators, getModuleOperators, getOperatorMetaExtended, getOperatorRunsOn, getOperatorsRunningOn, getStdEffectOperators, getStdLibStats, getStdOperatorMeta, getStdOperatorsByModule, getStdPureOperators, isEffectOperatorExtended, isKnownOperatorExtended, isKnownStdOperator, isStdEffectOperator, isStdGuardOperator, validateOperatorArityExtended, validateStdOperatorArity };
|
|
159
|
+
export { OPERATOR_NAMES, OperatorVisualForm, STD_OPERATORS, STD_OPERATORS_BY_MODULE, assertOperatorArity, getAllStdOperators, getLambdaOperators, getModuleOperators, getOperatorMetaExtended, getOperatorRunsOn, getOperatorsRunningOn, getStdEffectOperators, getStdLibStats, getStdOperatorMeta, getStdOperatorsByModule, getStdPureOperators, isEffectOperatorExtended, isKnownOperatorExtended, isKnownStdOperator, isStdEffectOperator, isStdGuardOperator, operatorVisualForm, validateOperatorArityExtended, validateStdOperatorArity };
|
package/dist/registry.js
CHANGED
|
@@ -36,6 +36,19 @@ var STD_MODULES = [
|
|
|
36
36
|
"behavior",
|
|
37
37
|
"integration"
|
|
38
38
|
];
|
|
39
|
+
var OPERATOR_VISUAL_FORMS = [
|
|
40
|
+
"block",
|
|
41
|
+
"series",
|
|
42
|
+
"parallel",
|
|
43
|
+
"invert",
|
|
44
|
+
"branch",
|
|
45
|
+
"scope",
|
|
46
|
+
"template",
|
|
47
|
+
"conveyor",
|
|
48
|
+
"ladder",
|
|
49
|
+
"actuator",
|
|
50
|
+
"delay"
|
|
51
|
+
];
|
|
39
52
|
function getModuleFromOperator(operator) {
|
|
40
53
|
const parts = operator.split("/");
|
|
41
54
|
if (parts.length !== 2) return null;
|
|
@@ -253,6 +266,7 @@ var CORE_OPERATORS = {
|
|
|
253
266
|
},
|
|
254
267
|
// --- logic ------------------------------------------------------------------
|
|
255
268
|
and: {
|
|
269
|
+
visual: { form: "series" },
|
|
256
270
|
module: "core",
|
|
257
271
|
category: "logic",
|
|
258
272
|
minArity: 2,
|
|
@@ -265,6 +279,7 @@ var CORE_OPERATORS = {
|
|
|
265
279
|
example: '["and", ["=", "active", "active"], [">", 5, 0]]'
|
|
266
280
|
},
|
|
267
281
|
or: {
|
|
282
|
+
visual: { form: "parallel" },
|
|
268
283
|
module: "core",
|
|
269
284
|
category: "logic",
|
|
270
285
|
minArity: 2,
|
|
@@ -277,6 +292,7 @@ var CORE_OPERATORS = {
|
|
|
277
292
|
example: '["or", ["=", "admin", "user"], ["=", "admin", "owner"]]'
|
|
278
293
|
},
|
|
279
294
|
not: {
|
|
295
|
+
visual: { form: "invert" },
|
|
280
296
|
module: "core",
|
|
281
297
|
category: "logic",
|
|
282
298
|
minArity: 1,
|
|
@@ -288,6 +304,7 @@ var CORE_OPERATORS = {
|
|
|
288
304
|
example: '["not", false]'
|
|
289
305
|
},
|
|
290
306
|
if: {
|
|
307
|
+
visual: { form: "branch" },
|
|
291
308
|
module: "core",
|
|
292
309
|
category: "logic",
|
|
293
310
|
minArity: 3,
|
|
@@ -305,6 +322,7 @@ var CORE_OPERATORS = {
|
|
|
305
322
|
},
|
|
306
323
|
// --- control ----------------------------------------------------------------
|
|
307
324
|
let: {
|
|
325
|
+
visual: { form: "scope" },
|
|
308
326
|
module: "core",
|
|
309
327
|
category: "control",
|
|
310
328
|
minArity: 2,
|
|
@@ -323,6 +341,7 @@ var CORE_OPERATORS = {
|
|
|
323
341
|
example: '["let", [["x", 10]], ["+", "x", 1]]'
|
|
324
342
|
},
|
|
325
343
|
do: {
|
|
344
|
+
visual: { form: "ladder" },
|
|
326
345
|
module: "core",
|
|
327
346
|
category: "control",
|
|
328
347
|
minArity: 1,
|
|
@@ -345,6 +364,7 @@ var CORE_OPERATORS = {
|
|
|
345
364
|
example: '["list", "path", "method", "status"] // => ["path", "method", "status"]'
|
|
346
365
|
},
|
|
347
366
|
when: {
|
|
367
|
+
visual: { form: "branch" },
|
|
348
368
|
module: "core",
|
|
349
369
|
category: "control",
|
|
350
370
|
minArity: 2,
|
|
@@ -359,6 +379,7 @@ var CORE_OPERATORS = {
|
|
|
359
379
|
example: '["when", [">", "@entity.health", 0], ["emit", "ALIVE"]]'
|
|
360
380
|
},
|
|
361
381
|
fn: {
|
|
382
|
+
visual: { form: "template" },
|
|
362
383
|
module: "core",
|
|
363
384
|
category: "control",
|
|
364
385
|
minArity: 2,
|
|
@@ -3185,6 +3206,7 @@ var FORMAT_OPERATORS = {
|
|
|
3185
3206
|
// modules/async.ts
|
|
3186
3207
|
var ASYNC_OPERATORS = {
|
|
3187
3208
|
"async/delay": {
|
|
3209
|
+
visual: { form: "delay" },
|
|
3188
3210
|
module: "async",
|
|
3189
3211
|
category: "std-async",
|
|
3190
3212
|
minArity: 1,
|
|
@@ -3200,6 +3222,7 @@ var ASYNC_OPERATORS = {
|
|
|
3200
3222
|
example: '["async/delay", 2000, ["emit", "RETRY"]] // Wait 2s then emit'
|
|
3201
3223
|
},
|
|
3202
3224
|
"async/interval": {
|
|
3225
|
+
visual: { form: "delay" },
|
|
3203
3226
|
module: "async",
|
|
3204
3227
|
category: "std-async",
|
|
3205
3228
|
minArity: 2,
|
|
@@ -3215,6 +3238,7 @@ var ASYNC_OPERATORS = {
|
|
|
3215
3238
|
example: '["async/interval", 5000, ["emit", "POLL_TICK"]] // Emit every 5s'
|
|
3216
3239
|
},
|
|
3217
3240
|
"async/timeout": {
|
|
3241
|
+
visual: { form: "delay" },
|
|
3218
3242
|
module: "async",
|
|
3219
3243
|
category: "std-async",
|
|
3220
3244
|
minArity: 2,
|
|
@@ -3230,6 +3254,7 @@ var ASYNC_OPERATORS = {
|
|
|
3230
3254
|
example: '["async/timeout", ["call", "api", "fetchData"], 5000]'
|
|
3231
3255
|
},
|
|
3232
3256
|
"async/debounce": {
|
|
3257
|
+
visual: { form: "delay" },
|
|
3233
3258
|
module: "async",
|
|
3234
3259
|
category: "std-async",
|
|
3235
3260
|
minArity: 2,
|
|
@@ -3245,6 +3270,7 @@ var ASYNC_OPERATORS = {
|
|
|
3245
3270
|
example: '["async/debounce", "SEARCH", 300]'
|
|
3246
3271
|
},
|
|
3247
3272
|
"async/throttle": {
|
|
3273
|
+
visual: { form: "delay" },
|
|
3248
3274
|
module: "async",
|
|
3249
3275
|
category: "std-async",
|
|
3250
3276
|
minArity: 2,
|
|
@@ -3260,6 +3286,7 @@ var ASYNC_OPERATORS = {
|
|
|
3260
3286
|
example: '["async/throttle", "SCROLL", 100]'
|
|
3261
3287
|
},
|
|
3262
3288
|
"async/retry": {
|
|
3289
|
+
visual: { form: "delay" },
|
|
3263
3290
|
module: "async",
|
|
3264
3291
|
category: "std-async",
|
|
3265
3292
|
minArity: 2,
|
|
@@ -3277,6 +3304,7 @@ var ASYNC_OPERATORS = {
|
|
|
3277
3304
|
{ "attempts": 3, "backoff": "exponential", "baseDelay": 1000 }]`
|
|
3278
3305
|
},
|
|
3279
3306
|
"async/race": {
|
|
3307
|
+
visual: { form: "parallel" },
|
|
3280
3308
|
module: "async",
|
|
3281
3309
|
category: "std-async",
|
|
3282
3310
|
minArity: 2,
|
|
@@ -3289,6 +3317,7 @@ var ASYNC_OPERATORS = {
|
|
|
3289
3317
|
example: '["async/race", ["call", "api1"], ["call", "api2"]]'
|
|
3290
3318
|
},
|
|
3291
3319
|
"async/all": {
|
|
3320
|
+
visual: { form: "parallel" },
|
|
3292
3321
|
module: "async",
|
|
3293
3322
|
category: "std-async",
|
|
3294
3323
|
minArity: 2,
|
|
@@ -3301,6 +3330,7 @@ var ASYNC_OPERATORS = {
|
|
|
3301
3330
|
example: '["async/all", ["call", "api1"], ["call", "api2"]]'
|
|
3302
3331
|
},
|
|
3303
3332
|
"async/sequence": {
|
|
3333
|
+
visual: { form: "ladder" },
|
|
3304
3334
|
module: "async",
|
|
3305
3335
|
category: "std-async",
|
|
3306
3336
|
minArity: 2,
|
|
@@ -6729,5 +6759,12 @@ function getStdLibStats() {
|
|
|
6729
6759
|
lambdaOperators: getLambdaOperators().length
|
|
6730
6760
|
};
|
|
6731
6761
|
}
|
|
6762
|
+
function operatorVisualForm(operator) {
|
|
6763
|
+
const meta = getStdOperatorMeta(operator);
|
|
6764
|
+
if (!meta) return null;
|
|
6765
|
+
if (meta.visual) return meta.visual.form;
|
|
6766
|
+
if (meta.acceptsLambda) return "conveyor";
|
|
6767
|
+
return meta.hasSideEffects ? "actuator" : "block";
|
|
6768
|
+
}
|
|
6732
6769
|
|
|
6733
|
-
export { OPERATOR_NAMES, STD_OPERATORS, STD_OPERATORS_BY_MODULE, assertOperatorArity, getAllStdOperators, getLambdaOperators, getModuleOperators, getOperatorMetaExtended, getOperatorRunsOn, getOperatorsRunningOn, getStdEffectOperators, getStdLibStats, getStdOperatorMeta, getStdOperatorsByModule, getStdPureOperators, isEffectOperatorExtended, isKnownOperatorExtended, isKnownStdOperator, isStdEffectOperator, isStdGuardOperator, validateOperatorArityExtended, validateStdOperatorArity };
|
|
6770
|
+
export { OPERATOR_NAMES, OPERATOR_VISUAL_FORMS, STD_OPERATORS, STD_OPERATORS_BY_MODULE, assertOperatorArity, getAllStdOperators, getLambdaOperators, getModuleOperators, getOperatorMetaExtended, getOperatorRunsOn, getOperatorsRunningOn, getStdEffectOperators, getStdLibStats, getStdOperatorMeta, getStdOperatorsByModule, getStdPureOperators, isEffectOperatorExtended, isKnownOperatorExtended, isKnownStdOperator, isStdEffectOperator, isStdGuardOperator, operatorVisualForm, validateOperatorArityExtended, validateStdOperatorArity };
|
|
@@ -149,6 +149,9 @@ interface OperatorEffectMeta {
|
|
|
149
149
|
* Extended operator metadata for std library operators.
|
|
150
150
|
* Adds parameter descriptions and examples.
|
|
151
151
|
*/
|
|
152
|
+
/** How an operator is drawn in the AVL circuit notation (evaluation as signal flow). */
|
|
153
|
+
declare const OPERATOR_VISUAL_FORMS: readonly ["block", "series", "parallel", "invert", "branch", "scope", "template", "conveyor", "ladder", "actuator", "delay"];
|
|
154
|
+
type OperatorVisualForm = (typeof OPERATOR_VISUAL_FORMS)[number];
|
|
152
155
|
interface StdOperatorMeta extends OperatorMeta {
|
|
153
156
|
/** The std module this operator belongs to */
|
|
154
157
|
module: StdModule;
|
|
@@ -170,6 +173,10 @@ interface StdOperatorMeta extends OperatorMeta {
|
|
|
170
173
|
compileTime?: boolean;
|
|
171
174
|
/** Schema v2: structured metadata for effect operators */
|
|
172
175
|
effect?: OperatorEffectMeta;
|
|
176
|
+
/** Circuit form, declared only where it is not derivable (lambda → conveyor, side effect → actuator, else block). */
|
|
177
|
+
visual?: {
|
|
178
|
+
form: OperatorVisualForm;
|
|
179
|
+
};
|
|
173
180
|
}
|
|
174
181
|
/**
|
|
175
182
|
* Type guard to check if an operator category is a std category.
|
|
@@ -196,4 +203,4 @@ declare function isStdOperator(operator: string): boolean;
|
|
|
196
203
|
*/
|
|
197
204
|
declare function makeStdOperator(module: StdModule, fn: string): string;
|
|
198
205
|
|
|
199
|
-
export { type BasicReturnType as B, type OperatorMeta as O, type RunsOn as R, type StdOperatorMeta as S, type StdModule as a,
|
|
206
|
+
export { type BasicReturnType as B, type OperatorMeta as O, type RunsOn as R, type StdOperatorMeta as S, type StdModule as a, type OperatorVisualForm as b, OPERATOR_VISUAL_FORMS as c, OPERATOR_CATEGORIES as d, type OperatorCategory as e, type OperatorEffectMeta as f, type OperatorTypeRef as g, STD_MODULES as h, STD_OPERATOR_CATEGORIES as i, type StdOperatorCategory as j, getFunctionFromOperator as k, getModuleFromOperator as l, isStdCategory as m, isStdOperator as n, makeStdOperator as o };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@almadar/std",
|
|
3
|
-
"version": "16.
|
|
3
|
+
"version": "16.235.0",
|
|
4
4
|
"description": "Standard library operators for Almadar (math, string, array, etc.)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
"compiler": ">=4.10.0"
|
|
88
88
|
},
|
|
89
89
|
"dependencies": {
|
|
90
|
-
"@almadar/core": "^10.
|
|
90
|
+
"@almadar/core": "^10.110.0"
|
|
91
91
|
},
|
|
92
92
|
"devDependencies": {
|
|
93
93
|
"@almadar/eslint-plugin": "^2.20.0",
|