@reclaimprotocol/agent 0.1.34 → 0.1.35
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/README.md +3 -3
- package/lib/mcp/api/operations.gen.js +340 -150
- package/lib/mcp/instructions.js +3 -3
- package/lib/mcp/start.js +8 -7
- package/lib/mcp/tools/agent/build.js +2 -0
- package/lib/mcp/tools/agent/check-attestor.d.ts +5 -0
- package/lib/mcp/tools/agent/check-attestor.js +37 -0
- package/lib/mcp/tools/agent/live-view.js +42 -18
- package/lib/mcp/tools/agent/proof.d.ts +12 -0
- package/lib/mcp/tools/agent/proof.js +32 -0
- package/lib/mcp/tools/agent/shared.d.ts +2 -1
- package/lib/mcp/tools/agent/shared.js +28 -24
- package/lib/mcp/tools/agent/start-integration.js +5 -4
- package/lib/mcp/tools/verification/build.d.ts +3 -1
- package/lib/mcp/tools/verification/build.js +10 -2
- package/lib/mcp/tools/verification/callback-listener.d.ts +51 -0
- package/lib/mcp/tools/verification/callback-listener.js +163 -0
- package/lib/mcp/tools/verification/index.d.ts +2 -0
- package/lib/mcp/tools/verification/index.js +2 -0
- package/lib/mcp/tools/verification/proxy-callback-events.d.ts +59 -0
- package/lib/mcp/tools/verification/proxy-callback-events.js +300 -0
- package/lib/mcp/tools/verification/read-callback-events.d.ts +3 -0
- package/lib/mcp/tools/verification/read-callback-events.js +135 -0
- package/lib/mcp/tools/verification/result.d.ts +6 -0
- package/lib/mcp/tools/verification/result.js +1 -1
- package/lib/proof/check-attestor.d.ts +67 -0
- package/lib/proof/check-attestor.js +156 -0
- package/package.json +2 -2
- package/skill/SKILL.builder.md +7 -1
- package/skill/SKILL.common.md +21 -9
- package/skill/builder-mode.md +17 -12
- package/skill/start-integration.md +36 -11
- package/skill/verification-client-integration.md +15 -9
- package/src/mcp/api/operations.gen.ts +344 -150
- package/src/mcp/instructions.ts +3 -3
- package/src/mcp/start.ts +9 -7
- package/src/mcp/tools/agent/build.ts +2 -0
- package/src/mcp/tools/agent/check-attestor.ts +49 -0
- package/src/mcp/tools/agent/live-view.ts +42 -18
- package/src/mcp/tools/agent/proof.ts +55 -0
- package/src/mcp/tools/agent/shared.ts +33 -23
- package/src/mcp/tools/agent/start-integration.ts +5 -4
- package/src/mcp/tools/verification/build.ts +10 -2
- package/src/mcp/tools/verification/callback-listener.ts +203 -0
- package/src/mcp/tools/verification/index.ts +2 -0
- package/src/mcp/tools/verification/proxy-callback-events.ts +374 -0
- package/src/mcp/tools/verification/read-callback-events.ts +160 -0
- package/src/mcp/tools/verification/result.ts +1 -1
- package/src/proof/check-attestor.ts +209 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// AUTO-GENERATED by packages/app/scripts/mcp-tools-gen.ts
|
|
2
|
-
// from packages/app/openapi.yaml (spec v0.1.0, source sha256:
|
|
2
|
+
// from packages/app/openapi.yaml (spec v0.1.0, source sha256:de7373741e35).
|
|
3
3
|
// The hash catches drift the version misses (a spec can change without a
|
|
4
4
|
// version bump) — do not remove it as "redundant" with the version.
|
|
5
5
|
// Run `npm run openapi:gen --workspace=packages/app` to regenerate. Do not edit by hand.
|
|
@@ -502,7 +502,7 @@ export const MCP_TOOLS = {
|
|
|
502
502
|
annotations: {"openWorldHint":false},
|
|
503
503
|
},
|
|
504
504
|
"CreateCallbackSubscription": {
|
|
505
|
-
description: "Register a callback subscription\n\nRegisters a destination for verification results on the organization\nthe presented `OrgToken` resolves to.
|
|
505
|
+
description: "Register a callback subscription\n\nRegisters a destination for verification results on the organization\nthe presented `OrgToken` resolves to. At least one subscription must\nexist for the org before you can create a verification session.\nDelivery is scoped by org: terminal results are ECIES-encrypted to the\norg's eth public key when its `canEncryptResult` is enabled (see\n`PUT /orgs/{orgId}/keypair`), else delivered as plaintext.\n\nTo receive results at a URL, send `callbackUrl` and `events`. Builder\nPOSTs each delivery to that URL.\n\nTo read results without a public URL during local development, send\n`deliveryMode: \"pull\"`. Builder keeps the deliveries and you read them\nwith `GET /verifications/callback-events`. A pull subscription is a\n90-second lease: it receives events and satisfies the session-creation\ncheck only while the lease is unexpired. Send the same request about\nevery 30 seconds to renew it, and call\n`POST /verifications/callback-listener/release` when you stop. Production\nneeds a webhook subscription. An org has at most one pull subscription.\nIf it already exists, Builder renews it and returns it with status 200.\nIf the body includes `events`, they replace the subscription's events;\nif it omits them, the existing events are kept.\n",
|
|
506
506
|
inputSchema: toZod({
|
|
507
507
|
"type": "object",
|
|
508
508
|
"properties": {
|
|
@@ -519,83 +519,180 @@ export const MCP_TOOLS = {
|
|
|
519
519
|
}
|
|
520
520
|
},
|
|
521
521
|
"body": {
|
|
522
|
-
"
|
|
523
|
-
"
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
"
|
|
533
|
-
|
|
534
|
-
|
|
522
|
+
"description": "Body for `POST /verifications/callback-subscriptions`. The owning organization is resolved from the presented `OrgToken`; delivery is scoped to that org and encrypted to its credential when set. Send `callbackUrl` for a webhook, or `deliveryMode: \"pull\"` for a subscription you read.",
|
|
523
|
+
"oneOf": [
|
|
524
|
+
{
|
|
525
|
+
"type": "object",
|
|
526
|
+
"additionalProperties": false,
|
|
527
|
+
"description": "A subscription that Builder POSTs each delivery to.",
|
|
528
|
+
"required": [
|
|
529
|
+
"callbackUrl",
|
|
530
|
+
"events"
|
|
531
|
+
],
|
|
532
|
+
"properties": {
|
|
533
|
+
"deliveryMode": {
|
|
534
|
+
"type": "string",
|
|
535
|
+
"description": "Omit it or send `webhook`.",
|
|
536
|
+
"enum": [
|
|
537
|
+
"webhook"
|
|
538
|
+
]
|
|
539
|
+
},
|
|
540
|
+
"callbackUrl": {
|
|
541
|
+
"type": "string",
|
|
542
|
+
"pattern": "^https?://",
|
|
543
|
+
"description": "Callback URL or template. Supported placeholders are `{{sessionId}}` and top-level scalar context keys.",
|
|
544
|
+
"maxLength": 2000
|
|
545
|
+
},
|
|
546
|
+
"events": {
|
|
547
|
+
"type": "array",
|
|
548
|
+
"minItems": 1,
|
|
549
|
+
"maxItems": 51,
|
|
550
|
+
"items": {
|
|
551
|
+
"type": "string",
|
|
552
|
+
"description": "Canonical Builder lifecycle event. Names use lower snake case; metadata uses camel case. Provider events include providerId, resolvedVersion, and ordinal. Request events also include requestId. New values are additive, so clients must tolerate unknown response values. For field requirements and funnel semantics, see docs/verification-analytics-events.md.",
|
|
553
|
+
"enum": [
|
|
554
|
+
"billing_required",
|
|
555
|
+
"session_pending",
|
|
556
|
+
"verification_client_opened",
|
|
557
|
+
"verification_client_ready",
|
|
558
|
+
"verification_client_warning",
|
|
559
|
+
"verification_client_visibility_shown",
|
|
560
|
+
"verification_client_visibility_hidden",
|
|
561
|
+
"verification_diagnostics_mode_changed",
|
|
562
|
+
"verification_cancelled",
|
|
563
|
+
"consent_viewed",
|
|
564
|
+
"consent_scrolled",
|
|
565
|
+
"consent_agreed",
|
|
566
|
+
"verification_browser_started",
|
|
567
|
+
"verification_browser_ready",
|
|
568
|
+
"verification_browser_reconnect_started",
|
|
569
|
+
"verification_browser_reconnected",
|
|
570
|
+
"verification_browser_failed",
|
|
571
|
+
"verification_provider_started",
|
|
572
|
+
"provider_config",
|
|
573
|
+
"provider_script_log",
|
|
574
|
+
"network_request_observed",
|
|
575
|
+
"verification_page_ready",
|
|
576
|
+
"verification_request_interceptor_ready",
|
|
577
|
+
"verification_provider_completed",
|
|
578
|
+
"auth_required",
|
|
579
|
+
"auth_submitted",
|
|
580
|
+
"auth_challenge_remains",
|
|
581
|
+
"auth_rejected",
|
|
582
|
+
"auth_submission_failed",
|
|
583
|
+
"auth_challenge_completed",
|
|
584
|
+
"auth_gate_not_detected",
|
|
585
|
+
"authenticated",
|
|
586
|
+
"user_interaction_started",
|
|
587
|
+
"user_input_started",
|
|
588
|
+
"user_interaction_summary",
|
|
589
|
+
"verification_inactivity_detected",
|
|
590
|
+
"request_matched",
|
|
591
|
+
"request_match_failed",
|
|
592
|
+
"request_claim_parameters_captured",
|
|
593
|
+
"request_claim_created",
|
|
594
|
+
"request_claim_retrying",
|
|
595
|
+
"request_claim_completed",
|
|
596
|
+
"request_claim_rejected",
|
|
597
|
+
"request_claim_failed",
|
|
598
|
+
"verification_proofs_completed",
|
|
599
|
+
"verification_result_submitting",
|
|
600
|
+
"verification_result_submission_failed",
|
|
601
|
+
"verification_success",
|
|
602
|
+
"verification_rejected",
|
|
603
|
+
"verification_error",
|
|
604
|
+
"session_expired"
|
|
605
|
+
]
|
|
606
|
+
}
|
|
607
|
+
}
|
|
608
|
+
}
|
|
535
609
|
},
|
|
536
|
-
|
|
537
|
-
"type": "
|
|
538
|
-
"
|
|
539
|
-
"
|
|
540
|
-
"
|
|
541
|
-
"
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
"
|
|
546
|
-
"
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
"
|
|
552
|
-
"
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
"
|
|
558
|
-
"
|
|
559
|
-
"
|
|
560
|
-
"
|
|
561
|
-
"
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
610
|
+
{
|
|
611
|
+
"type": "object",
|
|
612
|
+
"additionalProperties": false,
|
|
613
|
+
"description": "A subscription whose deliveries wait for you to read them. It has no URL. An org has at most one.",
|
|
614
|
+
"required": [
|
|
615
|
+
"deliveryMode"
|
|
616
|
+
],
|
|
617
|
+
"properties": {
|
|
618
|
+
"deliveryMode": {
|
|
619
|
+
"type": "string",
|
|
620
|
+
"enum": [
|
|
621
|
+
"pull"
|
|
622
|
+
]
|
|
623
|
+
},
|
|
624
|
+
"callbackUrl": {
|
|
625
|
+
"description": "Not allowed. A pull subscription has no URL.",
|
|
626
|
+
"not": {
|
|
627
|
+
|
|
628
|
+
}
|
|
629
|
+
},
|
|
630
|
+
"events": {
|
|
631
|
+
"type": "array",
|
|
632
|
+
"description": "Events to keep. Defaults to every event.",
|
|
633
|
+
"minItems": 1,
|
|
634
|
+
"maxItems": 51,
|
|
635
|
+
"items": {
|
|
636
|
+
"type": "string",
|
|
637
|
+
"description": "Canonical Builder lifecycle event. Names use lower snake case; metadata uses camel case. Provider events include providerId, resolvedVersion, and ordinal. Request events also include requestId. New values are additive, so clients must tolerate unknown response values. For field requirements and funnel semantics, see docs/verification-analytics-events.md.",
|
|
638
|
+
"enum": [
|
|
639
|
+
"billing_required",
|
|
640
|
+
"session_pending",
|
|
641
|
+
"verification_client_opened",
|
|
642
|
+
"verification_client_ready",
|
|
643
|
+
"verification_client_warning",
|
|
644
|
+
"verification_client_visibility_shown",
|
|
645
|
+
"verification_client_visibility_hidden",
|
|
646
|
+
"verification_diagnostics_mode_changed",
|
|
647
|
+
"verification_cancelled",
|
|
648
|
+
"consent_viewed",
|
|
649
|
+
"consent_scrolled",
|
|
650
|
+
"consent_agreed",
|
|
651
|
+
"verification_browser_started",
|
|
652
|
+
"verification_browser_ready",
|
|
653
|
+
"verification_browser_reconnect_started",
|
|
654
|
+
"verification_browser_reconnected",
|
|
655
|
+
"verification_browser_failed",
|
|
656
|
+
"verification_provider_started",
|
|
657
|
+
"provider_config",
|
|
658
|
+
"provider_script_log",
|
|
659
|
+
"network_request_observed",
|
|
660
|
+
"verification_page_ready",
|
|
661
|
+
"verification_request_interceptor_ready",
|
|
662
|
+
"verification_provider_completed",
|
|
663
|
+
"auth_required",
|
|
664
|
+
"auth_submitted",
|
|
665
|
+
"auth_challenge_remains",
|
|
666
|
+
"auth_rejected",
|
|
667
|
+
"auth_submission_failed",
|
|
668
|
+
"auth_challenge_completed",
|
|
669
|
+
"auth_gate_not_detected",
|
|
670
|
+
"authenticated",
|
|
671
|
+
"user_interaction_started",
|
|
672
|
+
"user_input_started",
|
|
673
|
+
"user_interaction_summary",
|
|
674
|
+
"verification_inactivity_detected",
|
|
675
|
+
"request_matched",
|
|
676
|
+
"request_match_failed",
|
|
677
|
+
"request_claim_parameters_captured",
|
|
678
|
+
"request_claim_created",
|
|
679
|
+
"request_claim_retrying",
|
|
680
|
+
"request_claim_completed",
|
|
681
|
+
"request_claim_rejected",
|
|
682
|
+
"request_claim_failed",
|
|
683
|
+
"verification_proofs_completed",
|
|
684
|
+
"verification_result_submitting",
|
|
685
|
+
"verification_result_submission_failed",
|
|
686
|
+
"verification_success",
|
|
687
|
+
"verification_rejected",
|
|
688
|
+
"verification_error",
|
|
689
|
+
"session_expired"
|
|
690
|
+
]
|
|
691
|
+
}
|
|
692
|
+
}
|
|
596
693
|
}
|
|
597
694
|
}
|
|
598
|
-
|
|
695
|
+
]
|
|
599
696
|
},
|
|
600
697
|
"orgToken": {
|
|
601
698
|
"type": "string",
|
|
@@ -681,83 +778,180 @@ export const MCP_TOOLS = {
|
|
|
681
778
|
}
|
|
682
779
|
},
|
|
683
780
|
"body": {
|
|
684
|
-
"
|
|
685
|
-
"
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
"
|
|
695
|
-
|
|
696
|
-
|
|
781
|
+
"description": "Body for `POST /orgs/{orgId}/callback-subscriptions`. The owning organization comes from the path; bearer-authenticated and gated on org membership. Delivery is scoped to the org and encrypted to its credential when set. Send `callbackUrl` for a webhook, or `deliveryMode: \"pull\"` for a subscription you read.",
|
|
782
|
+
"oneOf": [
|
|
783
|
+
{
|
|
784
|
+
"type": "object",
|
|
785
|
+
"additionalProperties": false,
|
|
786
|
+
"description": "A subscription that Builder POSTs each delivery to.",
|
|
787
|
+
"required": [
|
|
788
|
+
"callbackUrl",
|
|
789
|
+
"events"
|
|
790
|
+
],
|
|
791
|
+
"properties": {
|
|
792
|
+
"deliveryMode": {
|
|
793
|
+
"type": "string",
|
|
794
|
+
"description": "Omit it or send `webhook`.",
|
|
795
|
+
"enum": [
|
|
796
|
+
"webhook"
|
|
797
|
+
]
|
|
798
|
+
},
|
|
799
|
+
"callbackUrl": {
|
|
800
|
+
"type": "string",
|
|
801
|
+
"pattern": "^https?://",
|
|
802
|
+
"description": "Callback URL or template. Supported placeholders are `{{sessionId}}` and top-level scalar context keys.",
|
|
803
|
+
"maxLength": 2000
|
|
804
|
+
},
|
|
805
|
+
"events": {
|
|
806
|
+
"type": "array",
|
|
807
|
+
"minItems": 1,
|
|
808
|
+
"maxItems": 51,
|
|
809
|
+
"items": {
|
|
810
|
+
"type": "string",
|
|
811
|
+
"description": "Canonical Builder lifecycle event. Names use lower snake case; metadata uses camel case. Provider events include providerId, resolvedVersion, and ordinal. Request events also include requestId. New values are additive, so clients must tolerate unknown response values. For field requirements and funnel semantics, see docs/verification-analytics-events.md.",
|
|
812
|
+
"enum": [
|
|
813
|
+
"billing_required",
|
|
814
|
+
"session_pending",
|
|
815
|
+
"verification_client_opened",
|
|
816
|
+
"verification_client_ready",
|
|
817
|
+
"verification_client_warning",
|
|
818
|
+
"verification_client_visibility_shown",
|
|
819
|
+
"verification_client_visibility_hidden",
|
|
820
|
+
"verification_diagnostics_mode_changed",
|
|
821
|
+
"verification_cancelled",
|
|
822
|
+
"consent_viewed",
|
|
823
|
+
"consent_scrolled",
|
|
824
|
+
"consent_agreed",
|
|
825
|
+
"verification_browser_started",
|
|
826
|
+
"verification_browser_ready",
|
|
827
|
+
"verification_browser_reconnect_started",
|
|
828
|
+
"verification_browser_reconnected",
|
|
829
|
+
"verification_browser_failed",
|
|
830
|
+
"verification_provider_started",
|
|
831
|
+
"provider_config",
|
|
832
|
+
"provider_script_log",
|
|
833
|
+
"network_request_observed",
|
|
834
|
+
"verification_page_ready",
|
|
835
|
+
"verification_request_interceptor_ready",
|
|
836
|
+
"verification_provider_completed",
|
|
837
|
+
"auth_required",
|
|
838
|
+
"auth_submitted",
|
|
839
|
+
"auth_challenge_remains",
|
|
840
|
+
"auth_rejected",
|
|
841
|
+
"auth_submission_failed",
|
|
842
|
+
"auth_challenge_completed",
|
|
843
|
+
"auth_gate_not_detected",
|
|
844
|
+
"authenticated",
|
|
845
|
+
"user_interaction_started",
|
|
846
|
+
"user_input_started",
|
|
847
|
+
"user_interaction_summary",
|
|
848
|
+
"verification_inactivity_detected",
|
|
849
|
+
"request_matched",
|
|
850
|
+
"request_match_failed",
|
|
851
|
+
"request_claim_parameters_captured",
|
|
852
|
+
"request_claim_created",
|
|
853
|
+
"request_claim_retrying",
|
|
854
|
+
"request_claim_completed",
|
|
855
|
+
"request_claim_rejected",
|
|
856
|
+
"request_claim_failed",
|
|
857
|
+
"verification_proofs_completed",
|
|
858
|
+
"verification_result_submitting",
|
|
859
|
+
"verification_result_submission_failed",
|
|
860
|
+
"verification_success",
|
|
861
|
+
"verification_rejected",
|
|
862
|
+
"verification_error",
|
|
863
|
+
"session_expired"
|
|
864
|
+
]
|
|
865
|
+
}
|
|
866
|
+
}
|
|
867
|
+
}
|
|
697
868
|
},
|
|
698
|
-
|
|
699
|
-
"type": "
|
|
700
|
-
"
|
|
701
|
-
"
|
|
702
|
-
"
|
|
703
|
-
"
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
"
|
|
708
|
-
"
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
"
|
|
714
|
-
"
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
"
|
|
720
|
-
"
|
|
721
|
-
"
|
|
722
|
-
"
|
|
723
|
-
"
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
869
|
+
{
|
|
870
|
+
"type": "object",
|
|
871
|
+
"additionalProperties": false,
|
|
872
|
+
"description": "A subscription whose deliveries wait for you to read them. It has no URL. An org has at most one.",
|
|
873
|
+
"required": [
|
|
874
|
+
"deliveryMode"
|
|
875
|
+
],
|
|
876
|
+
"properties": {
|
|
877
|
+
"deliveryMode": {
|
|
878
|
+
"type": "string",
|
|
879
|
+
"enum": [
|
|
880
|
+
"pull"
|
|
881
|
+
]
|
|
882
|
+
},
|
|
883
|
+
"callbackUrl": {
|
|
884
|
+
"description": "Not allowed. A pull subscription has no URL.",
|
|
885
|
+
"not": {
|
|
886
|
+
|
|
887
|
+
}
|
|
888
|
+
},
|
|
889
|
+
"events": {
|
|
890
|
+
"type": "array",
|
|
891
|
+
"description": "Events to keep. Defaults to every event.",
|
|
892
|
+
"minItems": 1,
|
|
893
|
+
"maxItems": 51,
|
|
894
|
+
"items": {
|
|
895
|
+
"type": "string",
|
|
896
|
+
"description": "Canonical Builder lifecycle event. Names use lower snake case; metadata uses camel case. Provider events include providerId, resolvedVersion, and ordinal. Request events also include requestId. New values are additive, so clients must tolerate unknown response values. For field requirements and funnel semantics, see docs/verification-analytics-events.md.",
|
|
897
|
+
"enum": [
|
|
898
|
+
"billing_required",
|
|
899
|
+
"session_pending",
|
|
900
|
+
"verification_client_opened",
|
|
901
|
+
"verification_client_ready",
|
|
902
|
+
"verification_client_warning",
|
|
903
|
+
"verification_client_visibility_shown",
|
|
904
|
+
"verification_client_visibility_hidden",
|
|
905
|
+
"verification_diagnostics_mode_changed",
|
|
906
|
+
"verification_cancelled",
|
|
907
|
+
"consent_viewed",
|
|
908
|
+
"consent_scrolled",
|
|
909
|
+
"consent_agreed",
|
|
910
|
+
"verification_browser_started",
|
|
911
|
+
"verification_browser_ready",
|
|
912
|
+
"verification_browser_reconnect_started",
|
|
913
|
+
"verification_browser_reconnected",
|
|
914
|
+
"verification_browser_failed",
|
|
915
|
+
"verification_provider_started",
|
|
916
|
+
"provider_config",
|
|
917
|
+
"provider_script_log",
|
|
918
|
+
"network_request_observed",
|
|
919
|
+
"verification_page_ready",
|
|
920
|
+
"verification_request_interceptor_ready",
|
|
921
|
+
"verification_provider_completed",
|
|
922
|
+
"auth_required",
|
|
923
|
+
"auth_submitted",
|
|
924
|
+
"auth_challenge_remains",
|
|
925
|
+
"auth_rejected",
|
|
926
|
+
"auth_submission_failed",
|
|
927
|
+
"auth_challenge_completed",
|
|
928
|
+
"auth_gate_not_detected",
|
|
929
|
+
"authenticated",
|
|
930
|
+
"user_interaction_started",
|
|
931
|
+
"user_input_started",
|
|
932
|
+
"user_interaction_summary",
|
|
933
|
+
"verification_inactivity_detected",
|
|
934
|
+
"request_matched",
|
|
935
|
+
"request_match_failed",
|
|
936
|
+
"request_claim_parameters_captured",
|
|
937
|
+
"request_claim_created",
|
|
938
|
+
"request_claim_retrying",
|
|
939
|
+
"request_claim_completed",
|
|
940
|
+
"request_claim_rejected",
|
|
941
|
+
"request_claim_failed",
|
|
942
|
+
"verification_proofs_completed",
|
|
943
|
+
"verification_result_submitting",
|
|
944
|
+
"verification_result_submission_failed",
|
|
945
|
+
"verification_success",
|
|
946
|
+
"verification_rejected",
|
|
947
|
+
"verification_error",
|
|
948
|
+
"session_expired"
|
|
949
|
+
]
|
|
950
|
+
}
|
|
951
|
+
}
|
|
758
952
|
}
|
|
759
953
|
}
|
|
760
|
-
|
|
954
|
+
]
|
|
761
955
|
}
|
|
762
956
|
},
|
|
763
957
|
"required": [
|
package/src/mcp/instructions.ts
CHANGED
|
@@ -77,9 +77,9 @@ const TOPIC_SUMMARIES: Record<string, string> = {
|
|
|
77
77
|
+ 'providers, and going live.',
|
|
78
78
|
'discover': 'Reusing existing providers: finding, resolving, and '
|
|
79
79
|
+ 'creating a verification session.',
|
|
80
|
-
'integration': 'After start_integration: org key, callback
|
|
81
|
-
+ '
|
|
82
|
-
+ 'verification.',
|
|
80
|
+
'integration': 'After start_integration: org key, callback (local '
|
|
81
|
+
+ 'proxy_callback_events or deployed webhook), frontend and backend '
|
|
82
|
+
+ 'over the HTTP session API; `api=2` and result verification.',
|
|
83
83
|
'user-script': 'The navigation script (jsUserScripts): sign-in redirect, '
|
|
84
84
|
+ 'multi-page walk, test_user_script with keep.',
|
|
85
85
|
'interception': 'injectionType / interceptorType, live interception, the '
|
package/src/mcp/start.ts
CHANGED
|
@@ -31,6 +31,8 @@ import {
|
|
|
31
31
|
buildVerificationTools,
|
|
32
32
|
disposeAgentState,
|
|
33
33
|
readSession,
|
|
34
|
+
releaseAllListeners,
|
|
35
|
+
stopAllForwarders,
|
|
34
36
|
} from './tools/index.ts'
|
|
35
37
|
import { BUILDER_MODE_INSTRUCTIONS } from './instructions.ts'
|
|
36
38
|
import { registerToolList } from './server.ts'
|
|
@@ -133,7 +135,7 @@ export async function startMcpServer() {
|
|
|
133
135
|
// the session can end without a single tool call: the developer closes their
|
|
134
136
|
// agent, the client kills the server, stdin drops. Nothing ran here before,
|
|
135
137
|
// which left a container up after the session that made it was gone.
|
|
136
|
-
if(agentToolsEnabled) {
|
|
138
|
+
if(agentToolsEnabled || !oldMode) {
|
|
137
139
|
installShutdownHooks(() => agentState)
|
|
138
140
|
}
|
|
139
141
|
|
|
@@ -160,11 +162,7 @@ function installShutdownHooks(state: () => AgentState | undefined): void {
|
|
|
160
162
|
|
|
161
163
|
shuttingDown = true
|
|
162
164
|
const current = state()
|
|
163
|
-
|
|
164
|
-
process.exit(0)
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
LOGGER.info({ reason }, 'releasing the browser before exit')
|
|
165
|
+
LOGGER.info({ reason }, 'releasing resources before exit')
|
|
168
166
|
// Bounded: a wedged `docker stop` must not keep the process alive, but
|
|
169
167
|
// nor should we skip cleanup that would have finished in a second.
|
|
170
168
|
const timer = setTimeout(() => {
|
|
@@ -172,7 +170,11 @@ function installShutdownHooks(state: () => AgentState | undefined): void {
|
|
|
172
170
|
process.exit(0)
|
|
173
171
|
}, SHUTDOWN_GRACE_MS)
|
|
174
172
|
timer.unref()
|
|
175
|
-
void
|
|
173
|
+
void Promise.all([
|
|
174
|
+
stopAllForwarders(),
|
|
175
|
+
releaseAllListeners(),
|
|
176
|
+
current && disposeAgentState(current),
|
|
177
|
+
])
|
|
176
178
|
.catch((err: unknown) => {
|
|
177
179
|
LOGGER.warn({ err }, 'teardown failed')
|
|
178
180
|
})
|
|
@@ -17,6 +17,7 @@ import { type RegisteredTool } from '../../server.ts'
|
|
|
17
17
|
import { analyzeTool } from './analyze.ts'
|
|
18
18
|
import { type AttachState, attachTool } from './attach.ts'
|
|
19
19
|
import { type CaptureStore, captureTools, resetCaptures } from './capture.ts'
|
|
20
|
+
import { checkAttestorTool } from './check-attestor.ts'
|
|
20
21
|
import { listTabsTool } from './eval.ts'
|
|
21
22
|
import { howItWorksTool } from './how-it-works.ts'
|
|
22
23
|
import { liveViewTools } from './live-view.ts'
|
|
@@ -83,6 +84,7 @@ export function buildAgentTools(
|
|
|
83
84
|
}
|
|
84
85
|
|
|
85
86
|
tools.push(analyzeTool(state.captures))
|
|
87
|
+
tools.push(checkAttestorTool())
|
|
86
88
|
// navigate / eval_in_page / wait_for_page / get_cookies / list_requests /
|
|
87
89
|
// find_requests_containing / propose_provider / replay_request / run_proof —
|
|
88
90
|
// shared with the cloud loop, bound to each capture's local backend.
|