@noetic-tools/core 5.5.0 → 5.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/dist/builders/control-flow-builders.d.ts +6 -4
  2. package/dist/builders/control-flow-builders.js +3 -2
  3. package/dist/builders/decide-builders.d.ts +86 -0
  4. package/dist/builders/decide-builders.js +230 -0
  5. package/dist/builders/dynamic-workflow.js +1 -0
  6. package/dist/builders/workflow-hydrator.js +81 -2
  7. package/dist/conditions/conditions.d.ts +9 -3
  8. package/dist/conditions/conditions.js +84 -25
  9. package/dist/harness/agent-harness.d.ts +16 -3
  10. package/dist/harness/agent-harness.js +63 -6
  11. package/dist/harness/decide-call.d.ts +19 -0
  12. package/dist/harness/decide-call.js +483 -0
  13. package/dist/harness/deps/adapters.d.ts +1 -0
  14. package/dist/harness/deps/adapters.js +1 -0
  15. package/dist/harness/deps/context.d.ts +1 -1
  16. package/dist/harness/deps/context.js +1 -1
  17. package/dist/harness/deps/types.d.ts +1 -1
  18. package/dist/index.d.ts +12 -4
  19. package/dist/index.js +5 -1
  20. package/dist/interpreter/action-deps.d.ts +1 -1
  21. package/dist/interpreter/action-deps.js +1 -1
  22. package/dist/interpreter/action-types.d.ts +1 -1
  23. package/dist/interpreter/collect-tools.js +2 -0
  24. package/dist/interpreter/execute-control.js +1 -1
  25. package/dist/interpreter/execute-decide.d.ts +10 -0
  26. package/dist/interpreter/execute-decide.js +417 -0
  27. package/dist/interpreter/execute.js +8 -3
  28. package/dist/observability/genai-attributes.d.ts +6 -0
  29. package/dist/observability/genai-attributes.js +6 -0
  30. package/dist/portable/context-layers.d.ts +1 -1
  31. package/dist/portable/context-layers.js +1 -1
  32. package/dist/schemas/workflow.d.ts +1 -1
  33. package/dist/util/status-code.d.ts +2 -0
  34. package/dist/util/status-code.js +7 -0
  35. package/package.json +7 -6
  36. package/schema/noetic-workflow.schema.json +396 -0
@@ -245,6 +245,402 @@
245
245
  ],
246
246
  "additionalProperties": false
247
247
  },
