@almadar/std 6.4.1 → 6.5.1

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 (40) hide show
  1. package/behaviors/registry/atoms/std-search.orb +2 -2
  2. package/behaviors/registry/atoms/std-selection.orb +2 -2
  3. package/behaviors/registry/atoms/std-sort.orb +2 -2
  4. package/behaviors/registry/atoms/std-sprite.orb +2 -2
  5. package/dist/behaviors/registry/atoms/std-search.orb +2 -2
  6. package/dist/behaviors/registry/atoms/std-selection.orb +2 -2
  7. package/dist/behaviors/registry/atoms/std-sort.orb +2 -2
  8. package/dist/behaviors/registry/atoms/std-sprite.orb +2 -2
  9. package/dist/index.d.ts +4 -3
  10. package/dist/index.js +680 -2
  11. package/dist/index.js.map +1 -1
  12. package/dist/modules/agent.d.ts +1 -1
  13. package/dist/modules/array.d.ts +1 -1
  14. package/dist/modules/async.d.ts +1 -1
  15. package/dist/modules/composition.d.ts +1 -1
  16. package/dist/modules/contract.d.ts +1 -1
  17. package/dist/modules/core.d.ts +27 -0
  18. package/dist/modules/core.js +607 -0
  19. package/dist/modules/core.js.map +1 -0
  20. package/dist/modules/data.d.ts +1 -1
  21. package/dist/modules/format.d.ts +1 -1
  22. package/dist/modules/graph.d.ts +1 -1
  23. package/dist/modules/index.d.ts +2 -1
  24. package/dist/modules/index.js +605 -1
  25. package/dist/modules/index.js.map +1 -1
  26. package/dist/modules/math.d.ts +1 -1
  27. package/dist/modules/nn.d.ts +1 -1
  28. package/dist/modules/object.d.ts +1 -1
  29. package/dist/modules/os.d.ts +1 -1
  30. package/dist/modules/prob.d.ts +1 -1
  31. package/dist/modules/str.d.ts +1 -1
  32. package/dist/modules/tensor.d.ts +1 -1
  33. package/dist/modules/time.d.ts +1 -1
  34. package/dist/modules/train.d.ts +1 -1
  35. package/dist/modules/validate.d.ts +1 -1
  36. package/dist/registry.d.ts +7 -3
  37. package/dist/registry.js +606 -1
  38. package/dist/registry.js.map +1 -1
  39. package/dist/{types-hu1LavLs.d.ts → types-D7dG8fBF.d.ts} +62 -3
  40. package/package.json +2 -3
@@ -1,4 +1,4 @@
1
- import { S as StdOperatorMeta } from '../types-hu1LavLs.js';
1
+ import { S as StdOperatorMeta } from '../types-D7dG8fBF.js';
2
2
 
