@noetic-tools/core 5.3.0 → 5.4.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 (94) hide show
  1. package/README.md +8 -6
  2. package/dist/adapters/in-memory-subprocess/step-completion.js +1 -1
  3. package/dist/adapters/openrouter.d.ts +12 -1
  4. package/dist/adapters/openrouter.js +79 -5
  5. package/dist/builders/acp-agent-tool.d.ts +67 -0
  6. package/dist/builders/acp-agent-tool.js +87 -0
  7. package/dist/builders/control-flow-builders.d.ts +13 -13
  8. package/dist/builders/control-flow-builders.js +11 -11
  9. package/dist/{patterns → builders}/dynamic-workflow.d.ts +1 -1
  10. package/dist/{patterns → builders}/dynamic-workflow.js +20 -14
  11. package/dist/builders/every.d.ts +14 -14
  12. package/dist/builders/every.js +16 -16
  13. package/dist/builders/layer-provides-builders.d.ts +1 -1
  14. package/dist/builders/layer-provides-builders.js +1 -1
  15. package/dist/builders/provide-builder.d.ts +5 -12
  16. package/dist/builders/provide-builder.js +9 -10
  17. package/dist/builders/spawn-builder.d.ts +0 -2
  18. package/dist/builders/spawn-builder.js +2 -3
  19. package/dist/builders/step-builders.d.ts +103 -92
  20. package/dist/builders/step-builders.js +146 -163
  21. package/dist/builders/tool-builder.d.ts +18 -22
  22. package/dist/builders/tool-builder.js +6 -4
  23. package/dist/builders/workflow-hydrator.d.ts +11 -7
  24. package/dist/builders/workflow-hydrator.js +75 -87
  25. package/dist/builders/workflow-step.d.ts +15 -27
  26. package/dist/builders/workflow-step.js +14 -19
  27. package/dist/conditions/conditions.d.ts +2 -2
  28. package/dist/conditions/conditions.js +1 -1
  29. package/dist/harness/agent-harness.d.ts +89 -46
  30. package/dist/harness/agent-harness.js +93 -39
  31. package/dist/harness/deps/types.d.ts +1 -1
  32. package/dist/harness/model-call.d.ts +1 -1
  33. package/dist/harness/model-call.js +23 -18
  34. package/dist/index.d.ts +27 -35
  35. package/dist/index.js +13 -29
  36. package/dist/interpreter/acp-events.d.ts +67 -0
  37. package/dist/interpreter/acp-events.js +256 -0
  38. package/dist/interpreter/acp-history.d.ts +22 -0
  39. package/dist/interpreter/acp-history.js +58 -0
  40. package/dist/interpreter/action-types.d.ts +1 -1
  41. package/dist/interpreter/collect-tools.js +10 -13
  42. package/dist/interpreter/execute-acp-agent.d.ts +10 -0
  43. package/dist/interpreter/execute-acp-agent.js +505 -0
  44. package/dist/interpreter/execute-action.d.ts +5 -5
  45. package/dist/interpreter/execute-action.js +284 -218
  46. package/dist/interpreter/execute-control.d.ts +9 -9
  47. package/dist/interpreter/execute-control.js +27 -27
  48. package/dist/interpreter/execute.d.ts +1 -1
  49. package/dist/interpreter/execute.js +29 -35
  50. package/dist/interpreter/step-dispatcher.d.ts +1 -1
  51. package/dist/interpreter/step-dispatcher.js +3 -3
  52. package/dist/interpreter/structured-output.d.ts +14 -0
  53. package/dist/interpreter/structured-output.js +40 -0
  54. package/dist/interpreter/typeguards.d.ts +1 -1
  55. package/dist/interpreter/typeguards.js +1 -1
  56. package/dist/portable/builders.d.ts +5 -3
  57. package/dist/portable/builders.js +8 -5
  58. package/dist/portable/context-layers.d.ts +1 -1
  59. package/dist/portable/context-layers.js +1 -1
  60. package/dist/runtime/acp-session-store.d.ts +75 -0
  61. package/dist/runtime/acp-session-store.js +0 -0
  62. package/dist/runtime/broadcaster-utils.d.ts +1 -1
  63. package/dist/runtime/broadcaster-utils.js +1 -1
  64. package/dist/runtime/context-impl.d.ts +8 -10
  65. package/dist/runtime/context-impl.js +8 -12
  66. package/dist/runtime/durable/step-ledger.d.ts +2 -2
  67. package/dist/runtime/durable/step-ledger.js +3 -3
  68. package/dist/runtime/session-runner.d.ts +12 -1
  69. package/dist/runtime/session-runner.js +33 -1
  70. package/dist/runtime/tool-context.js +0 -2
  71. package/dist/schemas/workflow.d.ts +3 -3
  72. package/dist/schemas/workflow.js +2 -2
  73. package/dist/types/checkpoint.d.ts +11 -2
  74. package/dist/types/checkpoint.js +10 -1
  75. package/dist/{runtime → util}/detached-handle.js +1 -1
  76. package/package.json +6 -4
  77. package/schema/noetic-workflow.schema.json +239 -260
  78. package/dist/builders/context-option.d.ts +0 -23
  79. package/dist/builders/context-option.js +0 -22
  80. package/dist/deprecated.d.ts +0 -30
  81. package/dist/deprecated.js +0 -28
  82. package/dist/interpreter/execute-sub-harness.d.ts +0 -8
  83. package/dist/interpreter/execute-sub-harness.js +0 -241
  84. package/dist/interpreter/sub-harness-events.d.ts +0 -48
  85. package/dist/interpreter/sub-harness-events.js +0 -208
  86. package/dist/patterns/interview.d.ts +0 -53
  87. package/dist/patterns/interview.js +0 -113
  88. package/dist/patterns/plans.d.ts +0 -44
  89. package/dist/patterns/plans.js +0 -125
  90. package/dist/patterns/ralph-wiggum.d.ts +0 -19
  91. package/dist/patterns/ralph-wiggum.js +0 -37
  92. package/dist/patterns/react.d.ts +0 -19
  93. package/dist/patterns/react.js +0 -41
  94. /package/dist/{runtime → util}/detached-handle.d.ts +0 -0
