@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
@@ -294,7 +294,7 @@ export const MCP_TOOLS = {
294
294
  }),
295
295
  },
296
296
  "CreateCallbackSubscription": {
297
- 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",
297
+ 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",
298
298
  inputSchema: toZod({
299
299
  "type": "object",
300
300
  "properties": {
@@ -330,11 +330,12 @@ export const MCP_TOOLS = {
330
330
  "maxItems": 12,
331
331
  "items": {
332
332
  "type": "string",
333
- "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.",
333
+ "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.",
334
334
  "enum": [
335
335
  "session_pending",
336
336
  "verification_client_opened",
337
337
  "verification_client_ready",
338
+ "verification_provider_started",
338
339
  "request_matched",
339
340
  "request_claim_created",
340
341
  "request_claim_completed",
@@ -378,14 +379,26 @@ export const MCP_TOOLS = {
378
379
  "body": {
379
380
  "type": "object",
380
381
  "additionalProperties": false,
382
+ "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.",
381
383
  "required": [
382
- "name"
384
+ "name",
385
+ "publicKey"
383
386
  ],
384
387
  "properties": {
385
388
  "name": {
386
389
  "type": "string",
387
390
  "minLength": 1,
388
391
  "maxLength": 200
392
+ },
393
+ "publicKey": {
394
+ "type": "string",
395
+ "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.",
396
+ "pattern": "^0x04[0-9a-fA-F]{128}$"
397
+ },
398
+ "canEncryptResult": {
399
+ "type": "boolean",
400
+ "description": "When true, terminal results are ECIES-encrypted to this key; when false (the default), they are delivered as plaintext.",
401
+ "default": false
389
402
  }
390
403
  }
391
404
  }
@@ -442,11 +455,12 @@ export const MCP_TOOLS = {
442
455
  "maxItems": 12,
443
456
  "items": {
444
457
  "type": "string",
445
- "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.",
458
+ "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.",
446
459
  "enum": [
447
460
  "session_pending",
448
461
  "verification_client_opened",
449
462
  "verification_client_ready",
463
+ "verification_provider_started",
450
464
  "request_matched",
451
465
  "request_claim_created",
452
466
  "request_claim_completed",
@@ -753,9 +767,9 @@ export const MCP_TOOLS = {
753
767
  }
754
768
  }
755
769
  },
756
- "matches": {
770
+ "responseMatches": {
757
771
  "type": "array",
758
- "description": "A list of match conditions for the response.",
772
+ "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`.",
759
773
  "minItems": 1,
760
774
  "items": {
761
775
  "type": "object",
@@ -793,33 +807,38 @@ export const MCP_TOOLS = {
793
807
  "value": {
794
808
  "type": "string",
795
809
  "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."
810
+ }
811
+ }
812
+ }
813
+ },
814
+ "responseRedactions": {
815
+ "type": "array",
816
+ "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`.",
817
+ "items": {
818
+ "type": "object",
819
+ "additionalProperties": false,
820
+ "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\")",
821
+ "properties": {
822
+ "xPath": {
823
+ "type": "string",
824
+ "description": "expect an HTML response, and to contain a certain xpath for eg. \"/html/body/div.a1/div.a2/span.a5\""
796
825
  },
797
- "extract": {
798
- "type": "object",
799
- "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\")",
800
- "properties": {
801
- "xPath": {
802
- "type": "string",
803
- "description": "expect an HTML response, and to contain a certain xpath for eg. \"/html/body/div.a1/div.a2/span.a5\""
804
- },
805
- "jsonPath": {
806
- "type": "string",
807
- "description": "expect a JSON response, retrieve the item at this path using dot notation for e.g. 'email.addresses.0'"
808
- },
809
- "regex": {
810
- "type": "string",
811
- "description": "select a regex match from the response"
812
- },
813
- "hash": {
814
- "type": "string",
815
- "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.",
816
- "enum": [
817
- "oprf",
818
- "oprf-mpc",
819
- "oprf-raw"
820
- ]
821
- }
822
- }
826
+ "jsonPath": {
827
+ "type": "string",
828
+ "description": "expect a JSON response, retrieve the item at this path using dot notation for e.g. 'email.addresses.0'"
829
+ },
830
+ "regex": {
831
+ "type": "string",
832
+ "description": "select a regex match from the response"
833
+ },
834
+ "hash": {
835
+ "type": "string",
836
+ "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.",
837
+ "enum": [
838
+ "oprf",
839
+ "oprf-mpc",
840
+ "oprf-raw"
841
+ ]
823
842
  }
824
843
  }
825
844
  }
@@ -904,9 +923,9 @@ export const MCP_TOOLS = {
904
923
  }
905
924
  }
906
925
  },
907
- "matches": {
926
+ "responseMatches": {
908
927
  "type": "array",
909
- "description": "A list of match conditions for the response.",
928
+ "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`.",
910
929
  "minItems": 1,
911
930
  "items": {
912
931
  "type": "object",
@@ -944,33 +963,38 @@ export const MCP_TOOLS = {
944
963
  "value": {
945
964
  "type": "string",
946
965
  "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."
966
+ }
967
+ }
968
+ }
969
+ },
970
+ "responseRedactions": {
971
+ "type": "array",
972
+ "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`.",
973
+ "items": {
974
+ "type": "object",
975
+ "additionalProperties": false,
976
+ "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\")",
977
+ "properties": {
978
+ "xPath": {
979
+ "type": "string",
980
+ "description": "expect an HTML response, and to contain a certain xpath for eg. \"/html/body/div.a1/div.a2/span.a5\""
981
+ },
982
+ "jsonPath": {
983
+ "type": "string",
984
+ "description": "expect a JSON response, retrieve the item at this path using dot notation for e.g. 'email.addresses.0'"
947
985
  },
948
- "extract": {
949
- "type": "object",
950
- "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\")",
951
- "properties": {
952
- "xPath": {
953
- "type": "string",
954
- "description": "expect an HTML response, and to contain a certain xpath for eg. \"/html/body/div.a1/div.a2/span.a5\""
955
- },
956
- "jsonPath": {
957
- "type": "string",
958
- "description": "expect a JSON response, retrieve the item at this path using dot notation for e.g. 'email.addresses.0'"
959
- },
960
- "regex": {
961
- "type": "string",
962
- "description": "select a regex match from the response"
963
- },
964
- "hash": {
965
- "type": "string",
966
- "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.",
967
- "enum": [
968
- "oprf",
969
- "oprf-mpc",
970
- "oprf-raw"
971
- ]
972
- }
973
- }
986
+ "regex": {
987
+ "type": "string",
988
+ "description": "select a regex match from the response"
989
+ },
990
+ "hash": {
991
+ "type": "string",
992
+ "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.",
993
+ "enum": [
994
+ "oprf",
995
+ "oprf-mpc",
996
+ "oprf-raw"
997
+ ]
974
998
  }
975
999
  }
976
1000
  }
@@ -1134,30 +1158,45 @@ export const MCP_TOOLS = {
1134
1158
  "body": {
1135
1159
  "type": "object",
1136
1160
  "additionalProperties": false,
1137
- "description": "Body for `POST /verifications/sessions`. Authenticated by the consumer's `OrgToken`. Carries no callback URLs — they come from the org's callback subscriptions.",
1161
+ "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`.",
1138
1162
  "required": [
1139
- "providerId",
1163
+ "providers",
1140
1164
  "context",
1141
1165
  "verificationClientUrl"
1142
1166
  ],
1143
1167
  "properties": {
1144
- "providerId": {
1145
- "type": "string",
1146
- "format": "uuid"
1147
- },
1148
- "version": {
1149
- "type": "string",
1150
- "description": "Semver constraint; empty resolves to the latest trunk version.",
1151
- "maxLength": 64
1168
+ "providers": {
1169
+ "type": "array",
1170
+ "minItems": 1,
1171
+ "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.",
1172
+ "items": {
1173
+ "type": "object",
1174
+ "additionalProperties": false,
1175
+ "description": "A provider (+ optional version) to verify in a session.",
1176
+ "required": [
1177
+ "providerId"
1178
+ ],
1179
+ "properties": {
1180
+ "providerId": {
1181
+ "type": "string",
1182
+ "format": "uuid"
1183
+ },
1184
+ "version": {
1185
+ "type": "string",
1186
+ "description": "Semver constraint; empty resolves to the latest trunk version.",
1187
+ "maxLength": 64
1188
+ }
1189
+ }
1190
+ }
1152
1191
  },
1153
1192
  "context": {
1154
1193
  "type": "object",
1155
1194
  "additionalProperties": true,
1156
- "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."
1195
+ "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."
1157
1196
  },
1158
1197
  "verificationClientUrl": {
1159
1198
  "type": "string",
1160
- "description": "Must contain a `{sessionId}` placeholder.",
1199
+ "description": "Must contain a `{sessionId}` placeholder. Must be an http(s) URL.",
1161
1200
  "maxLength": 2000
1162
1201
  }
1163
1202
  }
@@ -1309,8 +1348,8 @@ export const MCP_TOOLS = {
1309
1348
  "additionalProperties": false
1310
1349
  }),
1311
1350
  },
1312
- "DeleteOrgCredential": {
1313
- 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.",
1351
+ "DeleteOrgKeypair": {
1352
+ 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.",
1314
1353
  inputSchema: toZod({
1315
1354
  "type": "object",
1316
1355
  "properties": {
@@ -1440,6 +1479,102 @@ export const MCP_TOOLS = {
1440
1479
  "additionalProperties": false
1441
1480
  }),
1442
1481
  },
1482
+ "DiscoverDataPoints": {
1483
+ 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`.",
1484
+ inputSchema: toZod({
1485
+ "type": "object",
1486
+ "properties": {
1487
+ "params": {
1488
+ "type": "object",
1489
+ "properties": {
1490
+
1491
+ }
1492
+ },
1493
+ "query": {
1494
+ "type": "object",
1495
+ "properties": {
1496
+ "domain": {
1497
+ "type": "string",
1498
+ "format": "hostname",
1499
+ "minLength": 1,
1500
+ "maxLength": 200
1501
+ },
1502
+ "q": {
1503
+ "type": "string",
1504
+ "maxLength": 200
1505
+ }
1506
+ },
1507
+ "required": [
1508
+ "domain"
1509
+ ],
1510
+ "additionalProperties": false
1511
+ },
1512
+ "body": {
1513
+ "type": "object"
1514
+ }
1515
+ },
1516
+ "required": [
1517
+ "params",
1518
+ "query"
1519
+ ],
1520
+ "additionalProperties": false
1521
+ }),
1522
+ },
1523
+ "DiscoverResolve": {
1524
+ 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.",
1525
+ inputSchema: toZod({
1526
+ "type": "object",
1527
+ "properties": {
1528
+ "params": {
1529
+ "type": "object",
1530
+ "properties": {
1531
+
1532
+ }
1533
+ },
1534
+ "query": {
1535
+ "type": "object",
1536
+ "properties": {
1537
+ "domain": {
1538
+ "type": "string",
1539
+ "format": "hostname",
1540
+ "minLength": 1,
1541
+ "maxLength": 200
1542
+ },
1543
+ "dataPoints": {
1544
+ "type": "array",
1545
+ "minItems": 1,
1546
+ "maxItems": 200,
1547
+ "items": {
1548
+ "type": "string",
1549
+ "minLength": 1,
1550
+ "maxLength": 200
1551
+ }
1552
+ },
1553
+ "mode": {
1554
+ "type": "string",
1555
+ "enum": [
1556
+ "combine",
1557
+ "ai"
1558
+ ]
1559
+ }
1560
+ },
1561
+ "required": [
1562
+ "domain",
1563
+ "dataPoints"
1564
+ ],
1565
+ "additionalProperties": false
1566
+ },
1567
+ "body": {
1568
+ "type": "object"
1569
+ }
1570
+ },
1571
+ "required": [
1572
+ "params",
1573
+ "query"
1574
+ ],
1575
+ "additionalProperties": false
1576
+ }),
1577
+ },
1443
1578
  "GetAttachSession": {
1444
1579
  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`.",
1445
1580
  inputSchema: toZod({
@@ -1527,7 +1662,17 @@ export const MCP_TOOLS = {
1527
1662
  "query": {
1528
1663
  "type": "object",
1529
1664
  "properties": {
1530
-
1665
+ "tab": {
1666
+ "type": "string",
1667
+ "enum": [
1668
+ "connect",
1669
+ "providers",
1670
+ "members",
1671
+ "themes",
1672
+ "sessions",
1673
+ "billing"
1674
+ ]
1675
+ }
1531
1676
  }
1532
1677
  },
1533
1678
  "body": {
@@ -1576,8 +1721,8 @@ export const MCP_TOOLS = {
1576
1721
  "additionalProperties": false
1577
1722
  }),
1578
1723
  },
1579
- "GetOrgCredential": {
1580
- 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.",
1724
+ "GetOrgKeypair": {
1725
+ 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.",
1581
1726
  inputSchema: toZod({
1582
1727
  "type": "object",
1583
1728
  "properties": {
@@ -2190,7 +2335,6 @@ export const MCP_TOOLS = {
2190
2335
  "properties": {
2191
2336
  "q": {
2192
2337
  "type": "string",
2193
- "minLength": 1,
2194
2338
  "maxLength": 200
2195
2339
  },
2196
2340
  "tag": {
@@ -2353,8 +2497,8 @@ export const MCP_TOOLS = {
2353
2497
  "additionalProperties": false
2354
2498
  }),
2355
2499
  },
2356
- "SetOrgCredential": {
2357
- 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.",
2500
+ "SetOrgKeypair": {
2501
+ 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.",
2358
2502
  inputSchema: toZod({
2359
2503
  "type": "object",
2360
2504
  "properties": {
@@ -2378,49 +2522,88 @@ export const MCP_TOOLS = {
2378
2522
  }
2379
2523
  },
2380
2524
  "body": {
2381
- "type": "object",
2382
- "additionalProperties": false,
2383
- "description": "Body for `PUT /orgs/{orgId}/credential`.",
2384
- "required": [
2385
- "publicKeyJwk"
2386
- ],
2387
- "properties": {
2388
- "publicKeyJwk": {
2525
+ "oneOf": [
2526
+ {
2389
2527
  "type": "object",
2390
2528
  "additionalProperties": false,
2391
- "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.",
2529
+ "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.",
2392
2530
  "required": [
2393
- "kty",
2394
- "crv",
2395
- "x"
2531
+ "publicKey"
2396
2532
  ],
2397
2533
  "properties": {
2398
- "kty": {
2534
+ "publicKey": {
2399
2535
  "type": "string",
2400
- "enum": [
2401
- "OKP"
2402
- ]
2536
+ "description": "Uncompressed secp256k1 public key, `0x04` + 128 hex.",
2537
+ "pattern": "^0x04[0-9a-fA-F]{128}$"
2403
2538
  },
2404
- "crv": {
2405
- "type": "string",
2406
- "enum": [
2407
- "X25519"
2408
- ]
2539
+ "canEncryptResult": {
2540
+ "type": "boolean",
2541
+ "default": false
2409
2542
  },
2410
- "x": {
2543
+ "label": {
2411
2544
  "type": "string",
2412
- "description": "base64url-encoded public key bytes.",
2413
2545
  "minLength": 1,
2414
- "maxLength": 128
2546
+ "maxLength": 100
2415
2547
  }
2416
2548
  }
2417
2549
  },
2418
- "label": {
2419
- "type": "string",
2420
- "minLength": 1,
2421
- "maxLength": 100
2550
+ {
2551
+ "type": "object",
2552
+ "additionalProperties": false,
2553
+ "description": "Body for `PUT /orgs/{orgId}/keypair`. Carries the org's eth public key as a secp256k1 public JWK.",
2554
+ "required": [
2555
+ "publicKeyJwk"
2556
+ ],
2557
+ "properties": {
2558
+ "publicKeyJwk": {
2559
+ "type": "object",
2560
+ "additionalProperties": false,
2561
+ "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.",
2562
+ "required": [
2563
+ "kty",
2564
+ "crv",
2565
+ "x",
2566
+ "y"
2567
+ ],
2568
+ "properties": {
2569
+ "kty": {
2570
+ "type": "string",
2571
+ "enum": [
2572
+ "EC"
2573
+ ]
2574
+ },
2575
+ "crv": {
2576
+ "type": "string",
2577
+ "enum": [
2578
+ "secp256k1"
2579
+ ]
2580
+ },
2581
+ "x": {
2582
+ "type": "string",
2583
+ "description": "base64url-encoded X coordinate (32 bytes).",
2584
+ "minLength": 1,
2585
+ "maxLength": 64
2586
+ },
2587
+ "y": {
2588
+ "type": "string",
2589
+ "description": "base64url-encoded Y coordinate (32 bytes).",
2590
+ "minLength": 1,
2591
+ "maxLength": 64
2592
+ }
2593
+ }
2594
+ },
2595
+ "canEncryptResult": {
2596
+ "type": "boolean",
2597
+ "default": false
2598
+ },
2599
+ "label": {
2600
+ "type": "string",
2601
+ "minLength": 1,
2602
+ "maxLength": 100
2603
+ }
2604
+ }
2422
2605
  }
2423
- }
2606
+ ]
2424
2607
  }
2425
2608
  },
2426
2609
  "required": [
@@ -2528,44 +2711,6 @@ export const MCP_TOOLS = {
2528
2711
  "additionalProperties": false
2529
2712
  }),
2530
2713
  },
2531
- "UpdateMe": {
2532
- description: "Update the authenticated user's profile",
2533
- inputSchema: toZod({
2534
- "type": "object",
2535
- "properties": {
2536
- "params": {
2537
- "type": "object",
2538
- "properties": {
2539
-
2540
- }
2541
- },
2542
- "query": {
2543
- "type": "object",
2544
- "properties": {
2545
-
2546
- }
2547
- },
2548
- "body": {
2549
- "type": "object",
2550
- "additionalProperties": false,
2551
- "description": "Caller-editable fields on the authenticated user.",
2552
- "properties": {
2553
- "name": {
2554
- "type": "string",
2555
- "minLength": 1,
2556
- "maxLength": 200
2557
- }
2558
- }
2559
- }
2560
- },
2561
- "required": [
2562
- "params",
2563
- "query",
2564
- "body"
2565
- ],
2566
- "additionalProperties": false
2567
- }),
2568
- },
2569
2714
  "UpdateOrg": {
2570
2715
  description: "Update an organization\n\nOwner only.",
2571
2716
  inputSchema: toZod({
@@ -2935,9 +3080,9 @@ export const MCP_TOOLS = {
2935
3080
  }
2936
3081
  }
2937
3082
  },
2938
- "matches": {
3083
+ "responseMatches": {
2939
3084
  "type": "array",
2940
- "description": "A list of match conditions for the response.",
3085
+ "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`.",
2941
3086
  "minItems": 1,
2942
3087
  "items": {
2943
3088
  "type": "object",
@@ -2975,33 +3120,38 @@ export const MCP_TOOLS = {
2975
3120
  "value": {
2976
3121
  "type": "string",
2977
3122
  "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."
3123
+ }
3124
+ }
3125
+ }
3126
+ },
3127
+ "responseRedactions": {
3128
+ "type": "array",
3129
+ "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`.",
3130
+ "items": {
3131
+ "type": "object",
3132
+ "additionalProperties": false,
3133
+ "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\")",
3134
+ "properties": {
3135
+ "xPath": {
3136
+ "type": "string",
3137
+ "description": "expect an HTML response, and to contain a certain xpath for eg. \"/html/body/div.a1/div.a2/span.a5\""
2978
3138
  },
2979
- "extract": {
2980
- "type": "object",
2981
- "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\")",
2982
- "properties": {
2983
- "xPath": {
2984
- "type": "string",
2985
- "description": "expect an HTML response, and to contain a certain xpath for eg. \"/html/body/div.a1/div.a2/span.a5\""
2986
- },
2987
- "jsonPath": {
2988
- "type": "string",
2989
- "description": "expect a JSON response, retrieve the item at this path using dot notation for e.g. 'email.addresses.0'"
2990
- },
2991
- "regex": {
2992
- "type": "string",
2993
- "description": "select a regex match from the response"
2994
- },
2995
- "hash": {
2996
- "type": "string",
2997
- "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.",
2998
- "enum": [
2999
- "oprf",
3000
- "oprf-mpc",
3001
- "oprf-raw"
3002
- ]
3003
- }
3004
- }
3139
+ "jsonPath": {
3140
+ "type": "string",
3141
+ "description": "expect a JSON response, retrieve the item at this path using dot notation for e.g. 'email.addresses.0'"
3142
+ },
3143
+ "regex": {
3144
+ "type": "string",
3145
+ "description": "select a regex match from the response"
3146
+ },
3147
+ "hash": {
3148
+ "type": "string",
3149
+ "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.",
3150
+ "enum": [
3151
+ "oprf",
3152
+ "oprf-mpc",
3153
+ "oprf-raw"
3154
+ ]
3005
3155
  }
3006
3156
  }
3007
3157
  }
@@ -3083,9 +3233,9 @@ export const MCP_TOOLS = {
3083
3233
  }
3084
3234
  }
3085
3235
  },
3086
- "matches": {
3236
+ "responseMatches": {
3087
3237
  "type": "array",
3088
- "description": "A list of match conditions for the response.",
3238
+ "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`.",
3089
3239
  "minItems": 1,
3090
3240
  "items": {
3091
3241
  "type": "object",
@@ -3123,33 +3273,38 @@ export const MCP_TOOLS = {
3123
3273
  "value": {
3124
3274
  "type": "string",
3125
3275
  "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."
3276
+ }
3277
+ }
3278
+ }
3279
+ },
3280
+ "responseRedactions": {
3281
+ "type": "array",
3282
+ "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`.",
3283
+ "items": {
3284
+ "type": "object",
3285
+ "additionalProperties": false,
3286
+ "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\")",
3287
+ "properties": {
3288
+ "xPath": {
3289
+ "type": "string",
3290
+ "description": "expect an HTML response, and to contain a certain xpath for eg. \"/html/body/div.a1/div.a2/span.a5\""
3291
+ },
3292
+ "jsonPath": {
3293
+ "type": "string",
3294
+ "description": "expect a JSON response, retrieve the item at this path using dot notation for e.g. 'email.addresses.0'"
3295
+ },
3296
+ "regex": {
3297
+ "type": "string",
3298
+ "description": "select a regex match from the response"
3126
3299
  },
3127
- "extract": {
3128
- "type": "object",
3129
- "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\")",
3130
- "properties": {
3131
- "xPath": {
3132
- "type": "string",
3133
- "description": "expect an HTML response, and to contain a certain xpath for eg. \"/html/body/div.a1/div.a2/span.a5\""
3134
- },
3135
- "jsonPath": {
3136
- "type": "string",
3137
- "description": "expect a JSON response, retrieve the item at this path using dot notation for e.g. 'email.addresses.0'"
3138
- },
3139
- "regex": {
3140
- "type": "string",
3141
- "description": "select a regex match from the response"
3142
- },
3143
- "hash": {
3144
- "type": "string",
3145
- "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.",
3146
- "enum": [
3147
- "oprf",
3148
- "oprf-mpc",
3149
- "oprf-raw"
3150
- ]
3151
- }
3152
- }
3300
+ "hash": {
3301
+ "type": "string",
3302
+ "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.",
3303
+ "enum": [
3304
+ "oprf",
3305
+ "oprf-mpc",
3306
+ "oprf-raw"
3307
+ ]
3153
3308
  }
3154
3309
  }
3155
3310
  }