3
3
  /**
4
4
  * Agent Module - AI Agent Intelligence Operations
@@ -1,4 +1,4 @@
1
- import { S as StdOperatorMeta } from '../types-hu1LavLs.js';
1
+ import { S as StdOperatorMeta } from '../types-D7dG8fBF.js';
2
2
 
3
3
  /**
4
4
  * Array Module - Collection Operations
@@ -1,4 +1,4 @@
1
- import { S as StdOperatorMeta } from '../types-hu1LavLs.js';
1
+ import { S as StdOperatorMeta } from '../types-D7dG8fBF.js';
2
2
 
3
3
  /**
4
4
  * Async Module - Asynchronous Operations
@@ -1,4 +1,4 @@
1
- import { S as StdOperatorMeta } from '../types-hu1LavLs.js';
1
+ import { S as StdOperatorMeta } from '../types-D7dG8fBF.js';
2
2
 
3
3
  /**
4
4
  * Composition Module - Behavior Composition Operators
@@ -1,4 +1,4 @@
1
- import { S as StdOperatorMeta } from '../types-hu1LavLs.js';
1
+ import { S as StdOperatorMeta } from '../types-D7dG8fBF.js';
2
2
 
3
3
  /**
4
4
  * Contract Module - ML Contract Validation Operations
@@ -0,0 +1,27 @@
1
+ import { S as StdOperatorMeta } from '../types-D7dG8fBF.js';
2
+
3
+ /**
4
+ * Core Module - Language Primitives
5
+ *
6
+ * The 28 unnamespaced S-expression operators that form the .orb language core:
7
+ * arithmetic primitives, comparison, logic, control flow, and effects.
8
+ *
9
+ * These operators existed in the retired `@almadar/operators` package prior to
10
+ * its merge into `@almadar/std`. They live here alongside the library modules
11
+ * (math, str, array, etc.) so the whole operator surface has one home.
12
+ *
13
+ * Effect operators declare rich Schema v2 params and effect metadata so
14
+ * validators, LLM prompt generators, and the Rust compiler can reason about
15
+ * shapes (literal unions for persist actions, UISlot for render-ui, event keys
16
+ * for emit) instead of relying on string heuristics.
17
+ *
18
+ * @packageDocumentation
19
+ */
20
+
21
+ declare const CORE_OPERATORS: Record<string, StdOperatorMeta>;
22
+ /**
23
+ * Get all core operator names.
24
+ */
25
+ declare function getCoreOperators(): string[];
26
+
27
+ export { CORE_OPERATORS, getCoreOperators };
@@ -0,0 +1,607 @@
1
+ // modules/core.ts
2
+ var NUMBER = "number";
3
+ var BOOLEAN = "boolean";
4
+ var STRING = "string";
5
+ var ANY = "any";
6
+ var SEXPR = { kind: "sexpr" };
7
+ var BINDING = { kind: "binding" };
8
+ var ENTITY_REF = { kind: "entityRef" };
9
+ var EVENT_KEY = { kind: "eventKey" };
10
+ var UI_SLOT = { kind: "uiSlot" };
11
+ var PATTERN_TYPE = { kind: "patternType" };
12
+ var PERSIST_ACTION = {
13
+ kind: "union",
14
+ of: [
15
+ { kind: "literal", value: "create" },
16
+ { kind: "literal", value: "update" },
17
+ { kind: "literal", value: "delete" },
18
+ { kind: "literal", value: "clear" },
19
+ { kind: "literal", value: "batch" }
20
+ ]
21
+ };
22
+ var SET_OPERATION = {
23
+ kind: "union",
24
+ of: [
25
+ { kind: "literal", value: "increment" },
26
+ { kind: "literal", value: "decrement" },
27
+ { kind: "literal", value: "multiply" },
28
+ { kind: "literal", value: "append" },
29
+ { kind: "literal", value: "remove" }
30
+ ]
31
+ };
32
+ var NOTIFY_CHANNEL = {
33
+ kind: "union",
34
+ of: [
35
+ { kind: "literal", value: "email" },
36
+ { kind: "literal", value: "push" },
37
+ { kind: "literal", value: "sms" },
38
+ { kind: "literal", value: "in_app" }
39
+ ]
40
+ };
41
+ var CORE_OPERATORS = {
42
+ // --- arithmetic primitives --------------------------------------------------
43
+ "+": {
44
+ module: "core",
45
+ category: "arithmetic",
46
+ minArity: 2,
47
+ maxArity: null,
48
+ description: "Add numbers",
49
+ hasSideEffects: false,
50
+ returnType: "number",
51
+ params: [{ name: "...nums", type: NUMBER, description: "Numbers to sum" }],
52
+ example: '["+", 1, 2, 3] // => 6'
53
+ },
54
+ "-": {
55
+ module: "core",
56
+ category: "arithmetic",
57
+ minArity: 1,
58
+ maxArity: 2,
59
+ description: "Subtract or negate",
60
+ hasSideEffects: false,
61
+ returnType: "number",
62
+ params: [
63
+ { name: "a", type: NUMBER, description: "Left operand or value to negate" },
64
+ { name: "b", type: NUMBER, description: "Right operand", optional: true }
65
+ ],
66
+ example: '["-", 5, 2] // => 3; ["-", 5] // => -5'
67
+ },
68
+ "*": {
69
+ module: "core",
70
+ category: "arithmetic",
71
+ minArity: 2,
72
+ maxArity: null,
73
+ description: "Multiply numbers",
74
+ hasSideEffects: false,
75
+ returnType: "number",
76
+ params: [{ name: "...nums", type: NUMBER, description: "Numbers to multiply" }],
77
+ example: '["*", 2, 3, 4] // => 24'
78
+ },
79
+ "/": {
80
+ module: "core",
81
+ category: "arithmetic",
82
+ minArity: 2,
83
+ maxArity: 2,
84
+ description: "Divide numbers",
85
+ hasSideEffects: false,
86
+ returnType: "number",
87
+ params: [
88
+ { name: "a", type: NUMBER, description: "Numerator" },
89
+ { name: "b", type: NUMBER, description: "Denominator" }
90
+ ],
91
+ example: '["/", 10, 2] // => 5'
92
+ },
93
+ "%": {
94
+ module: "core",
95
+ category: "arithmetic",
96
+ minArity: 2,
97
+ maxArity: 2,
98
+ description: "Modulo (remainder)",
99
+ hasSideEffects: false,
100
+ returnType: "number",
101
+ params: [
102
+ { name: "a", type: NUMBER, description: "Dividend" },
103
+ { name: "b", type: NUMBER, description: "Divisor" }
104
+ ],
105
+ example: '["%", 10, 3] // => 1'
106
+ },
107
+ // --- comparison -------------------------------------------------------------
108
+ "=": {
109
+ module: "core",
110
+ category: "comparison",
111
+ minArity: 2,
112
+ maxArity: 2,
113
+ description: "Equal to",
114
+ hasSideEffects: false,
115
+ returnType: "boolean",
116
+ params: [
117
+ { name: "a", type: ANY, description: "Left operand" },
118
+ { name: "b", type: ANY, description: "Right operand" }
119
+ ],
120
+ example: '["=", "@entity.status", "active"]'
121
+ },
122
+ "!=": {
123
+ module: "core",
124
+ category: "comparison",
125
+ minArity: 2,
126
+ maxArity: 2,
127
+ description: "Not equal to",
128
+ hasSideEffects: false,
129
+ returnType: "boolean",
130
+ params: [
131
+ { name: "a", type: ANY, description: "Left operand" },
132
+ { name: "b", type: ANY, description: "Right operand" }
133
+ ],
134
+ example: '["!=", "@entity.id", null]'
135
+ },
136
+ "<": {
137
+ module: "core",
138
+ category: "comparison",
139
+ minArity: 2,
140
+ maxArity: 2,
141
+ description: "Less than",
142
+ hasSideEffects: false,
143
+ returnType: "boolean",
144
+ params: [
145
+ { name: "a", type: NUMBER, description: "Left operand" },
146
+ { name: "b", type: NUMBER, description: "Right operand" }
147
+ ],
148
+ example: '["<", "@entity.health", 10]'
149
+ },
150
+ ">": {
151
+ module: "core",
152
+ category: "comparison",
153
+ minArity: 2,
154
+ maxArity: 2,
155
+ description: "Greater than",
156
+ hasSideEffects: false,
157
+ returnType: "boolean",
158
+ params: [
159
+ { name: "a", type: NUMBER, description: "Left operand" },
160
+ { name: "b", type: NUMBER, description: "Right operand" }
161
+ ],
162
+ example: '[">", "@entity.score", 0]'
163
+ },
164
+ "<=": {
165
+ module: "core",
166
+ category: "comparison",
167
+ minArity: 2,
168
+ maxArity: 2,
169
+ description: "Less than or equal",
170
+ hasSideEffects: false,
171
+ returnType: "boolean",
172
+ params: [
173
+ { name: "a", type: NUMBER, description: "Left operand" },
174
+ { name: "b", type: NUMBER, description: "Right operand" }
175
+ ],
176
+ example: '["<=", "@entity.count", 100]'
177
+ },
178
+ ">=": {
179
+ module: "core",
180
+ category: "comparison",
181
+ minArity: 2,
182
+ maxArity: 2,
183
+ description: "Greater than or equal",
184
+ hasSideEffects: false,
185
+ returnType: "boolean",
186
+ params: [
187
+ { name: "a", type: NUMBER, description: "Left operand" },
188
+ { name: "b", type: NUMBER, description: "Right operand" }
189
+ ],
190
+ example: '[">=", "@entity.age", 18]'
191
+ },
192
+ // --- logic ------------------------------------------------------------------
193
+ and: {
194
+ module: "core",
195
+ category: "logic",
196
+ minArity: 2,
197
+ maxArity: null,
198
+ description: "Logical AND",
199
+ hasSideEffects: false,
200
+ returnType: "boolean",
201
+ params: [{ name: "...conds", type: BOOLEAN, description: "Boolean expressions to AND" }],
202
+ example: '["and", ["=", "@entity.active", true], [">", "@entity.score", 0]]'
203
+ },
204
+ or: {
205
+ module: "core",
206
+ category: "logic",
207
+ minArity: 2,
208
+ maxArity: null,
209
+ description: "Logical OR",
210
+ hasSideEffects: false,
211
+ returnType: "boolean",
212
+ params: [{ name: "...conds", type: BOOLEAN, description: "Boolean expressions to OR" }],
213
+ example: '["or", ["=", "@entity.role", "admin"], ["=", "@entity.role", "owner"]]'
214
+ },
215
+ not: {
216
+ module: "core",
217
+ category: "logic",
218
+ minArity: 1,
219
+ maxArity: 1,
220
+ description: "Logical NOT",
221
+ hasSideEffects: false,
222
+ returnType: "boolean",
223
+ params: [{ name: "cond", type: BOOLEAN, description: "Boolean to negate" }],
224
+ example: '["not", "@entity.disabled"]'
225
+ },
226
+ if: {
227
+ module: "core",
228
+ category: "logic",
229
+ minArity: 3,
230
+ maxArity: 3,
231
+ description: "Conditional expression (ternary)",
232
+ hasSideEffects: false,
233
+ returnType: "any",
234
+ params: [
235
+ { name: "cond", type: BOOLEAN, description: "Condition to evaluate" },
236
+ { name: "then", type: ANY, description: "Value or effect if true" },
237
+ { name: "else", type: ANY, description: "Value or effect if false" }
238
+ ],
239
+ example: '["if", [">", "@entity.health", 0], "alive", "dead"]'
240
+ },
241
+ // --- control ----------------------------------------------------------------
242
+ let: {
243
+ module: "core",
244
+ category: "control",
245
+ minArity: 2,
246
+ maxArity: 2,
247
+ description: "Bind local variables for a body expression",
248
+ hasSideEffects: false,
249
+ returnType: "any",
250
+ params: [
251
+ {
252
+ name: "bindings",
253
+ type: { kind: "array", of: { kind: "array", of: ANY } },
254
+ description: "Array of [name, value] pairs"
255
+ },
256
+ { name: "body", type: SEXPR, description: "Expression or effect list using the bindings" }
257
+ ],
258
+ example: '["let", [["x", 10]], ["+", "x", 1]]'
259
+ },
260
+ do: {
261
+ module: "core",
262
+ category: "control",
263
+ minArity: 1,
264
+ maxArity: null,
265
+ description: "Sequential execution of multiple effects/expressions",
266
+ hasSideEffects: false,
267
+ returnType: "any",
268
+ params: [{ name: "...exprs", type: SEXPR, description: "Effects/expressions to run in order" }],
269
+ example: '["do", ["set", "@entity.x", 0], ["set", "@entity.y", 0]]'
270
+ },
271
+ when: {
272
+ module: "core",
273
+ category: "control",
274
+ minArity: 2,
275
+ maxArity: 2,
276
+ description: "Conditional effect without an else branch",
277
+ hasSideEffects: false,
278
+ returnType: "void",
279
+ params: [
280
+ { name: "cond", type: BOOLEAN, description: "Guard expression" },
281
+ { name: "effect", type: SEXPR, description: "Effect to run if cond is true" }
282
+ ],
283
+ example: '["when", [">", "@entity.health", 0], ["emit", "ALIVE"]]'
284
+ },
285
+ fn: {
286
+ module: "core",
287
+ category: "control",
288
+ minArity: 2,
289
+ maxArity: 2,
290
+ description: "Lambda expression (used for per-item renders and transforms)",
291
+ hasSideEffects: false,
292
+ returnType: "function",
293
+ acceptsLambda: true,
294
+ lambdaArgPosition: 1,
295
+ params: [
296
+ { name: "paramName", type: STRING, description: "Name of the parameter binding" },
297
+ { name: "body", type: SEXPR, description: "Expression evaluated per invocation" }
298
+ ],
299
+ example: '["fn", "item", { "type": "typography", "content": "@item.title" }]'
300
+ },
301
+ // --- effect -----------------------------------------------------------------
302
+ set: {
303
+ module: "core",
304
+ category: "effect",
305
+ minArity: 2,
306
+ maxArity: 2,
307
+ description: "Set a binding to a value",
308
+ hasSideEffects: true,
309
+ returnType: "void",
310
+ params: [
311
+ { name: "binding", type: BINDING, description: 'Target binding (e.g. "@entity.field")' },
312
+ { name: "value", type: ANY, description: "Value to assign (literal or expression)" }
313
+ ],
314
+ example: '["set", "@entity.health", 100]',
315
+ effect: {
316
+ kind: "set",
317
+ // success emit carries the written value; the evaluator coerces to the
318
+ // binding's declared type, so 'any' is the general shape. A future pass
319
+ // can narrow per-binding via resolveBinding.
320
+ produces: ANY,
321
+ config: { operation: SET_OPERATION }
322
+ }
323
+ },
324
+ emit: {
325
+ module: "core",
326
+ category: "effect",
327
+ minArity: 1,
328
+ maxArity: 2,
329
+ description: "Emit an event onto the bus",
330
+ hasSideEffects: true,
331
+ returnType: "void",
332
+ params: [
333
+ { name: "event", type: EVENT_KEY, description: "Event key" },
334
+ { name: "payload", type: ENTITY_REF, description: "Optional payload", optional: true }
335
+ ],
336
+ example: '["emit", "PLAYER_DIED", { "playerId": "@entity.id" }]',
337
+ effect: {
338
+ kind: "emit",
339
+ produces: {
340
+ kind: "object",
341
+ fields: { event: EVENT_KEY, payload: ANY },
342
+ open: true
343
+ }
344
+ }
345
+ },
346
+ persist: {
347
+ module: "core",
348
+ category: "effect",
349
+ minArity: 2,
350
+ maxArity: 3,
351
+ description: "Create, update, delete, clear, or batch entity records",
352
+ hasSideEffects: true,
353
+ returnType: "void",
354
+ params: [
355
+ { name: "action", type: PERSIST_ACTION, description: "Persist action" },
356
+ { name: "entity", type: { kind: "entity" }, description: "Target entity name" },
357
+ { name: "data", type: ENTITY_REF, description: "Payload (create/update) or entity id (delete)", optional: true }
358
+ ],
359
+ example: '["persist", "create", "Task", { "title": "@payload.title" }]',
360
+ effect: {
361
+ kind: "persist",
362
+ // Action-discriminated union. The compiler narrows at the call site
363
+ // based on the action arg literal to pick the right branch when
364
+ // checking the emit.success event's declared payload.
365
+ // create/update -> the resulting entity record
366
+ // delete/clear -> { id, deleted }
367
+ // batch -> summary of operations
368
+ produces: {
369
+ kind: "union",
370
+ of: [
371
+ { kind: "entity" },
372
+ {
373
+ kind: "object",
374
+ fields: { id: STRING, deleted: BOOLEAN },
375
+ open: false
376
+ },
377
+ {
378
+ kind: "object",
379
+ fields: {
380
+ operations: { kind: "array", of: ANY },
381
+ completedCount: NUMBER,
382
+ totalCount: NUMBER
383
+ },
384
+ open: false
385
+ }
386
+ ]
387
+ }
388
+ }
389
+ },
390
+ navigate: {
391
+ module: "core",
392
+ category: "effect",
393
+ minArity: 1,
394
+ maxArity: 2,
395
+ description: "Navigate to a route",
396
+ hasSideEffects: true,
397
+ returnType: "void",
398
+ params: [
399
+ { name: "path", type: STRING, description: "Route path (supports :param placeholders)" },
400
+ {
401
+ name: "params",
402
+ type: { kind: "object", fields: {}, open: true },
403
+ description: "Optional route params",
404
+ optional: true
405
+ }
406
+ ],
407
+ example: '["navigate", "/tasks/:id", { "id": "@entity.id" }]',
408
+ effect: { kind: "navigate" }
409
+ },
410
+ notify: {
411
+ module: "core",
412
+ category: "effect",
413
+ minArity: 1,
414
+ maxArity: 2,
415
+ description: "Show a notification (in-app, email, push, sms)",
416
+ hasSideEffects: true,
417
+ returnType: "void",
418
+ params: [
419
+ { name: "channel", type: NOTIFY_CHANNEL, description: "Delivery channel" },
420
+ { name: "message", type: STRING, description: "Message body", optional: true }
421
+ ],
422
+ example: '["notify", "in_app", "Task created successfully"]',
423
+ effect: { kind: "notify" }
424
+ },
425
+ spawn: {
426
+ module: "core",
427
+ category: "effect",
428
+ minArity: 1,
429
+ maxArity: 2,
430
+ description: "Spawn a new entity instance (games)",
431
+ hasSideEffects: true,
432
+ returnType: "void",
433
+ params: [
434
+ { name: "entity", type: { kind: "entity" }, description: "Entity name to spawn" },
435
+ {
436
+ name: "initialState",
437
+ type: { kind: "object", fields: {}, open: true },
438
+ description: "Initial field values",
439
+ optional: true
440
+ }
441
+ ],
442
+ example: '["spawn", "Bullet", { "x": "@entity.x", "y": "@entity.y" }]',
443
+ effect: { kind: "spawn" }
444
+ },
445
+ despawn: {
446
+ module: "core",
447
+ category: "effect",
448
+ minArity: 0,
449
+ maxArity: 1,
450
+ description: "Despawn an entity instance (games)",
451
+ hasSideEffects: true,
452
+ returnType: "void",
453
+ params: [
454
+ { name: "entityId", type: STRING, description: "Target entity id (defaults to @entity.id)", optional: true }
455
+ ],
456
+ example: '["despawn", "@entity.id"]',
457
+ effect: { kind: "despawn" }
458
+ },
459
+ fetch: {
460
+ module: "core",
461
+ category: "effect",
462
+ minArity: 1,
463
+ maxArity: 2,
464
+ description: "Fetch an entity (by id) or a collection (by filter) from persistence",
465
+ hasSideEffects: true,
466
+ returnType: "void",
467
+ params: [
468
+ { name: "entity", type: { kind: "entity" }, description: "Target entity name" },
469
+ {
470
+ name: "options",
471
+ type: {
472
+ kind: "object",
473
+ fields: {
474
+ id: STRING,
475
+ filter: ANY,
476
+ limit: NUMBER,
477
+ offset: NUMBER,
478
+ include: { kind: "array", of: STRING },
479
+ emit: { kind: "object", fields: {}, open: true }
480
+ },
481
+ open: true
482
+ },
483
+ description: "Fetch options: id | filter | limit | offset | include | emit",
484
+ optional: true
485
+ }
486
+ ],
487
+ example: '["fetch", "Task", { "id": "@payload.taskId", "emit": { "success": "TASK_LOADED" } }]',
488
+ effect: {
489
+ kind: "fetch",
490
+ // Call-site-discriminated union: options.id present -> single entity;
491
+ // otherwise -> array of entity. The compiler narrows at the call site
492
+ // when checking emit.success against the declared event payload.
493
+ produces: {
494
+ kind: "union",
495
+ of: [
496
+ { kind: "entity" },
497
+ { kind: "array", of: { kind: "entity" } }
498
+ ]
499
+ }
500
+ }
501
+ },
502
+ ref: {
503
+ module: "core",
504
+ category: "effect",
505
+ minArity: 1,
506
+ maxArity: 2,
507
+ description: "Reactive entity reference (deprecated, use fetch with listens in V2)",
508
+ hasSideEffects: true,
509
+ returnType: "void",
510
+ params: [
511
+ { name: "entity", type: { kind: "entity" }, description: "Target entity name" },
512
+ {
513
+ name: "options",
514
+ type: {
515
+ kind: "object",
516
+ fields: {
517
+ id: STRING,
518
+ filter: ANY,
519
+ include: { kind: "array", of: STRING },
520
+ emit: { kind: "object", fields: {}, open: true }
521
+ },
522
+ open: true
523
+ },
524
+ description: "Ref options: id | filter | include | emit",
525
+ optional: true
526
+ }
527
+ ],
528
+ example: '["ref", "Task"]',
529
+ effect: {
530
+ kind: "ref",
531
+ // Same call-site shape as fetch. Kept for the V2 transition period;
532
+ // scheduled for deprecation in a later phase (see Almadar_Entity_V2_Plan.md).
533
+ produces: {
534
+ kind: "union",
535
+ of: [
536
+ { kind: "entity" },
537
+ { kind: "array", of: { kind: "entity" } }
538
+ ]
539
+ }
540
+ }
541
+ },
542
+ "call-service": {
543
+ module: "core",
544
+ category: "effect",
545
+ minArity: 2,
546
+ maxArity: 3,
547
+ description: "Invoke an external service action",
548
+ hasSideEffects: true,
549
+ returnType: "void",
550
+ params: [
551
+ { name: "service", type: STRING, description: 'Service name (e.g. "llm", "stripe")' },
552
+ { name: "action", type: STRING, description: 'Service action (e.g. "generate", "charge")' },
553
+ {
554
+ name: "params",
555
+ type: { kind: "object", fields: {}, open: true },
556
+ description: "Service-specific params",
557
+ optional: true
558
+ }
559
+ ],
560
+ example: '["call-service", "llm", "generate", { "userPrompt": "@entity.inputText" }]',
561
+ effect: {
562
+ kind: "call-service",
563
+ // TODO(entity-v2): narrow to the declared service return type once
564
+ // per-service return shapes live on the orbital services block.
565
+ // Today the emit.success payload is whatever the service adapter returns.
566
+ produces: ANY
567
+ }
568
+ },
569
+ "render-ui": {
570
+ module: "core",
571
+ category: "effect",
572
+ minArity: 2,
573
+ maxArity: 3,
574
+ description: "Render a pattern into a UI slot",
575
+ hasSideEffects: true,
576
+ returnType: "void",
577
+ params: [
578
+ { name: "slot", type: UI_SLOT, description: "Target UI slot (main, sidebar, modal, hud, ...)" },
579
+ {
580
+ name: "pattern",
581
+ type: {
582
+ kind: "union",
583
+ of: [
584
+ { kind: "object", fields: { patternType: PATTERN_TYPE }, open: true },
585
+ { kind: "literal", value: null }
586
+ ]
587
+ },
588
+ description: "Pattern config (or null to clear the slot)"
589
+ },
590
+ {
591
+ name: "props",
592
+ type: { kind: "object", fields: {}, open: true },
593
+ description: "Extra props forwarded to the pattern",
594
+ optional: true
595
+ }
596
+ ],
597
+ example: '["render-ui", "main", { "patternType": "entity-table", "columns": ["name"] }]',
598
+ effect: { kind: "render-ui" }
599
+ }
600
+ };
601
+ function getCoreOperators() {
602
+ return Object.keys(CORE_OPERATORS);
603
+ }
604
+
605
+ export { CORE_OPERATORS, getCoreOperators };
606
+ //# sourceMappingURL=core.js.map
607
+ //# sourceMappingURL=core.js.map