@@ -26,7 +26,7 @@
26
26
  "properties": {
27
27
  "kind": {
28
28
  "type": "string",
29
- "const": "llm"
29
+ "const": "callModel"
30
30
  },
31
31
  "id": {
32
32
  "type": "string",
@@ -118,7 +118,7 @@
118
118
  "properties": {
119
119
  "kind": {
120
120
  "type": "string",
121
- "const": "tool"
121
+ "const": "invokeTool"
122
122
  },
123
123
  "id": {
124
124
  "type": "string",
@@ -148,7 +148,7 @@
148
148
  "properties": {
149
149
  "kind": {
150
150
  "type": "string",
151
- "const": "run"
151
+ "const": "runCode"
152
152
  },
153
153
  "id": {
154
154
  "type": "string",
@@ -207,7 +207,7 @@
207
207
  "properties": {
208
208
  "kind": {
209
209
  "type": "string",
210
- "const": "branch"
210
+ "const": "conditional"
211
211
  },
212
212
  "id": {
213
213
  "type": "string",
@@ -250,7 +250,7 @@
250
250
  "properties": {
251
251
  "kind": {
252
252
  "type": "string",
253
- "const": "fork"
253
+ "const": "inParallel"
254
254
  },
255
255
  "id": {
256
256
  "type": "string",
@@ -338,7 +338,7 @@
338
338
  "properties": {
339
339
  "kind": {
340
340
  "type": "string",
341
- "const": "provide"
341
+ "const": "withContext"
342
342
  },
343
343
  "id": {
344
344
  "type": "string",
@@ -426,7 +426,7 @@
426
426
  "properties": {
427
427
  "kind": {
428
428
  "type": "string",
429
- "const": "every"
429
+ "const": "schedule"
430
430
  },
431
431
  "id": {
432
432
  "type": "string",
@@ -435,7 +435,7 @@
435
435
  "step": {
436
436
  "$ref": "#/$defs/WorkflowNode"
437
437
  },
438
- "ms": {
438
+ "interval": {
439
439
  "type": "number",
440
440
  "minimum": 0
441
441
  },
@@ -451,7 +451,7 @@
451
451
  "kind",
452
452
  "id",
453
453
  "step",
454
- "ms"
454
+ "interval"
455
455
  ],
456
456
  "additionalProperties": false
457
457
  },
@@ -488,89 +488,13 @@
488
488
  "properties": {
489
489
  "kind": {
490
490
  "type": "string",
491
- "const": "claude-code"
491
+ "const": "acp-agent"
492
492
  },
493
493
  "id": {
494
494
  "type": "string",
495
495
  "minLength": 1
496
496
  },
497
- "prompt": {
498
- "type": "string",
499
- "minLength": 1
500
- },
501
- "instructions": {
502
- "type": "string"
503
- },
504
- "settings": {
505
- "type": "object",
506
- "properties": {
507
- "model": {
508
- "type": "string"
509
- },
510
- "permissionMode": {
511
- "type": "string",
512
- "enum": [
513
- "default",
514
- "plan",
515
- "acceptEdits",
516
- "bypassPermissions"
517
- ]
518
- },
519
- "maxTurns": {
520
- "type": "integer",
521
- "exclusiveMinimum": 0,
522
- "maximum": 9007199254740991
523
- },
524
- "allowedTools": {
525
- "type": "array",
526
- "items": {
527
- "type": "string"
528
- }
529
- },
530
- "extra": {
531
- "type": "object",
532
- "propertyNames": {
533
- "type": "string"
534
- },
535
- "additionalProperties": {}
536
- }
537
- },
538
- "additionalProperties": false
539
- },
540
- "session": {
541
- "type": "object",
542
- "properties": {
543
- "reuse": {
544
- "type": "string",
545
- "minLength": 1
546
- },
547
- "onComplete": {
548
- "type": "string",
549
- "enum": [
550
- "stop",
551
- "detach",
552
- "destroy"
553
- ]
554
- }
555
- },
556
- "additionalProperties": false
557
- }
558
- },
559
- "required": [
560
- "kind",
561
- "id",
562
- "prompt"
563
- ],
564
- "additionalProperties": false
565
- },
566
- {
567
- "type": "object",
568
- "properties": {
569
- "kind": {
570
- "type": "string",
571
- "const": "codex"
572
- },
573
- "id": {
497
+ "agent": {
574
498
  "type": "string",
575
499
  "minLength": 1
576
500
  },
@@ -578,201 +502,238 @@
578
502
  "type": "string",
579
503
  "minLength": 1
580
504
  },
581
- "instructions": {
582
- "type": "string"
583
- },
584
- "settings": {
585
- "type": "object",
586
- "properties": {
587
- "model": {
588
- "type": "string"
589
- },
590
- "permissionMode": {
591
- "type": "string",
592
- "enum": [
593
- "default",
594
- "plan",
595
- "acceptEdits",
596
- "bypassPermissions"
597
- ]
598
- },
599
- "maxTurns": {
600
- "type": "integer",
601
- "exclusiveMinimum": 0,
602
- "maximum": 9007199254740991
603
- },
604
- "allowedTools": {
605
- "type": "array",
606
- "items": {
607
- "type": "string"
608
- }
609
- },
610
- "extra": {
611
- "type": "object",
612
- "propertyNames": {
613
- "type": "string"
614
- },
615
- "additionalProperties": {}
616
- }
617
- },
618
- "additionalProperties": false
619
- },
620
- "session": {
621
- "type": "object",
622
- "properties": {
623
- "reuse": {
624
- "type": "string",
625
- "minLength": 1
626
- },
627
- "onComplete": {
628
- "type": "string",
629
- "enum": [
630
- "stop",
631
- "detach",
632
- "destroy"
633
- ]
634
- }
635
- },
636
- "additionalProperties": false
637
- }
638
- },
639
- "required": [
640
- "kind",
641
- "id",
642
- "prompt"
643
- ],
644
- "additionalProperties": false
645
- },
646
- {
647
- "type": "object",
648
- "properties": {
649
- "kind": {
505
+ "cwd": {
650
506
  "type": "string",
651
- "const": "opencode"
507
+ "minLength": 1
652
508
  },
653
- "id": {
509
+ "mode": {
654
510
  "type": "string",
655
511
  "minLength": 1
656
512
  },
657
- "prompt": {
513
+ "model": {
658
514
  "type": "string",
659
515
  "minLength": 1
660
516
  },
661
- "instructions": {
662
- "type": "string"
517
+ "mcpServers": {
518
+ "type": "array",
519
+ "items": {
520
+ "anyOf": [
521
+ {
522
+ "type": "object",
523
+ "properties": {
524
+ "type": {
525
+ "type": "string",
526
+ "const": "http"
527
+ },
528
+ "name": {
529
+ "type": "string",
530
+ "minLength": 1
531
+ },
532
+ "url": {
533
+ "type": "string"
534
+ },
535
+ "headers": {
536
+ "type": "array",
537
+ "items": {
538
+ "type": "object",
539
+ "properties": {
540
+ "name": {
541
+ "type": "string"
542
+ },
543
+ "value": {
544
+ "type": "string"
545
+ }
546
+ },
547
+ "required": [
548
+ "name",
549
+ "value"
550
+ ],
551
+ "additionalProperties": false
552
+ }
553
+ }
554
+ },
555
+ "required": [
556
+ "type",
557
+ "name",
558
+ "url",
559
+ "headers"
560
+ ],
561
+ "additionalProperties": false
562
+ },
563
+ {
564
+ "type": "object",
565
+ "properties": {
566
+ "type": {
567
+ "type": "string",
568
+ "const": "sse"
569
+ },
570
+ "name": {
571
+ "type": "string",
572
+ "minLength": 1
573
+ },
574
+ "url": {
575
+ "type": "string"
576
+ },
577
+ "headers": {
578
+ "type": "array",
579
+ "items": {
580
+ "type": "object",
581
+ "properties": {
582
+ "name": {
583
+ "type": "string"
584
+ },
585
+ "value": {
586
+ "type": "string"
587
+ }
588
+ },
589
+ "required": [
590
+ "name",
591
+ "value"
592
+ ],
593
+ "additionalProperties": false
594
+ }
595
+ }
596
+ },
597
+ "required": [
598
+ "type",
599
+ "name",
600
+ "url",
601
+ "headers"
602
+ ],
603
+ "additionalProperties": false
604
+ },
605
+ {
606
+ "type": "object",
607
+ "properties": {
608
+ "name": {
609
+ "type": "string",
610
+ "minLength": 1
611
+ },
612
+ "command": {
613
+ "type": "string",
614
+ "minLength": 1
615
+ },
616
+ "args": {
617
+ "type": "array",
618
+ "items": {
619
+ "type": "string"
620
+ }
621
+ },
622
+ "env": {
623
+ "type": "array",
624
+ "items": {
625
+ "type": "object",
626
+ "properties": {
627
+ "name": {
628
+ "type": "string"
629
+ },
630
+ "value": {
631
+ "type": "string"
632
+ }
633
+ },
634
+ "required": [
635
+ "name",
636
+ "value"
637
+ ],
638
+ "additionalProperties": false
639
+ }
640
+ }
641
+ },
642
+ "required": [
643
+ "name",
644
+ "command",
645
+ "args",
646
+ "env"
647
+ ],
648
+ "additionalProperties": false
649
+ }
650
+ ]
651
+ }
663
652
  },
664
- "settings": {
653
+ "permissions": {
665
654
  "type": "object",
666
655
  "properties": {
667
- "model": {
668
- "type": "string"
669
- },
670
- "permissionMode": {
656
+ "default": {
671
657
  "type": "string",
672
658
  "enum": [
673
- "default",
674
- "plan",
675
- "acceptEdits",
676
- "bypassPermissions"
659
+ "allow",
660
+ "deny",
661
+ "cancel"
677
662
  ]
678
663
  },
679
- "maxTurns": {
680
- "type": "integer",
681
- "exclusiveMinimum": 0,
682
- "maximum": 9007199254740991
664
+ "allow": {
665
+ "type": "array",
666
+ "items": {
667
+ "type": "object",
668
+ "properties": {
669
+ "kind": {
670
+ "type": "string",
671
+ "enum": [
672
+ "read",
673
+ "edit",
674
+ "delete",
675
+ "move",
676
+ "search",
677
+ "execute",
678
+ "think",
679
+ "fetch",
680
+ "switch_mode",
681
+ "other"
682
+ ]
683
+ },
684
+ "title": {
685
+ "type": "string",
686
+ "minLength": 1
687
+ }
688
+ },
689
+ "additionalProperties": false
690
+ }
683
691
  },
684
- "allowedTools": {
692
+ "deny": {
685
693
  "type": "array",
686
694
  "items": {
687
- "type": "string"
695
+ "type": "object",
696
+ "properties": {
697
+ "kind": {
698
+ "type": "string",
699
+ "enum": [
700
+ "read",
701
+ "edit",
702
+ "delete",
703
+ "move",
704
+ "search",
705
+ "execute",
706
+ "think",
707
+ "fetch",
708
+ "switch_mode",
709
+ "other"
710
+ ]
711
+ },
712
+ "title": {
713
+ "type": "string",
714
+ "minLength": 1
715
+ }
716
+ },
717
+ "additionalProperties": false
688
718
  }
689
719
  },
690
- "extra": {
691
- "type": "object",
692
- "propertyNames": {
693
- "type": "string"
694
- },
695
- "additionalProperties": {}
720
+ "persist": {
721
+ "type": "boolean"
696
722
  }
697
723
  },
698
724
  "additionalProperties": false
699
725
  },
700
- "session": {
726
+ "clientCapabilities": {
701
727
  "type": "object",
702
728
  "properties": {
703
- "reuse": {
704
- "type": "string",
705
- "minLength": 1
729
+ "readTextFile": {
730
+ "type": "boolean"
706
731
  },
707
- "onComplete": {
708
- "type": "string",
709
- "enum": [
710
- "stop",
711
- "detach",
712
- "destroy"
713
- ]
714
- }
715
- },
716
- "additionalProperties": false
717
- }
718
- },
719
- "required": [
720
- "kind",
721
- "id",
722
- "prompt"
723
- ],
724
- "additionalProperties": false
725
- },
726
- {
727
- "type": "object",
728
- "properties": {
729
- "kind": {
730
- "type": "string",
731
- "const": "pi"
732
- },
733
- "id": {
734
- "type": "string",
735
- "minLength": 1
736
- },
737
- "prompt": {
738
- "type": "string",
739
- "minLength": 1
740
- },
741
- "instructions": {
742
- "type": "string"
743
- },
744
- "settings": {
745
- "type": "object",
746
- "properties": {
747
- "model": {
748
- "type": "string"
749
- },
750
- "permissionMode": {
751
- "type": "string",
752
- "enum": [
753
- "default",
754
- "plan",
755
- "acceptEdits",
756
- "bypassPermissions"
757
- ]
732
+ "writeTextFile": {
733
+ "type": "boolean"
758
734
  },
759
- "maxTurns": {
760
- "type": "integer",
761
- "exclusiveMinimum": 0,
762
- "maximum": 9007199254740991
763
- },
764
- "allowedTools": {
765
- "type": "array",
766
- "items": {
767
- "type": "string"
768
- }
769
- },
770
- "extra": {
771
- "type": "object",
772
- "propertyNames": {
773
- "type": "string"
774
- },
775
- "additionalProperties": {}
735
+ "terminal": {
736
+ "type": "boolean"
776
737
  }
777
738
  },
778
739
  "additionalProperties": false
@@ -784,13 +745,17 @@
784
745
  "type": "string",
785
746
  "minLength": 1
786
747
  },
787
- "onComplete": {
748
+ "keepAlive": {
788
749
  "type": "string",
789
750
  "enum": [
790
- "stop",
791
- "detach",
792
- "destroy"
751
+ "step",
752
+ "run",
753
+ "harness"
793
754
  ]
755
+ },
756
+ "load": {
757
+ "type": "string",
758
+ "minLength": 1
794
759
  }
795
760
  },
796
761
  "additionalProperties": false
@@ -799,6 +764,7 @@
799
764
  "required": [
800
765
  "kind",
801
766
  "id",
767
+ "agent",
802
768
  "prompt"
803
769
  ],
804
770
  "additionalProperties": false
@@ -852,14 +818,14 @@
852
818
  "type": "string",
853
819
  "const": "maxDuration"
854
820
  },
855
- "ms": {
821
+ "duration": {
856
822
  "type": "number",
857
823
  "exclusiveMinimum": 0
858
824
  }
859
825
  },
860
826
  "required": [
861
827
  "kind",
862
- "ms"
828
+ "duration"
863
829
  ],
864
830
  "additionalProperties": false
865
831
  },
@@ -876,6 +842,19 @@
876
842
  ],
877
843
  "additionalProperties": false
878
844
  },
845
+ {
846
+ "type": "object",
847
+ "properties": {
848
+ "kind": {
849
+ "type": "string",
850
+ "const": "never"
851
+ }
852
+ },
853
+ "required": [
854
+ "kind"
855
+ ],
856
+ "additionalProperties": false
857
+ },
879
858
  {
880
859
  "type": "object",
881
860
  "properties": {
@@ -1,23 +0,0 @@
1
- /**
2
- * Returns the configured context layers, preferring the current `context` key
3
- * and falling back to the pre-rename `memory` key.
4
- *
5
- * `context` wins when both are set — an explicit new-style key should never be
6
- * silently overridden by a stale one left behind mid-migration.
7
- *
8
- * This is the only place in core that *resolves* `.memory`. Every public entry
9
- * point that used to take `memory` — `provide`, `spawn`, `tool`, `react`, the
10
- * `AgentHarness` constructor, `createContext`, `execute`, `restore` — declares
11
- * the deprecated key alongside its `context` replacement and resolves it
12
- * through here.
13
- *
14
- * Removing the alias at the next major means deleting the `memory?`
15
- * declarations, this function, and the one place that destructures the key off
16
- * an options bag before forwarding it (`AgentHarness.createContext`).
17
- *
18
- * @internal
19
- */
20
- export declare function resolveContextOption<T>(opts: {
21
- context?: T;
22
- memory?: T;
23
- }): T | undefined;
@@ -1,22 +0,0 @@
1
- /**
2
- * Returns the configured context layers, preferring the current `context` key
3
- * and falling back to the pre-rename `memory` key.
4
- *
5
- * `context` wins when both are set — an explicit new-style key should never be
6
- * silently overridden by a stale one left behind mid-migration.
7
- *
8
- * This is the only place in core that *resolves* `.memory`. Every public entry
9
- * point that used to take `memory` — `provide`, `spawn`, `tool`, `react`, the
10
- * `AgentHarness` constructor, `createContext`, `execute`, `restore` — declares
11
- * the deprecated key alongside its `context` replacement and resolves it
12
- * through here.
13
- *
14
- * Removing the alias at the next major means deleting the `memory?`
15
- * declarations, this function, and the one place that destructures the key off
16
- * an options bag before forwarding it (`AgentHarness.createContext`).
17
- *
18
- * @internal
19
- */
20
- export function resolveContextOption(opts) {
21
- return opts.context ?? opts.memory;
22
- }