248
+ {
249
+ "type": "object",
250
+ "properties": {
251
+ "kind": {
252
+ "type": "string",
253
+ "const": "decide"
254
+ },
255
+ "id": {
256
+ "type": "string",
257
+ "minLength": 1
258
+ },
259
+ "model": {
260
+ "type": "string",
261
+ "minLength": 1
262
+ },
263
+ "instructions": {
264
+ "type": "string",
265
+ "minLength": 1
266
+ },
267
+ "questions": {
268
+ "type": "object",
269
+ "propertyNames": {
270
+ "type": "string",
271
+ "minLength": 1
272
+ },
273
+ "additionalProperties": {
274
+ "anyOf": [
275
+ {
276
+ "type": "object",
277
+ "properties": {
278
+ "type": {
279
+ "type": "string",
280
+ "const": "boolean"
281
+ },
282
+ "instructions": {
283
+ "type": "string",
284
+ "minLength": 1
285
+ },
286
+ "criteria": {
287
+ "type": "object",
288
+ "properties": {
289
+ "true": {
290
+ "type": "string",
291
+ "minLength": 1
292
+ },
293
+ "false": {
294
+ "type": "string",
295
+ "minLength": 1
296
+ }
297
+ },
298
+ "additionalProperties": false
299
+ },
300
+ "threshold": {
301
+ "type": "number",
302
+ "minimum": 0,
303
+ "maximum": 1
304
+ }
305
+ },
306
+ "required": [
307
+ "type"
308
+ ],
309
+ "additionalProperties": false
310
+ },
311
+ {
312
+ "type": "object",
313
+ "properties": {
314
+ "type": {
315
+ "type": "string",
316
+ "const": "choice"
317
+ },
318
+ "instructions": {
319
+ "type": "string",
320
+ "minLength": 1
321
+ },
322
+ "choices": {
323
+ "anyOf": [
324
+ {
325
+ "minItems": 1,
326
+ "maxItems": 255,
327
+ "type": "array",
328
+ "items": {
329
+ "type": "string",
330
+ "minLength": 1
331
+ }
332
+ },
333
+ {
334
+ "type": "object",
335
+ "propertyNames": {
336
+ "type": "string",
337
+ "minLength": 1
338
+ },
339
+ "additionalProperties": {
340
+ "type": "string"
341
+ }
342
+ }
343
+ ]
344
+ }
345
+ },
346
+ "required": [
347
+ "type",
348
+ "choices"
349
+ ],
350
+ "additionalProperties": false
351
+ },
352
+ {
353
+ "type": "object",
354
+ "properties": {
355
+ "type": {
356
+ "type": "string",
357
+ "const": "score"
358
+ },
359
+ "instructions": {
360
+ "type": "string",
361
+ "minLength": 1
362
+ },
363
+ "levels": {
364
+ "anyOf": [
365
+ {
366
+ "type": "array",
367
+ "items": {
368
+ "type": "string",
369
+ "minLength": 1
370
+ }
371
+ },
372
+ {
373
+ "type": "array",
374
+ "items": {
375
+ "type": "object",
376
+ "properties": {
377
+ "label": {
378
+ "type": "string",
379
+ "minLength": 1
380
+ },
381
+ "description": {
382
+ "type": "string"
383
+ }
384
+ },
385
+ "required": [
386
+ "label"
387
+ ],
388
+ "additionalProperties": false
389
+ }
390
+ }
391
+ ]
392
+ }
393
+ },
394
+ "required": [
395
+ "type",
396
+ "levels"
397
+ ],
398
+ "additionalProperties": false
399
+ }
400
+ ]
401
+ }
402
+ },
403
+ "view": {
404
+ "type": "string",
405
+ "enum": [
406
+ "full",
407
+ "layers",
408
+ "none"
409
+ ]
410
+ },
411
+ "samples": {
412
+ "type": "integer",
413
+ "exclusiveMinimum": 0,
414
+ "maximum": 9007199254740991
415
+ }
416
+ },
417
+ "required": [
418
+ "kind",
419
+ "id",
420
+ "questions"
421
+ ],
422
+ "additionalProperties": false
423
+ },
424
+ {
425
+ "type": "object",
426
+ "properties": {
427
+ "kind": {
428
+ "type": "string",
429
+ "const": "routeSwitch"
430
+ },
431
+ "id": {
432
+ "type": "string",
433
+ "minLength": 1
434
+ },
435
+ "decide": {
436
+ "type": "object",
437
+ "properties": {
438
+ "kind": {
439
+ "type": "string",
440
+ "const": "decide"
441
+ },
442
+ "id": {
443
+ "type": "string",
444
+ "minLength": 1
445
+ },
446
+ "model": {
447
+ "type": "string",
448
+ "minLength": 1
449
+ },
450
+ "instructions": {
451
+ "type": "string",
452
+ "minLength": 1
453
+ },
454
+ "questions": {
455
+ "type": "object",
456
+ "propertyNames": {
457
+ "type": "string",
458
+ "minLength": 1
459
+ },
460
+ "additionalProperties": {
461
+ "anyOf": [
462
+ {
463
+ "type": "object",
464
+ "properties": {
465
+ "type": {
466
+ "type": "string",
467
+ "const": "boolean"
468
+ },
469
+ "instructions": {
470
+ "type": "string",
471
+ "minLength": 1
472
+ },
473
+ "criteria": {
474
+ "type": "object",
475
+ "properties": {
476
+ "true": {
477
+ "type": "string",
478
+ "minLength": 1
479
+ },
480
+ "false": {
481
+ "type": "string",
482
+ "minLength": 1
483
+ }
484
+ },
485
+ "additionalProperties": false
486
+ },
487
+ "threshold": {
488
+ "type": "number",
489
+ "minimum": 0,
490
+ "maximum": 1
491
+ }
492
+ },
493
+ "required": [
494
+ "type"
495
+ ],
496
+ "additionalProperties": false
497
+ },
498
+ {
499
+ "type": "object",
500
+ "properties": {
501
+ "type": {
502
+ "type": "string",
503
+ "const": "choice"
504
+ },
505
+ "instructions": {
506
+ "type": "string",
507
+ "minLength": 1
508
+ },
509
+ "choices": {
510
+ "anyOf": [
511
+ {
512
+ "minItems": 1,
513
+ "maxItems": 255,
514
+ "type": "array",
515
+ "items": {
516
+ "type": "string",
517
+ "minLength": 1
518
+ }
519
+ },
520
+ {
521
+ "type": "object",
522
+ "propertyNames": {
523
+ "type": "string",
524
+ "minLength": 1
525
+ },
526
+ "additionalProperties": {
527
+ "type": "string"
528
+ }
529
+ }
530
+ ]
531
+ }
532
+ },
533
+ "required": [
534
+ "type",
535
+ "choices"
536
+ ],
537
+ "additionalProperties": false
538
+ },
539
+ {
540
+ "type": "object",
541
+ "properties": {
542
+ "type": {
543
+ "type": "string",
544
+ "const": "score"
545
+ },
546
+ "instructions": {
547
+ "type": "string",
548
+ "minLength": 1
549
+ },
550
+ "levels": {
551
+ "anyOf": [
552
+ {
553
+ "type": "array",
554
+ "items": {
555
+ "type": "string",
556
+ "minLength": 1
557
+ }
558
+ },
559
+ {
560
+ "type": "array",
561
+ "items": {
562
+ "type": "object",
563
+ "properties": {
564
+ "label": {
565
+ "type": "string",
566
+ "minLength": 1
567
+ },
568
+ "description": {
569
+ "type": "string"
570
+ }
571
+ },
572
+ "required": [
573
+ "label"
574
+ ],
575
+ "additionalProperties": false
576
+ }
577
+ }
578
+ ]
579
+ }
580
+ },
581
+ "required": [
582
+ "type",
583
+ "levels"
584
+ ],
585
+ "additionalProperties": false
586
+ }
587
+ ]
588
+ }
589
+ },
590
+ "view": {
591
+ "type": "string",
592
+ "enum": [
593
+ "full",
594
+ "layers",
595
+ "none"
596
+ ]
597
+ },
598
+ "samples": {
599
+ "type": "integer",
600
+ "exclusiveMinimum": 0,
601
+ "maximum": 9007199254740991
602
+ }
603
+ },
604
+ "required": [
605
+ "kind",
606
+ "id",
607
+ "questions"
608
+ ],
609
+ "additionalProperties": false
610
+ },
611
+ "on": {
612
+ "type": "string",
613
+ "minLength": 1
614
+ },
615
+ "cases": {
616
+ "type": "object",
617
+ "propertyNames": {
618
+ "type": "string",
619
+ "minLength": 1
620
+ },
621
+ "additionalProperties": {
622
+ "$ref": "#/$defs/WorkflowNode"
623
+ }
624
+ },
625
+ "minConfidence": {
626
+ "type": "number",
627
+ "minimum": 0,
628
+ "maximum": 1
629
+ },
630
+ "uncertain": {
631
+ "$ref": "#/$defs/WorkflowNode"
632
+ }
633
+ },
634
+ "required": [
635
+ "kind",
636
+ "id",
637
+ "decide",
638
+ "on",
639
+ "cases",
640
+ "uncertain"
641
+ ],
642
+ "additionalProperties": false
643
+ },
248
644
  {
249
645
  "type": "object",
250
646
  "properties": {