@reclaimprotocol/agent 0.1.1 → 0.1.3

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 (74) hide show
  1. package/lib/cdp/launcher.js +4 -3
  2. package/lib/consts.d.ts +68 -0
  3. package/lib/consts.js +134 -0
  4. package/lib/logger.js +2 -1
  5. package/lib/mcp/api/operations.gen.d.ts +11 -7
  6. package/lib/mcp/api/operations.gen.js +356 -199
  7. package/lib/mcp/server.d.ts +0 -6
  8. package/lib/mcp/server.js +0 -30
  9. package/lib/mcp/start.js +7 -7
  10. package/lib/mcp/tools/agent/build.d.ts +5 -9
  11. package/lib/mcp/tools/agent/build.js +5 -9
  12. package/lib/mcp/tools/agent/proof.js +2 -1
  13. package/lib/mcp/tools/agent/publish.js +166 -77
  14. package/lib/mcp/tools/authenticate/decrypt-key.d.ts +10 -23
  15. package/lib/mcp/tools/authenticate/decrypt-key.js +23 -26
  16. package/lib/mcp/tools/authenticate/eth-key.d.ts +0 -7
  17. package/lib/mcp/tools/authenticate/eth-key.js +5 -19
  18. package/lib/mcp/tools/authenticate/issue.js +1 -1
  19. package/lib/mcp/tools/verification/build.d.ts +1 -1
  20. package/lib/mcp/tools/verification/build.js +1 -1
  21. package/lib/mcp/tools/verification/result.d.ts +4 -5
  22. package/lib/mcp/tools/verification/result.js +17 -17
  23. package/lib/old/flag.d.ts +4 -1
  24. package/lib/old/flag.js +4 -3
  25. package/lib/old/identity.d.ts +0 -10
  26. package/lib/old/identity.js +8 -7
  27. package/lib/old/login-cdp.d.ts +0 -3
  28. package/lib/old/login-cdp.js +2 -4
  29. package/lib/old/to-register.d.ts +5 -3
  30. package/lib/old/to-register.js +20 -15
  31. package/lib/old/tools/authenticate.js +2 -1
  32. package/lib/old/tools/publish.js +97 -13
  33. package/lib/paths.js +2 -2
  34. package/lib/proof/attestor.js +2 -1
  35. package/lib/proof/proof-core.js +13 -2
  36. package/lib/provider/injection-doc.d.ts +1 -0
  37. package/lib/provider/injection-doc.js +17 -0
  38. package/lib/provider/match-redaction-warning.d.ts +25 -0
  39. package/lib/provider/match-redaction-warning.js +35 -0
  40. package/lib/provider/schema.d.ts +16 -0
  41. package/lib/provider/schema.js +11 -1
  42. package/lib/provider/to-version.d.ts +59 -7
  43. package/lib/provider/to-version.js +79 -28
  44. package/package.json +1 -1
  45. package/skill/builder-mode.md +8 -2
  46. package/skill/injection-api.md +42 -0
  47. package/skill/old-mode.md +4 -2
  48. package/src/cdp/launcher.ts +5 -4
  49. package/src/consts.ts +164 -0
  50. package/src/logger.ts +2 -1
  51. package/src/mcp/api/operations.gen.ts +358 -203
  52. package/src/mcp/server.ts +0 -46
  53. package/src/mcp/start.ts +13 -7
  54. package/src/mcp/tools/agent/build.ts +5 -9
  55. package/src/mcp/tools/agent/proof.ts +2 -1
  56. package/src/mcp/tools/agent/publish.ts +212 -94
  57. package/src/mcp/tools/authenticate/decrypt-key.ts +24 -29
  58. package/src/mcp/tools/authenticate/eth-key.ts +5 -25
  59. package/src/mcp/tools/authenticate/issue.ts +1 -1
  60. package/src/mcp/tools/verification/build.ts +1 -1
  61. package/src/mcp/tools/verification/result.ts +16 -17
  62. package/src/old/flag.ts +4 -3
  63. package/src/old/identity.ts +8 -7
  64. package/src/old/login-cdp.ts +2 -5
  65. package/src/old/to-register.ts +22 -16
  66. package/src/old/tools/authenticate.ts +2 -1
  67. package/src/old/tools/publish.ts +124 -20
  68. package/src/paths.ts +2 -2
  69. package/src/proof/attestor.ts +2 -1
  70. package/src/proof/proof-core.ts +13 -3
  71. package/src/provider/injection-doc.ts +21 -0
  72. package/src/provider/match-redaction-warning.ts +53 -0
  73. package/src/provider/schema.ts +23 -0
  74. package/src/provider/to-version.ts +137 -31
@@ -274,7 +274,7 @@ export const MCP_TOOLS = {
274
274
  }),
275
275
  },
