|
387 | 387 | "description": "Extra HTTP headers sent with every request (e.g. auth tokens).", |
388 | 388 | "optional": true |
389 | 389 | }, |
| 390 | + { |
| 391 | + "name": "interruptTransport", |
| 392 | + "type": "InterruptTransport", |
| 393 | + "description": "Explicit compatibility wire profile; auto prefers protocol-native outcomes.", |
| 394 | + "optional": true |
| 395 | + }, |
| 396 | + { |
| 397 | + "name": "persistence", |
| 398 | + "type": "AgUiInterruptPersistence", |
| 399 | + "description": "Optional application-owned durable thread storage and reconciliation.", |
| 400 | + "optional": true |
| 401 | + }, |
390 | 402 | { |
391 | 403 | "name": "telemetry", |
392 | 404 | "type": "false | AgentRuntimeTelemetrySink", |
|
440 | 452 | { |
441 | 453 | "name": "interrupt", |
442 | 454 | "type": "Signal<AgentInterrupt | undefined>", |
443 | | - "description": "", |
| 455 | + "description": "Optional display projection of the pending interrupt. A runtime may expose\na separate full batch and lifecycle surface. A cleared display projection\ndoes not by itself prove that resumed backend work completed.", |
| 456 | + "optional": true |
| 457 | + }, |
| 458 | + { |
| 459 | + "name": "interruptSession", |
| 460 | + "type": "Signal<InterruptSessionSnapshot>", |
| 461 | + "description": "Full interrupt batch and its request ownership phase.", |
| 462 | + "optional": false |
| 463 | + }, |
| 464 | + { |
| 465 | + "name": "isInputBlocked", |
| 466 | + "type": "Signal<boolean>", |
| 467 | + "description": "Optional gate for ordinary composer input while the runtime requires resolution or recovery. Resume actions remain adapter-controlled.", |
444 | 468 | "optional": true |
445 | 469 | }, |
446 | 470 | { |
|
455 | 479 | "description": "", |
456 | 480 | "optional": false |
457 | 481 | }, |
| 482 | + { |
| 483 | + "name": "ready", |
| 484 | + "type": "Promise<void>", |
| 485 | + "description": "Resolves after persisted thread state is hydrated; actions wait for it.", |
| 486 | + "optional": false |
| 487 | + }, |
458 | 488 | { |
459 | 489 | "name": "regenerate", |
460 | 490 | "type": "(assistantMessageIndex: number) => Promise<void>", |
|
464 | 494 | { |
465 | 495 | "name": "retry", |
466 | 496 | "type": "() => Promise<void>", |
467 | | - "description": "Re-run the last submitted input after a failure. No-op if a run is already\n in flight or there is nothing to retry. Clears `error` and sets loading.", |
| 497 | + "description": "Re-run the captured submission after a failure, including a resume command\nwith no message payload. Does not append another user message or reuse an\naborted request signal. Does not restart an in-flight request; no-op when\nnothing is saved.\nAdapters may reject unsafe resume retries until the backend outcome has\nbeen reconciled; a transport failure alone does not prove non-execution.", |
468 | 498 | "optional": false |
469 | 499 | }, |
470 | 500 | { |
|
492 | 522 | "optional": false |
493 | 523 | }, |
494 | 524 | { |
495 | | - "name": "submit", |
496 | | - "type": "(input: AgentSubmitInput, opts: AgentSubmitOptions) => Promise<void>", |
| 525 | + "name": "toolCalls", |
| 526 | + "type": "Signal<ToolCall[]>", |
497 | 527 | "description": "", |
498 | 528 | "optional": false |
| 529 | + } |
| 530 | + ], |
| 531 | + "methods": [ |
| 532 | + { |
| 533 | + "name": "dispose", |
| 534 | + "signature": "dispose(): void", |
| 535 | + "description": "Unsubscribe and stop local work. Does not cancel backend checkpoints.", |
| 536 | + "params": [] |
499 | 537 | }, |
500 | 538 | { |
501 | | - "name": "toolCalls", |
502 | | - "type": "Signal<ToolCall[]>", |
| 539 | + "name": "reconcileInterrupt", |
| 540 | + "signature": "reconcileInterrupt(): Promise<void>", |
| 541 | + "description": "Recover an uncertain attempt using the configured authoritative reconciler.", |
| 542 | + "params": [] |
| 543 | + }, |
| 544 | + { |
| 545 | + "name": "submit", |
| 546 | + "signature": "submit(input: AgentSubmitInput, opts: AgUiSubmitOptions): Promise<void>", |
503 | 547 | "description": "", |
504 | | - "optional": false |
| 548 | + "params": [ |
| 549 | + { |
| 550 | + "name": "input", |
| 551 | + "type": "AgentSubmitInput", |
| 552 | + "description": "", |
| 553 | + "optional": false |
| 554 | + }, |
| 555 | + { |
| 556 | + "name": "opts", |
| 557 | + "type": "AgUiSubmitOptions", |
| 558 | + "description": "", |
| 559 | + "optional": true |
| 560 | + } |
| 561 | + ] |
505 | 562 | } |
506 | 563 | ], |
507 | 564 | "examples": [] |
|
538 | 595 | ], |
539 | 596 | "examples": [] |
540 | 597 | }, |
| 598 | + { |
| 599 | + "name": "AgUiInterruptPersistence", |
| 600 | + "kind": "interface", |
| 601 | + "description": "", |
| 602 | + "properties": [ |
| 603 | + { |
| 604 | + "name": "namespace", |
| 605 | + "type": "string", |
| 606 | + "description": "", |
| 607 | + "optional": false |
| 608 | + }, |
| 609 | + { |
| 610 | + "name": "reconcile", |
| 611 | + "type": "(record: AgUiThreadRecord) => Promise<object | object>", |
| 612 | + "description": "", |
| 613 | + "optional": true |
| 614 | + }, |
| 615 | + { |
| 616 | + "name": "store", |
| 617 | + "type": "object", |
| 618 | + "description": "", |
| 619 | + "optional": false |
| 620 | + } |
| 621 | + ], |
| 622 | + "examples": [] |
| 623 | + }, |
| 624 | + { |
| 625 | + "name": "AgUiSubmitOptions", |
| 626 | + "kind": "interface", |
| 627 | + "description": "Adapter-specific submit guards in addition to cancellation.", |
| 628 | + "properties": [ |
| 629 | + { |
| 630 | + "name": "interruptGeneration", |
| 631 | + "type": "number", |
| 632 | + "description": "Generation captured when rendering the interrupt decision; rejects stale controls.", |
| 633 | + "optional": true |
| 634 | + }, |
| 635 | + { |
| 636 | + "name": "signal", |
| 637 | + "type": "AbortSignal", |
| 638 | + "description": "", |
| 639 | + "optional": true |
| 640 | + } |
| 641 | + ], |
| 642 | + "examples": [] |
| 643 | + }, |
| 644 | + { |
| 645 | + "name": "AgUiThreadRecord", |
| 646 | + "kind": "interface", |
| 647 | + "description": "", |
| 648 | + "properties": [ |
| 649 | + { |
| 650 | + "name": "committed", |
| 651 | + "type": "ThreadSnapshot", |
| 652 | + "description": "", |
| 653 | + "optional": false |
| 654 | + }, |
| 655 | + { |
| 656 | + "name": "namespace", |
| 657 | + "type": "string", |
| 658 | + "description": "", |
| 659 | + "optional": false |
| 660 | + }, |
| 661 | + { |
| 662 | + "name": "resumeInput", |
| 663 | + "type": "ThreadSnapshot", |
| 664 | + "description": "", |
| 665 | + "optional": true |
| 666 | + }, |
| 667 | + { |
| 668 | + "name": "revision", |
| 669 | + "type": "number", |
| 670 | + "description": "", |
| 671 | + "optional": false |
| 672 | + }, |
| 673 | + { |
| 674 | + "name": "session", |
| 675 | + "type": "InterruptSessionSnapshot", |
| 676 | + "description": "", |
| 677 | + "optional": false |
| 678 | + }, |
| 679 | + { |
| 680 | + "name": "threadId", |
| 681 | + "type": "string", |
| 682 | + "description": "", |
| 683 | + "optional": false |
| 684 | + }, |
| 685 | + { |
| 686 | + "name": "version", |
| 687 | + "type": "1", |
| 688 | + "description": "", |
| 689 | + "optional": false |
| 690 | + } |
| 691 | + ], |
| 692 | + "examples": [] |
| 693 | + }, |
541 | 694 | { |
542 | 695 | "name": "CustomStreamEvent", |
543 | 696 | "kind": "interface", |
|
558 | 711 | ], |
559 | 712 | "examples": [] |
560 | 713 | }, |
| 714 | + { |
| 715 | + "name": "InterruptSessionSnapshot", |
| 716 | + "kind": "interface", |
| 717 | + "description": "", |
| 718 | + "properties": [ |
| 719 | + { |
| 720 | + "name": "attempt", |
| 721 | + "type": "ResumeAttempt", |
| 722 | + "description": "", |
| 723 | + "optional": true |
| 724 | + }, |
| 725 | + { |
| 726 | + "name": "generation", |
| 727 | + "type": "number", |
| 728 | + "description": "", |
| 729 | + "optional": false |
| 730 | + }, |
| 731 | + { |
| 732 | + "name": "interrupts", |
| 733 | + "type": "object[]", |
| 734 | + "description": "", |
| 735 | + "optional": false |
| 736 | + }, |
| 737 | + { |
| 738 | + "name": "legacy", |
| 739 | + "type": "AgentInterrupt", |
| 740 | + "description": "", |
| 741 | + "optional": true |
| 742 | + }, |
| 743 | + { |
| 744 | + "name": "phase", |
| 745 | + "type": "InterruptSessionPhase", |
| 746 | + "description": "", |
| 747 | + "optional": false |
| 748 | + }, |
| 749 | + { |
| 750 | + "name": "runId", |
| 751 | + "type": "string", |
| 752 | + "description": "", |
| 753 | + "optional": true |
| 754 | + } |
| 755 | + ], |
| 756 | + "examples": [] |
| 757 | + }, |
| 758 | + { |
| 759 | + "name": "ResumeAttempt", |
| 760 | + "kind": "interface", |
| 761 | + "description": "", |
| 762 | + "properties": [ |
| 763 | + { |
| 764 | + "name": "generation", |
| 765 | + "type": "number", |
| 766 | + "description": "", |
| 767 | + "optional": false |
| 768 | + }, |
| 769 | + { |
| 770 | + "name": "id", |
| 771 | + "type": "string", |
| 772 | + "description": "", |
| 773 | + "optional": false |
| 774 | + }, |
| 775 | + { |
| 776 | + "name": "input", |
| 777 | + "type": "AgentSubmitInput", |
| 778 | + "description": "", |
| 779 | + "optional": false |
| 780 | + }, |
| 781 | + { |
| 782 | + "name": "parameters", |
| 783 | + "type": "object", |
| 784 | + "description": "", |
| 785 | + "optional": false |
| 786 | + }, |
| 787 | + { |
| 788 | + "name": "runId", |
| 789 | + "type": "string", |
| 790 | + "description": "", |
| 791 | + "optional": false |
| 792 | + } |
| 793 | + ], |
| 794 | + "examples": [] |
| 795 | + }, |
| 796 | + { |
| 797 | + "name": "ThreadSnapshot", |
| 798 | + "kind": "interface", |
| 799 | + "description": "Serializable protocol state at a confirmed run boundary.", |
| 800 | + "properties": [ |
| 801 | + { |
| 802 | + "name": "messages", |
| 803 | + "type": "object | object | object | object | object | object | object[]", |
| 804 | + "description": "", |
| 805 | + "optional": false |
| 806 | + }, |
| 807 | + { |
| 808 | + "name": "state", |
| 809 | + "type": "Record<string, unknown>", |
| 810 | + "description": "", |
| 811 | + "optional": false |
| 812 | + } |
| 813 | + ], |
| 814 | + "examples": [] |
| 815 | + }, |
561 | 816 | { |
562 | 817 | "name": "ToAgentOptions", |
563 | 818 | "kind": "interface", |
|
569 | 824 | "description": "A2UI client capabilities (catalog negotiation) to advertise to the agent.\nWhen set, they are seeded once into the AG-UI shared state under the\n`a2ui_client_capabilities` key, so every RunAgentInput.state carries them.\nUse `@threadplane/chat`'s `a2uiClientCapabilities()` for the renderer's\nstandard value.", |
570 | 825 | "optional": true |
571 | 826 | }, |
| 827 | + { |
| 828 | + "name": "interruptTransport", |
| 829 | + "type": "InterruptTransport", |
| 830 | + "description": "Native outcomes take precedence in auto mode; select a legacy profile explicitly when required.", |
| 831 | + "optional": true |
| 832 | + }, |
| 833 | + { |
| 834 | + "name": "persistence", |
| 835 | + "type": "AgUiInterruptPersistence", |
| 836 | + "description": "Application-owned durable storage. Requires a stable source threadId and scoped namespace.", |
| 837 | + "optional": true |
| 838 | + }, |
572 | 839 | { |
573 | 840 | "name": "telemetry", |
574 | 841 | "type": "false | AgentRuntimeTelemetrySink", |
|
585 | 852 | "signature": "readonly { events: readonly BaseEvent[]; when: \"initial\" | { toolMessageFor: string } }[]", |
586 | 853 | "examples": [] |
587 | 854 | }, |
| 855 | + { |
| 856 | + "name": "InterruptSessionPhase", |
| 857 | + "kind": "type", |
| 858 | + "description": "", |
| 859 | + "signature": "\"none\" | \"collecting\" | \"pending\" | \"claimed\" | \"resuming\" | \"acknowledged\" | \"uncertain\" | \"recovery-required\"", |
| 860 | + "examples": [] |
| 861 | + }, |
| 862 | + { |
| 863 | + "name": "InterruptTransport", |
| 864 | + "kind": "type", |
| 865 | + "description": "", |
| 866 | + "signature": "\"auto\" | \"protocol\" | \"legacy-command\" | \"mastra-command\"", |
| 867 | + "examples": [] |
| 868 | + }, |
588 | 869 | { |
589 | 870 | "name": "bridgeCitationsState", |
590 | 871 | "kind": "function", |
|
678 | 959 | { |
679 | 960 | "name": "toAgent", |
680 | 961 | "kind": "function", |
681 | | - "description": "Wraps an AG-UI AbstractAgent into the runtime-neutral Agent contract.\n\nThe adapter subscribes to source.subscribe({ onEvent }) and reduces every\nevent into the produced Agent's signals. submit() optimistically appends the\nuser message to both our signals and the source agent's internal message\nlist, then calls source.runAgent(). stop() calls source.abortRun().\n\nSubscription cleanup: the returned Agent does NOT manage its own lifetime.\nCallers using DI should rely on the provider's destroy hook; direct callers\nof toAgent() should treat the returned object's lifecycle as tied to the\nagent instance they constructed. The subscriber registered via\nsource.subscribe() will fire for the lifetime of source.", |
| 962 | + "description": "Wraps an AG-UI AbstractAgent into the runtime-neutral Agent contract.\n\nThe adapter subscribes to source.subscribe({ onEvent }) and reduces every\nevent into the produced Agent's signals. submit() optimistically appends the\nuser message to both our signals and the source agent's internal message\nlist, then calls source.runAgent(). stop() calls source.abortRun().\n\nSubscription cleanup: providers dispose the adapter with their injector.\nDirect callers must call dispose() when they no longer need the adapter.", |
682 | 963 | "signature": "toAgent(source: AbstractAgent<>, options: ToAgentOptions): AgUiAgent<>", |
683 | 964 | "params": [ |
684 | 965 | { |
|
0 commit comments