@noetic-tools/core 5.4.2 → 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.
- package/dist/adapters/openrouter.js +1 -1
- package/dist/builders/control-flow-builders.d.ts +6 -4
- package/dist/builders/control-flow-builders.js +3 -2
- package/dist/builders/decide-builders.d.ts +86 -0
- package/dist/builders/decide-builders.js +230 -0
- package/dist/builders/dynamic-workflow.js +1 -0
- package/dist/builders/tool-builder.d.ts +5 -1
- package/dist/builders/tool-builder.js +2 -0
- package/dist/builders/workflow-hydrator.js +81 -2
- package/dist/conditions/conditions.d.ts +9 -3
- package/dist/conditions/conditions.js +84 -25
- package/dist/harness/agent-harness.d.ts +19 -4
- package/dist/harness/agent-harness.js +74 -9
- package/dist/harness/decide-call.d.ts +19 -0
- package/dist/harness/decide-call.js +483 -0
- package/dist/harness/deps/adapters.d.ts +1 -0
- package/dist/harness/deps/adapters.js +1 -0
- package/dist/harness/deps/context.d.ts +1 -1
- package/dist/harness/deps/context.js +1 -1
- package/dist/harness/deps/types.d.ts +1 -1
- package/dist/harness/model-call.js +3 -1
- package/dist/index.d.ts +12 -4
- package/dist/index.js +5 -1
- package/dist/interpreter/action-deps.d.ts +1 -1
- package/dist/interpreter/action-deps.js +1 -1
- package/dist/interpreter/action-types.d.ts +1 -1
- package/dist/interpreter/collect-tools.js +2 -0
- package/dist/interpreter/execute-acp-agent.js +1 -1
- package/dist/interpreter/execute-action.js +46 -21
- package/dist/interpreter/execute-control.js +1 -1
- package/dist/interpreter/execute-decide.d.ts +10 -0
- package/dist/interpreter/execute-decide.js +417 -0
- package/dist/interpreter/execute.js +8 -3
- package/dist/observability/genai-attributes.d.ts +6 -0
- package/dist/observability/genai-attributes.js +6 -0
- package/dist/portable/context-layers.d.ts +1 -1
- package/dist/portable/context-layers.js +1 -1
- package/dist/runtime/session-runner.js +4 -0
- package/dist/schemas/workflow.d.ts +1 -1
- package/dist/util/status-code.d.ts +2 -0
- package/dist/util/status-code.js +7 -0
- package/package.json +7 -6
- package/schema/noetic-workflow.schema.json +396 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@noetic-tools/core",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.6.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Step primitives, interpreter, runtime, and context layer contract for Noetic agents.",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -53,13 +53,13 @@
|
|
|
53
53
|
"access": "public"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
|
-
"@openrouter/agent": "^0.
|
|
56
|
+
"@openrouter/agent": "^0.11.0",
|
|
57
57
|
"@valibot/to-json-schema": "1.7.1",
|
|
58
58
|
"bun-types": "latest",
|
|
59
59
|
"valibot": "1.4.2"
|
|
60
60
|
},
|
|
61
61
|
"peerDependencies": {
|
|
62
|
-
"@openrouter/agent": "^0.
|
|
62
|
+
"@openrouter/agent": "^0.11.0",
|
|
63
63
|
"zod": "^4.0.0"
|
|
64
64
|
},
|
|
65
65
|
"peerDependenciesMeta": {
|
|
@@ -68,9 +68,10 @@
|
|
|
68
68
|
}
|
|
69
69
|
},
|
|
70
70
|
"dependencies": {
|
|
71
|
-
"@noetic-tools/context": "^1.
|
|
72
|
-
"@noetic-tools/types": "^3.
|
|
73
|
-
"@openrouter/agent": "^0.
|
|
71
|
+
"@noetic-tools/context": "^1.4.0",
|
|
72
|
+
"@noetic-tools/types": "^3.4.0",
|
|
73
|
+
"@openrouter/agent": "^0.11.0",
|
|
74
|
+
"@openrouter/sdk": "1.4.25",
|
|
74
75
|
"zod": "^4.0.0"
|
|
75
76
|
},
|
|
76
77
|
"scripts": {
|
|
@@ -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": {
|