276
276
  "CreateCallbackSubscription": {
277
- description: "Register a callback subscription\n\nRegisters a destination for verification results on the organization\nthe presented `OrgToken` resolves to. The body is just `callbackUrl`\nand `events`. At least one subscription must exist for the org before a\nverification session can be created. Delivery is scoped by org: terminal\nresults are encrypted as a compact JWE to the org's encryption\ncredential when set (see `PUT /orgs/{orgId}/credential`), else delivered\nas plaintext.\n",
277
+ description: "Register a callback subscription\n\nRegisters a destination for verification results on the organization\nthe presented `OrgToken` resolves to. The body is just `callbackUrl`\nand `events`. At least one subscription must exist for the org before a\nverification session can be created. Delivery is scoped by org: terminal\nresults are ECIES-encrypted to the org's eth public key when its\n`canEncryptResult` is enabled (see `PUT /orgs/{orgId}/keypair`), else\ndelivered as plaintext.\n",
278
278
  inputSchema: toZod({
279
279
  "type": "object",
280
280
  "properties": {
@@ -306,11 +306,12 @@ export const MCP_TOOLS = {
306
306
  "maxItems": 12,
307
307
  "items": {
308
308
  "type": "string",
309
- "description": "Lifecycle event reported for a verification session. A healthy run\nproceeds through these in order; reading the gaps locates where a\nsession stalled. Session-level terminal events trigger callback\ndelivery; request-level events are progress pings carrying a\n`request_id` in their event data. New values may be added over time;\nclients MUST tolerate unknown values in responses.\n\n- `session_pending`: Session created; awaiting the end-user.\n\n- `verification_client_opened`: The end-user opened the link. Absent ⇒\n the link was never opened.\n\n- `verification_client_ready`: The client initialized.\n\n- `request_matched`: The target request was captured on the provider\n site. Absent (after opened) ⇒ the user didn't complete the journey.\n\n- `request_claim_created`: A proof claim was started.\n\n- `request_claim_completed`: A proof claim finished.\n\n- `request_claim_rejected`: A claim was rejected (detail in `eventData`).\n\n- `request_claim_failed`: A claim errored (detail in `eventData`).\n\n- `verification_success`: Terminal — verified. Triggers callback delivery.\n\n- `verification_rejected`: Terminal — rejected (detail in `eventData`).\n\n- `verification_error`: Terminal — errored (detail in `eventData`).\n\n- `session_expired`: `expiresAt` passed before a terminal event.",
309
+ "description": "Lifecycle event reported for a verification session. A healthy run\nproceeds through these in order; reading the gaps locates where a\nsession stalled. Session-level terminal events trigger callback\ndelivery; provider-/request-level events are progress pings carrying a\n`provider_id` (and `request_id` for request-level ones) in their event\ndata. New values may be added over time; clients MUST tolerate unknown\nvalues in responses.\n\n- `session_pending`: Session created; awaiting the end-user.\n\n- `verification_client_opened`: The end-user opened the link. Absent ⇒\n the link was never opened.\n\n- `verification_client_ready`: The client initialized.\n\n- `verification_provider_started`: The client began verifying a provider\n (`provider_id`/`resolved_version`/`ordinal` in `eventData`). One per\n provider, in run order, for multi-provider sessions.\n\n- `request_matched`: The target request was captured on the provider\n site. Absent (after opened) ⇒ the user didn't complete the journey.\n\n- `request_claim_created`: A proof claim was started.\n\n- `request_claim_completed`: A proof claim finished.\n\n- `request_claim_rejected`: A claim was rejected (detail in `eventData`).\n\n- `request_claim_failed`: A claim errored (detail in `eventData`).\n\n- `verification_success`: Terminal — verified. Triggers callback delivery.\n\n- `verification_rejected`: Terminal — rejected (detail in `eventData`).\n\n- `verification_error`: Terminal — errored (detail in `eventData`).\n\n- `session_expired`: `expiresAt` passed before a terminal event.",
310
310
  "enum": [
311
311
  "session_pending",
312
312
  "verification_client_opened",
313
313
  "verification_client_ready",
314
+ "verification_provider_started",
314
315
  "request_matched",
315
316
  "request_claim_created",
316
317
  "request_claim_completed",
@@ -350,14 +351,26 @@ export const MCP_TOOLS = {
350
351
  "body": {
351
352
  "type": "object",
352
353
  "additionalProperties": false,
354
+ "description": "Body for `POST /orgs`. Explicitly-created orgs must declare their Ethereum (secp256k1) encryption public key — it identifies the org and, when `canEncryptResult` is enabled, encrypts delivered results.",
353
355
  "required": [
354
- "name"
356
+ "name",
357
+ "publicKey"
355
358
  ],
356
359
  "properties": {
357
360
  "name": {
358
361
  "type": "string",
359
362
  "minLength": 1,
360
363
  "maxLength": 200
364
+ },
365
+ "publicKey": {
366
+ "type": "string",
367
+ "description": "The org's eth public key, uncompressed hex (`0x04` + 128 hex) — the eth-native form wallets/ethers emit. The matching private key never leaves the consumer.",
368
+ "pattern": "^0x04[0-9a-fA-F]{128}$"
369
+ },
370
+ "canEncryptResult": {
371
+ "type": "boolean",
372
+ "description": "When true, terminal results are ECIES-encrypted to this key; when false (the default), they are delivered as plaintext.",
373
+ "default": false
361
374
  }
362
375
  }
363
376
  }
@@ -412,11 +425,12 @@ export const MCP_TOOLS = {
412
425
  "maxItems": 12,
413
426
  "items": {
414
427
  "type": "string",
415
- "description": "Lifecycle event reported for a verification session. A healthy run\nproceeds through these in order; reading the gaps locates where a\nsession stalled. Session-level terminal events trigger callback\ndelivery; request-level events are progress pings carrying a\n`request_id` in their event data. New values may be added over time;\nclients MUST tolerate unknown values in responses.\n\n- `session_pending`: Session created; awaiting the end-user.\n\n- `verification_client_opened`: The end-user opened the link. Absent ⇒\n the link was never opened.\n\n- `verification_client_ready`: The client initialized.\n\n- `request_matched`: The target request was captured on the provider\n site. Absent (after opened) ⇒ the user didn't complete the journey.\n\n- `request_claim_created`: A proof claim was started.\n\n- `request_claim_completed`: A proof claim finished.\n\n- `request_claim_rejected`: A claim was rejected (detail in `eventData`).\n\n- `request_claim_failed`: A claim errored (detail in `eventData`).\n\n- `verification_success`: Terminal — verified. Triggers callback delivery.\n\n- `verification_rejected`: Terminal — rejected (detail in `eventData`).\n\n- `verification_error`: Terminal — errored (detail in `eventData`).\n\n- `session_expired`: `expiresAt` passed before a terminal event.",
428
+ "description": "Lifecycle event reported for a verification session. A healthy run\nproceeds through these in order; reading the gaps locates where a\nsession stalled. Session-level terminal events trigger callback\ndelivery; provider-/request-level events are progress pings carrying a\n`provider_id` (and `request_id` for request-level ones) in their event\ndata. New values may be added over time; clients MUST tolerate unknown\nvalues in responses.\n\n- `session_pending`: Session created; awaiting the end-user.\n\n- `verification_client_opened`: The end-user opened the link. Absent ⇒\n the link was never opened.\n\n- `verification_client_ready`: The client initialized.\n\n- `verification_provider_started`: The client began verifying a provider\n (`provider_id`/`resolved_version`/`ordinal` in `eventData`). One per\n provider, in run order, for multi-provider sessions.\n\n- `request_matched`: The target request was captured on the provider\n site. Absent (after opened) ⇒ the user didn't complete the journey.\n\n- `request_claim_created`: A proof claim was started.\n\n- `request_claim_completed`: A proof claim finished.\n\n- `request_claim_rejected`: A claim was rejected (detail in `eventData`).\n\n- `request_claim_failed`: A claim errored (detail in `eventData`).\n\n- `verification_success`: Terminal — verified. Triggers callback delivery.\n\n- `verification_rejected`: Terminal — rejected (detail in `eventData`).\n\n- `verification_error`: Terminal — errored (detail in `eventData`).\n\n- `session_expired`: `expiresAt` passed before a terminal event.",
416
429
  "enum": [
417
430
  "session_pending",
418
431
  "verification_client_opened",
419
432
  "verification_client_ready",
433
+ "verification_provider_started",
420
434
  "request_matched",
421
435
  "request_claim_created",
422
436
  "request_claim_completed",
@@ -713,9 +727,9 @@ export const MCP_TOOLS = {
713
727
  }
714
728
  }
715
729
  },
716
- "matches": {
730
+ "responseMatches": {
717
731
  "type": "array",
718
- "description": "A list of match conditions for the response.",
732
+ "description": "Conditions the (redacted) response must satisfy for the proof to be valid. Each runs against the union of the portions revealed by `responseRedactions` (or the whole response when there are none). Mirrors attestor-core `responseMatches`.",
719
733
  "minItems": 1,
720
734
  "items": {
721
735
  "type": "object",
@@ -753,33 +767,38 @@ export const MCP_TOOLS = {
753
767
  "value": {
754
768
  "type": "string",
755
769
  "description": "The pattern or value to look for in the response. When `type` is 'contains', supports template variable declaration using `{{variable}}` syntax. When `type` is 'regex', can be used to extract variables using regex named groups."
770
+ }
771
+ }
772
+ }
773
+ },
774
+ "responseRedactions": {
775
+ "type": "array",
776
+ "description": "Portions to select/reveal from the response, applied in order (xPath => jsonPath => regex). Done client-side; only the selected portions (plus the first response line) are sent to the attestor. An independent ordered list — NOT paired 1:1 with `responseMatches`. Mirrors attestor-core `responseRedactions`.",
777
+ "items": {
778
+ "type": "object",
779
+ "additionalProperties": false,
780
+ "description": "Which portions to select from a response. These are selected in order, xpath => jsonPath => regex * These redactions are done client side and only the selected portions are sent to the attestor. The attestor will only be able to see the selected portions alongside the first line of the HTTP response (i.e. \"HTTP/1.1 200 OK\")",
781
+ "properties": {
782
+ "xPath": {
783
+ "type": "string",
784
+ "description": "expect an HTML response, and to contain a certain xpath for eg. \"/html/body/div.a1/div.a2/span.a5\""
756
785
  },
757
- "extract": {
758
- "type": "object",
759
- "description": "Which portions to select from a response. These are selected in order, xpath => jsonPath => regex * These redactions are done client side and only the selected portions are sent to the attestor. The attestor will only be able to see the selected portions alongside the first line of the HTTP response (i.e. \"HTTP/1.1 200 OK\")",
760
- "properties": {
761
- "xPath": {
762
- "type": "string",
763
- "description": "expect an HTML response, and to contain a certain xpath for eg. \"/html/body/div.a1/div.a2/span.a5\""
764
- },
765
- "jsonPath": {
766
- "type": "string",
767
- "description": "expect a JSON response, retrieve the item at this path using dot notation for e.g. 'email.addresses.0'"
768
- },
769
- "regex": {
770
- "type": "string",
771
- "description": "select a regex match from the response"
772
- },
773
- "hash": {
774
- "type": "string",
775
- "description": "If provided, the value inside will be hashed instead of being redacted. Useful for cases where the data inside is an identifiying piece of information that you don't want to reveal to the attestor, eg. an email address.\nIf the hash function produces more bytes than the original value, the hash will be truncated.\nEg. if hash is enabled, the original value is \"hello\", and hashed is \"a1b2c\", then the attestor will only see \"a1b2c\".\nNote: if a regex with named groups is provided, only the named groups will be hashed.",
776
- "enum": [
777
- "oprf",
778
- "oprf-mpc",
779
- "oprf-raw"
780
- ]
781
- }
782
- }
786
+ "jsonPath": {
787
+ "type": "string",
788
+ "description": "expect a JSON response, retrieve the item at this path using dot notation for e.g. 'email.addresses.0'"
789
+ },
790
+ "regex": {
791
+ "type": "string",
792
+ "description": "select a regex match from the response"
793
+ },
794
+ "hash": {
795
+ "type": "string",
796
+ "description": "If provided, the value inside will be hashed instead of being redacted. Useful for cases where the data inside is an identifiying piece of information that you don't want to reveal to the attestor, eg. an email address.\nIf the hash function produces more bytes than the original value, the hash will be truncated.\nEg. if hash is enabled, the original value is \"hello\", and hashed is \"a1b2c\", then the attestor will only see \"a1b2c\".\nNote: if a regex with named groups is provided, only the named groups will be hashed.",
797
+ "enum": [
798
+ "oprf",
799
+ "oprf-mpc",
800
+ "oprf-raw"
801
+ ]
783
802
  }
784
803
  }
785
804
  }
@@ -862,9 +881,9 @@ export const MCP_TOOLS = {
862
881
  }
863
882
  }
864
883
  },
865
- "matches": {
884
+ "responseMatches": {
866
885
  "type": "array",
867
- "description": "A list of match conditions for the response.",
886
+ "description": "Conditions the (redacted) response must satisfy for the proof to be valid. Each runs against the union of the portions revealed by `responseRedactions` (or the whole response when there are none). Mirrors attestor-core `responseMatches`.",
868
887
  "minItems": 1,
869
888
  "items": {
870
889
  "type": "object",
@@ -902,33 +921,38 @@ export const MCP_TOOLS = {
902
921
  "value": {
903
922
  "type": "string",
904
923
  "description": "The pattern or value to look for in the response. When `type` is 'contains', supports template variable declaration using `{{variable}}` syntax. When `type` is 'regex', can be used to extract variables using regex named groups."
924
+ }
925
+ }
926
+ }
927
+ },
928
+ "responseRedactions": {
929
+ "type": "array",
930
+ "description": "Portions to select/reveal from the response, applied in order (xPath => jsonPath => regex). Done client-side; only the selected portions (plus the first response line) are sent to the attestor. An independent ordered list — NOT paired 1:1 with `responseMatches`. Mirrors attestor-core `responseRedactions`.",
931
+ "items": {
932
+ "type": "object",
933
+ "additionalProperties": false,
934
+ "description": "Which portions to select from a response. These are selected in order, xpath => jsonPath => regex * These redactions are done client side and only the selected portions are sent to the attestor. The attestor will only be able to see the selected portions alongside the first line of the HTTP response (i.e. \"HTTP/1.1 200 OK\")",
935
+ "properties": {
936
+ "xPath": {
937
+ "type": "string",
938
+ "description": "expect an HTML response, and to contain a certain xpath for eg. \"/html/body/div.a1/div.a2/span.a5\""
939
+ },
940
+ "jsonPath": {
941
+ "type": "string",
942
+ "description": "expect a JSON response, retrieve the item at this path using dot notation for e.g. 'email.addresses.0'"
943
+ },
944
+ "regex": {
945
+ "type": "string",
946
+ "description": "select a regex match from the response"
905
947
  },
906
- "extract": {
907
- "type": "object",
908
- "description": "Which portions to select from a response. These are selected in order, xpath => jsonPath => regex * These redactions are done client side and only the selected portions are sent to the attestor. The attestor will only be able to see the selected portions alongside the first line of the HTTP response (i.e. \"HTTP/1.1 200 OK\")",
909
- "properties": {
910
- "xPath": {
911
- "type": "string",
912
- "description": "expect an HTML response, and to contain a certain xpath for eg. \"/html/body/div.a1/div.a2/span.a5\""
913
- },
914
- "jsonPath": {
915
- "type": "string",
916
- "description": "expect a JSON response, retrieve the item at this path using dot notation for e.g. 'email.addresses.0'"
917
- },
918
- "regex": {
919
- "type": "string",
920
- "description": "select a regex match from the response"
921
- },
922
- "hash": {
923
- "type": "string",
924
- "description": "If provided, the value inside will be hashed instead of being redacted. Useful for cases where the data inside is an identifiying piece of information that you don't want to reveal to the attestor, eg. an email address.\nIf the hash function produces more bytes than the original value, the hash will be truncated.\nEg. if hash is enabled, the original value is \"hello\", and hashed is \"a1b2c\", then the attestor will only see \"a1b2c\".\nNote: if a regex with named groups is provided, only the named groups will be hashed.",
925
- "enum": [
926
- "oprf",
927
- "oprf-mpc",
928
- "oprf-raw"
929
- ]
930
- }
931
- }
948
+ "hash": {
949
+ "type": "string",
950
+ "description": "If provided, the value inside will be hashed instead of being redacted. Useful for cases where the data inside is an identifiying piece of information that you don't want to reveal to the attestor, eg. an email address.\nIf the hash function produces more bytes than the original value, the hash will be truncated.\nEg. if hash is enabled, the original value is \"hello\", and hashed is \"a1b2c\", then the attestor will only see \"a1b2c\".\nNote: if a regex with named groups is provided, only the named groups will be hashed.",
951
+ "enum": [
952
+ "oprf",
953
+ "oprf-mpc",
954
+ "oprf-raw"
955
+ ]
932
956
  }
933
957
  }
934
958
  }
@@ -1088,30 +1112,45 @@ export const MCP_TOOLS = {
1088
1112
  "body": {
1089
1113
  "type": "object",
1090
1114
  "additionalProperties": false,
1091
- "description": "Body for `POST /verifications/sessions`. Authenticated by the consumer's `OrgToken`. Carries no callback URLs — they come from the org's callback subscriptions.",
1115
+ "description": "Body for `POST /verifications/sessions`. Authenticated by the consumer's `OrgToken`. Carries no callback URLs — they come from the org's callback subscriptions. The one shared `context` is validated against every provider's `requiredContext`.",
1092
1116
  "required": [
1093
- "providerId",
1117
+ "providers",
1094
1118
  "context",
1095
1119
  "verificationClientUrl"
1096
1120
  ],
1097
1121
  "properties": {
1098
- "providerId": {
1099
- "type": "string",
1100
- "format": "uuid"
1101
- },
1102
- "version": {
1103
- "type": "string",
1104
- "description": "Semver constraint; empty resolves to the latest trunk version.",
1105
- "maxLength": 64
1122
+ "providers": {
1123
+ "type": "array",
1124
+ "minItems": 1,
1125
+ "description": "Providers to verify, in run order. The Verification Client runs each sequentially in one browser session and submits one combined result; all are required.",
1126
+ "items": {
1127
+ "type": "object",
1128
+ "additionalProperties": false,
1129
+ "description": "A provider (+ optional version) to verify in a session.",
1130
+ "required": [
1131
+ "providerId"
1132
+ ],
1133
+ "properties": {
1134
+ "providerId": {
1135
+ "type": "string",
1136
+ "format": "uuid"
1137
+ },
1138
+ "version": {
1139
+ "type": "string",
1140
+ "description": "Semver constraint; empty resolves to the latest trunk version.",
1141
+ "maxLength": 64
1142
+ }
1143
+ }
1144
+ }
1106
1145
  },
1107
1146
  "context": {
1108
1147
  "type": "object",
1109
1148
  "additionalProperties": true,
1110
- "description": "Consumer context. Validated against the resolved provider version's `requiredContext` JSON Schema (a 400 is returned on mismatch); extra fields are always allowed. Recipe requests reference these values as `{{context.<key>}}`. Echoed back (plus `reclaimSessionId`) in the result."
1149
+ "description": "Consumer context, shared by all providers. Validated against EACH resolved provider version's `requiredContext` JSON Schema (a 400 is returned on mismatch); extra fields are always allowed. Recipe requests reference these values as `{{context.<key>}}`. Echoed back (plus `reclaimSessionId`) in the result."
1111
1150
  },
1112
1151
  "verificationClientUrl": {
1113
1152
  "type": "string",
1114
- "description": "Must contain a `{sessionId}` placeholder.",
1153
+ "description": "Must contain a `{sessionId}` placeholder. Must be an http(s) URL.",
1115
1154
  "maxLength": 2000
1116
1155
  }
1117
1156
  }
@@ -1257,8 +1296,8 @@ export const MCP_TOOLS = {
1257
1296
  "additionalProperties": false
1258
1297
  }),
1259
1298
  },
1260
- "DeleteOrgCredential": {
1261
- description: "Clear the organization's encryption credential\n\nRemoves the organization's encryption credential. After this, terminal results are delivered as plaintext until a new credential is set. Authenticated by the org's `OrgToken` or a human `BearerAuth` session for an active member of the org.",
1299
+ "DeleteOrgKeypair": {
1300
+ description: "Clear the organization's encryption keypair\n\nRemoves the organization's encryption keypair (the org reverts to keyless ⇒ plaintext delivery, and loses its eth identity address) until a new keypair is set. Authenticated by the org's `OrgToken` or a human `BearerAuth` session for an active member of the org.",
1262
1301
  inputSchema: toZod({
1263
1302
  "type": "object",
1264
1303
  "properties": {
@@ -1382,6 +1421,98 @@ export const MCP_TOOLS = {
1382
1421
  "additionalProperties": false
1383
1422
  }),
1384
1423
  },
1424
+ "DiscoverDataPoints": {
1425
+ description: "List the verifiable data points on a website\n\nThe data points existing providers can prove on a website — the menu to pick from before `GET /discover/resolve`. Optionally filter by `q`.",
1426
+ inputSchema: toZod({
1427
+ "type": "object",
1428
+ "properties": {
1429
+ "params": {
1430
+ "type": "object",
1431
+ "properties": {}
1432
+ },
1433
+ "query": {
1434
+ "type": "object",
1435
+ "properties": {
1436
+ "domain": {
1437
+ "type": "string",
1438
+ "format": "hostname",
1439
+ "minLength": 1,
1440
+ "maxLength": 200
1441
+ },
1442
+ "q": {
1443
+ "type": "string",
1444
+ "maxLength": 200
1445
+ }
1446
+ },
1447
+ "required": [
1448
+ "domain"
1449
+ ],
1450
+ "additionalProperties": false
1451
+ },
1452
+ "body": {
1453
+ "type": "object"
1454
+ }
1455
+ },
1456
+ "required": [
1457
+ "params",
1458
+ "query"
1459
+ ],
1460
+ "additionalProperties": false
1461
+ }),
1462
+ },
1463
+ "DiscoverResolve": {
1464
+ description: "Resolve a website + data points to verification providers\n\nProvider resolution: given a website and the data points the user wants their users to prove, return the smallest set of existing providers whose data points COVER the selection (greedy combine), the `requiredContext` inputs the consumer must supply, and any `uncovered` points no provider exposes yet (`needsCreation` is true then — author a provider with the agent tools). When the chosen providers can be fused into one (same start page, no clashing page scripts) `merge.mergeable` is true.\n\nAgent flow: pick a website (`GET /discover/data-points` lists what's verifiable there), confirm the data points with the user, call this to get the `providers` + `requiredContext`, collect those context values from the user, then `POST /verifications/sessions` with `providers` (pass every id) and `context` to mint a verification.",
1465
+ inputSchema: toZod({
1466
+ "type": "object",
1467
+ "properties": {
1468
+ "params": {
1469
+ "type": "object",
1470
+ "properties": {}
1471
+ },
1472
+ "query": {
1473
+ "type": "object",
1474
+ "properties": {
1475
+ "domain": {
1476
+ "type": "string",
1477
+ "format": "hostname",
1478
+ "minLength": 1,
1479
+ "maxLength": 200
1480
+ },
1481
+ "dataPoints": {
1482
+ "type": "array",
1483
+ "minItems": 1,
1484
+ "maxItems": 200,
1485
+ "items": {
1486
+ "type": "string",
1487
+ "minLength": 1,
1488
+ "maxLength": 200
1489
+ }
1490
+ },
1491
+ "mode": {
1492
+ "type": "string",
1493
+ "enum": [
1494
+ "combine",
1495
+ "ai"
1496
+ ]
1497
+ }
1498
+ },
1499
+ "required": [
1500
+ "domain",
1501
+ "dataPoints"
1502
+ ],
1503
+ "additionalProperties": false
1504
+ },
1505
+ "body": {
1506
+ "type": "object"
1507
+ }
1508
+ },
1509
+ "required": [
1510
+ "params",
1511
+ "query"
1512
+ ],
1513
+ "additionalProperties": false
1514
+ }),
1515
+ },
1385
1516
  "GetAttachSession": {
1386
1517
  description: "Poll a pairing session\n\nAnonymous poll endpoint used by the CLI / MCP while it waits for the human to complete the dashboard step. Once `status` is `LINKED`, the response includes a `token` (2-day bearer token) the CLI / MCP can use for authenticated API calls. Expired or unknown codes return `404`.",
1387
1518
  inputSchema: toZod({
@@ -1462,7 +1593,19 @@ export const MCP_TOOLS = {
1462
1593
  },
1463
1594
  "query": {
1464
1595
  "type": "object",
1465
- "properties": {}
1596
+ "properties": {
1597
+ "tab": {
1598
+ "type": "string",
1599
+ "enum": [
1600
+ "connect",
1601
+ "providers",
1602
+ "members",
1603
+ "themes",
1604
+ "sessions",
1605
+ "billing"
1606
+ ]
1607
+ }
1608
+ }
1466
1609
  },
1467
1610
  "body": {
1468
1611
  "type": "object"
@@ -1508,8 +1651,8 @@ export const MCP_TOOLS = {
1508
1651
  "additionalProperties": false
1509
1652
  }),
1510
1653
  },
1511
- "GetOrgCredential": {
1512
- description: "Get the organization's encryption credential\n\nReturns the organization's single X25519 encryption credential — the public JWK the Builder uses to JWE-encrypt delivered results — or `404` when none is set (delivery is plaintext in that case). Authenticated by the org's `OrgToken` or a human `BearerAuth` session for an active member of the org.",
1654
+ "GetOrgKeypair": {
1655
+ description: "Get the organization's encryption keypair\n\nReturns the organization's single Ethereum (secp256k1) encryption keypair — its public JWK, derived eth address, and `canEncryptResult` flag — or `404` when none is set (the org is keyless ⇒ plaintext delivery). Authenticated by the org's `OrgToken` or a human `BearerAuth` session for an active member of the org.",
1513
1656
  inputSchema: toZod({
1514
1657
  "type": "object",
1515
1658
  "properties": {
@@ -2088,7 +2231,6 @@ export const MCP_TOOLS = {
2088
2231
  "properties": {
2089
2232
  "q": {
2090
2233
  "type": "string",
2091
- "minLength": 1,
2092
2234
  "maxLength": 200
2093
2235
  },
2094
2236
  "tag": {
@@ -2245,8 +2387,8 @@ export const MCP_TOOLS = {
2245
2387
  "additionalProperties": false
2246
2388
  }),
2247
2389
  },
2248
- "SetOrgCredential": {
2249
- description: "Set (or replace) the organization's encryption credential\n\nUpserts the organization's single X25519 encryption credential. The body carries the org's **encryption public JWK** (`{kty:'OKP', crv:'X25519', x}`); the matching private key never leaves the consumer. Replacing overwrites the single row. Once set, terminal results are delivered as a compact JWE encrypted to this key; clear it to revert to plaintext delivery. Authenticated by the org's `OrgToken` or a human `BearerAuth` session for an active member of the org.",
2390
+ "SetOrgKeypair": {
2391
+ description: "Set (or rotate) the organization's encryption keypair\n\nUpserts the organization's single Ethereum (secp256k1) encryption keypair. The body carries the org's **eth public key** — as an uncompressed hex string (`0x04`+128 hex) or a secp256k1 public JWK (`{kty:'EC', crv:'secp256k1', x, y}`) — and `canEncryptResult`. The matching private key never leaves the consumer. Setting overwrites the single row (and creates it for a keyless org). When `canEncryptResult` is true, terminal results are delivered as an ECIES ciphertext encrypted to this key; otherwise plaintext. Authenticated by the org's `OrgToken` or a human `BearerAuth` session for an active member of the org.",
2250
2392
  inputSchema: toZod({
2251
2393
  "type": "object",
2252
2394
  "properties": {
@@ -2268,49 +2410,88 @@ export const MCP_TOOLS = {
2268
2410
  "properties": {}
2269
2411
  },
2270
2412
  "body": {
2271
- "type": "object",
2272
- "additionalProperties": false,
2273
- "description": "Body for `PUT /orgs/{orgId}/credential`.",
2274
- "required": [
2275
- "publicKeyJwk"
2276
- ],
2277
- "properties": {
2278
- "publicKeyJwk": {
2413
+ "oneOf": [
2414
+ {
2279
2415
  "type": "object",
2280
2416
  "additionalProperties": false,
2281
- "description": "An X25519 public key in JWK form (RFC 8037 OKP), used to JWE-encrypt delivered verification results. The matching private key never leaves the consumer.",
2417
+ "description": "Body for `PUT /orgs/{orgId}/keypair`. Carries the org's eth public key as an uncompressed hex string (`0x04` + 128 hex) — the eth-native form wallets/ethers emit. The matching private key never leaves the consumer.",
2282
2418
  "required": [
2283
- "kty",
2284
- "crv",
2285
- "x"
2419
+ "publicKey"
2286
2420
  ],
2287
2421
  "properties": {
2288
- "kty": {
2422
+ "publicKey": {
2289
2423
  "type": "string",
2290
- "enum": [
2291
- "OKP"
2292
- ]
2424
+ "description": "Uncompressed secp256k1 public key, `0x04` + 128 hex.",
2425
+ "pattern": "^0x04[0-9a-fA-F]{128}$"
2293
2426
  },
2294
- "crv": {
2295
- "type": "string",
2296
- "enum": [
2297
- "X25519"
2298
- ]
2427
+ "canEncryptResult": {
2428
+ "type": "boolean",
2429
+ "default": false
2299
2430
  },
2300
- "x": {
2431
+ "label": {
2301
2432
  "type": "string",
2302
- "description": "base64url-encoded public key bytes.",
2303
2433
  "minLength": 1,
2304
- "maxLength": 128
2434
+ "maxLength": 100
2305
2435
  }
2306
2436
  }
2307
2437
  },
2308
- "label": {
2309
- "type": "string",
2310
- "minLength": 1,
2311
- "maxLength": 100
2438
+ {
2439
+ "type": "object",
2440
+ "additionalProperties": false,
2441
+ "description": "Body for `PUT /orgs/{orgId}/keypair`. Carries the org's eth public key as a secp256k1 public JWK.",
2442
+ "required": [
2443
+ "publicKeyJwk"
2444
+ ],
2445
+ "properties": {
2446
+ "publicKeyJwk": {
2447
+ "type": "object",
2448
+ "additionalProperties": false,
2449
+ "description": "A secp256k1 (Ethereum) public key in JWK form (`{kty:'EC', crv:'secp256k1', x, y}`), used to ECIES-encrypt delivered verification results and to identify the org. The matching private key never leaves the consumer. Same shape published by the signing JWKS.",
2450
+ "required": [
2451
+ "kty",
2452
+ "crv",
2453
+ "x",
2454
+ "y"
2455
+ ],
2456
+ "properties": {
2457
+ "kty": {
2458
+ "type": "string",
2459
+ "enum": [
2460
+ "EC"
2461
+ ]
2462
+ },
2463
+ "crv": {
2464
+ "type": "string",
2465
+ "enum": [
2466
+ "secp256k1"
2467
+ ]
2468
+ },
2469
+ "x": {
2470
+ "type": "string",
2471
+ "description": "base64url-encoded X coordinate (32 bytes).",
2472
+ "minLength": 1,
2473
+ "maxLength": 64
2474
+ },
2475
+ "y": {
2476
+ "type": "string",
2477
+ "description": "base64url-encoded Y coordinate (32 bytes).",
2478
+ "minLength": 1,
2479
+ "maxLength": 64
2480
+ }
2481
+ }
2482
+ },
2483
+ "canEncryptResult": {
2484
+ "type": "boolean",
2485
+ "default": false
2486
+ },
2487
+ "label": {
2488
+ "type": "string",
2489
+ "minLength": 1,
2490
+ "maxLength": 100
2491
+ }
2492
+ }
2312
2493
  }
2313
- }
2494
+ ]
2314
2495
  }
2315
2496
  },
2316
2497
  "required": [
@@ -2414,40 +2595,6 @@ export const MCP_TOOLS = {
2414
2595
  "additionalProperties": false
2415
2596
  }),
2416
2597
  },
2417
- "UpdateMe": {
2418
- description: "Update the authenticated user's profile",
2419
- inputSchema: toZod({
2420
- "type": "object",
2421
- "properties": {
2422
- "params": {
2423
- "type": "object",
2424
- "properties": {}
2425
- },
2426
- "query": {
2427
- "type": "object",
2428
- "properties": {}
2429
- },
2430
- "body": {
2431
- "type": "object",
2432
- "additionalProperties": false,
2433
- "description": "Caller-editable fields on the authenticated user.",
2434
- "properties": {
2435
- "name": {
2436
- "type": "string",
2437
- "minLength": 1,
2438
- "maxLength": 200
2439
- }
2440
- }
2441
- }
2442
- },
2443
- "required": [
2444
- "params",
2445
- "query",
2446
- "body"
2447
- ],
2448
- "additionalProperties": false
2449
- }),
2450
- },
2451
2598
  "UpdateOrg": {
2452
2599
  description: "Update an organization\n\nOwner only.",
2453
2600
  inputSchema: toZod({
@@ -2809,9 +2956,9 @@ export const MCP_TOOLS = {
2809
2956
  }
2810
2957
  }
2811
2958
  },
2812
- "matches": {
2959
+ "responseMatches": {
2813
2960
  "type": "array",
2814
- "description": "A list of match conditions for the response.",
2961
+ "description": "Conditions the (redacted) response must satisfy for the proof to be valid. Each runs against the union of the portions revealed by `responseRedactions` (or the whole response when there are none). Mirrors attestor-core `responseMatches`.",
2815
2962
  "minItems": 1,
2816
2963
  "items": {
2817
2964
  "type": "object",
@@ -2849,33 +2996,38 @@ export const MCP_TOOLS = {
2849
2996
  "value": {
2850
2997
  "type": "string",
2851
2998
  "description": "The pattern or value to look for in the response. When `type` is 'contains', supports template variable declaration using `{{variable}}` syntax. When `type` is 'regex', can be used to extract variables using regex named groups."
2999
+ }
3000
+ }
3001
+ }
3002
+ },
3003
+ "responseRedactions": {
3004
+ "type": "array",
3005
+ "description": "Portions to select/reveal from the response, applied in order (xPath => jsonPath => regex). Done client-side; only the selected portions (plus the first response line) are sent to the attestor. An independent ordered list — NOT paired 1:1 with `responseMatches`. Mirrors attestor-core `responseRedactions`.",
3006
+ "items": {
3007
+ "type": "object",
3008
+ "additionalProperties": false,
3009
+ "description": "Which portions to select from a response. These are selected in order, xpath => jsonPath => regex * These redactions are done client side and only the selected portions are sent to the attestor. The attestor will only be able to see the selected portions alongside the first line of the HTTP response (i.e. \"HTTP/1.1 200 OK\")",
3010
+ "properties": {
3011
+ "xPath": {
3012
+ "type": "string",
3013
+ "description": "expect an HTML response, and to contain a certain xpath for eg. \"/html/body/div.a1/div.a2/span.a5\""
2852
3014
  },
2853
- "extract": {
2854
- "type": "object",
2855
- "description": "Which portions to select from a response. These are selected in order, xpath => jsonPath => regex * These redactions are done client side and only the selected portions are sent to the attestor. The attestor will only be able to see the selected portions alongside the first line of the HTTP response (i.e. \"HTTP/1.1 200 OK\")",
2856
- "properties": {
2857
- "xPath": {
2858
- "type": "string",
2859
- "description": "expect an HTML response, and to contain a certain xpath for eg. \"/html/body/div.a1/div.a2/span.a5\""
2860
- },
2861
- "jsonPath": {
2862
- "type": "string",
2863
- "description": "expect a JSON response, retrieve the item at this path using dot notation for e.g. 'email.addresses.0'"
2864
- },
2865
- "regex": {
2866
- "type": "string",
2867
- "description": "select a regex match from the response"
2868
- },
2869
- "hash": {
2870
- "type": "string",
2871
- "description": "If provided, the value inside will be hashed instead of being redacted. Useful for cases where the data inside is an identifiying piece of information that you don't want to reveal to the attestor, eg. an email address.\nIf the hash function produces more bytes than the original value, the hash will be truncated.\nEg. if hash is enabled, the original value is \"hello\", and hashed is \"a1b2c\", then the attestor will only see \"a1b2c\".\nNote: if a regex with named groups is provided, only the named groups will be hashed.",
2872
- "enum": [
2873
- "oprf",
2874
- "oprf-mpc",
2875
- "oprf-raw"
2876
- ]
2877
- }
2878
- }
3015
+ "jsonPath": {
3016
+ "type": "string",
3017
+ "description": "expect a JSON response, retrieve the item at this path using dot notation for e.g. 'email.addresses.0'"
3018
+ },
3019
+ "regex": {
3020
+ "type": "string",
3021
+ "description": "select a regex match from the response"
3022
+ },
3023
+ "hash": {
3024
+ "type": "string",
3025
+ "description": "If provided, the value inside will be hashed instead of being redacted. Useful for cases where the data inside is an identifiying piece of information that you don't want to reveal to the attestor, eg. an email address.\nIf the hash function produces more bytes than the original value, the hash will be truncated.\nEg. if hash is enabled, the original value is \"hello\", and hashed is \"a1b2c\", then the attestor will only see \"a1b2c\".\nNote: if a regex with named groups is provided, only the named groups will be hashed.",
3026
+ "enum": [
3027
+ "oprf",
3028
+ "oprf-mpc",
3029
+ "oprf-raw"
3030
+ ]
2879
3031
  }
2880
3032
  }
2881
3033
  }
@@ -2957,9 +3109,9 @@ export const MCP_TOOLS = {
2957
3109
  }
2958
3110
  }
2959
3111
  },
2960
- "matches": {
3112
+ "responseMatches": {
2961
3113
  "type": "array",
2962
- "description": "A list of match conditions for the response.",
3114
+ "description": "Conditions the (redacted) response must satisfy for the proof to be valid. Each runs against the union of the portions revealed by `responseRedactions` (or the whole response when there are none). Mirrors attestor-core `responseMatches`.",
2963
3115
  "minItems": 1,
2964
3116
  "items": {
2965
3117
  "type": "object",
@@ -2997,33 +3149,38 @@ export const MCP_TOOLS = {
2997
3149
  "value": {
2998
3150
  "type": "string",
2999
3151
  "description": "The pattern or value to look for in the response. When `type` is 'contains', supports template variable declaration using `{{variable}}` syntax. When `type` is 'regex', can be used to extract variables using regex named groups."
3152
+ }
3153
+ }
3154
+ }
3155
+ },
3156
+ "responseRedactions": {
3157
+ "type": "array",
3158
+ "description": "Portions to select/reveal from the response, applied in order (xPath => jsonPath => regex). Done client-side; only the selected portions (plus the first response line) are sent to the attestor. An independent ordered list — NOT paired 1:1 with `responseMatches`. Mirrors attestor-core `responseRedactions`.",
3159
+ "items": {
3160
+ "type": "object",
3161
+ "additionalProperties": false,
3162
+ "description": "Which portions to select from a response. These are selected in order, xpath => jsonPath => regex * These redactions are done client side and only the selected portions are sent to the attestor. The attestor will only be able to see the selected portions alongside the first line of the HTTP response (i.e. \"HTTP/1.1 200 OK\")",
3163
+ "properties": {
3164
+ "xPath": {
3165
+ "type": "string",
3166
+ "description": "expect an HTML response, and to contain a certain xpath for eg. \"/html/body/div.a1/div.a2/span.a5\""
3167
+ },
3168
+ "jsonPath": {
3169
+ "type": "string",
3170
+ "description": "expect a JSON response, retrieve the item at this path using dot notation for e.g. 'email.addresses.0'"
3000
3171
  },
3001
- "extract": {
3002
- "type": "object",
3003
- "description": "Which portions to select from a response. These are selected in order, xpath => jsonPath => regex * These redactions are done client side and only the selected portions are sent to the attestor. The attestor will only be able to see the selected portions alongside the first line of the HTTP response (i.e. \"HTTP/1.1 200 OK\")",
3004
- "properties": {
3005
- "xPath": {
3006
- "type": "string",
3007
- "description": "expect an HTML response, and to contain a certain xpath for eg. \"/html/body/div.a1/div.a2/span.a5\""
3008
- },
3009
- "jsonPath": {
3010
- "type": "string",
3011
- "description": "expect a JSON response, retrieve the item at this path using dot notation for e.g. 'email.addresses.0'"
3012
- },
3013
- "regex": {
3014
- "type": "string",
3015
- "description": "select a regex match from the response"
3016
- },
3017
- "hash": {
3018
- "type": "string",
3019
- "description": "If provided, the value inside will be hashed instead of being redacted. Useful for cases where the data inside is an identifiying piece of information that you don't want to reveal to the attestor, eg. an email address.\nIf the hash function produces more bytes than the original value, the hash will be truncated.\nEg. if hash is enabled, the original value is \"hello\", and hashed is \"a1b2c\", then the attestor will only see \"a1b2c\".\nNote: if a regex with named groups is provided, only the named groups will be hashed.",
3020
- "enum": [
3021
- "oprf",
3022
- "oprf-mpc",
3023
- "oprf-raw"
3024
- ]
3025
- }
3026
- }
3172
+ "regex": {
3173
+ "type": "string",
3174
+ "description": "select a regex match from the response"
3175
+ },
3176
+ "hash": {
3177
+ "type": "string",
3178
+ "description": "If provided, the value inside will be hashed instead of being redacted. Useful for cases where the data inside is an identifiying piece of information that you don't want to reveal to the attestor, eg. an email address.\nIf the hash function produces more bytes than the original value, the hash will be truncated.\nEg. if hash is enabled, the original value is \"hello\", and hashed is \"a1b2c\", then the attestor will only see \"a1b2c\".\nNote: if a regex with named groups is provided, only the named groups will be hashed.",
3179
+ "enum": [
3180
+ "oprf",
3181
+ "oprf-mpc",
3182
+ "oprf-raw"
3183
+ ]
3027
3184
  }
3028
3185
  }
3029
3186
  }