@proof-holdings/mcp-server 1.0.0 → 1.2.0

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 (113) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +220 -217
  3. package/dist/authBoundary.d.ts +193 -0
  4. package/dist/authBoundary.d.ts.map +1 -0
  5. package/dist/authBoundary.js +341 -0
  6. package/dist/authBoundary.js.map +1 -0
  7. package/dist/factory.d.ts +35 -0
  8. package/dist/factory.d.ts.map +1 -0
  9. package/dist/factory.js +130 -0
  10. package/dist/factory.js.map +1 -0
  11. package/dist/http.d.ts +78 -3
  12. package/dist/http.d.ts.map +1 -1
  13. package/dist/http.js +251 -6
  14. package/dist/http.js.map +1 -1
  15. package/dist/remote.d.ts +111 -0
  16. package/dist/remote.d.ts.map +1 -0
  17. package/dist/remote.js +789 -0
  18. package/dist/remote.js.map +1 -0
  19. package/dist/server.js +11 -57
  20. package/dist/server.js.map +1 -1
  21. package/dist/toolAnnotations.d.ts +27 -0
  22. package/dist/toolAnnotations.d.ts.map +1 -0
  23. package/dist/toolAnnotations.js +158 -0
  24. package/dist/toolAnnotations.js.map +1 -0
  25. package/dist/tools/{projects.d.ts → accounts.d.ts} +1 -1
  26. package/dist/tools/accounts.d.ts.map +1 -0
  27. package/dist/tools/accounts.js +70 -0
  28. package/dist/tools/accounts.js.map +1 -0
  29. package/dist/tools/api-keys.d.ts.map +1 -1
  30. package/dist/tools/api-keys.js +14 -5
  31. package/dist/tools/api-keys.js.map +1 -1
  32. package/dist/tools/auth-flows.d.ts +4 -0
  33. package/dist/tools/auth-flows.d.ts.map +1 -0
  34. package/dist/tools/auth-flows.js +34 -0
  35. package/dist/tools/auth-flows.js.map +1 -0
  36. package/dist/tools/auth.js +1 -1
  37. package/dist/tools/auth.js.map +1 -1
  38. package/dist/tools/authorizations.d.ts +4 -0
  39. package/dist/tools/authorizations.d.ts.map +1 -0
  40. package/dist/tools/authorizations.js +111 -0
  41. package/dist/tools/authorizations.js.map +1 -0
  42. package/dist/tools/circles.d.ts +4 -0
  43. package/dist/tools/circles.d.ts.map +1 -0
  44. package/dist/tools/circles.js +215 -0
  45. package/dist/tools/circles.js.map +1 -0
  46. package/dist/tools/confirmations.d.ts +4 -0
  47. package/dist/tools/confirmations.d.ts.map +1 -0
  48. package/dist/tools/confirmations.js +86 -0
  49. package/dist/tools/confirmations.js.map +1 -0
  50. package/dist/tools/delegation-verify-outcomes.d.ts +23 -0
  51. package/dist/tools/delegation-verify-outcomes.d.ts.map +1 -0
  52. package/dist/tools/delegation-verify-outcomes.js +51 -0
  53. package/dist/tools/delegation-verify-outcomes.js.map +1 -0
  54. package/dist/tools/delegation-verify.d.ts +24 -0
  55. package/dist/tools/delegation-verify.d.ts.map +1 -0
  56. package/dist/tools/delegation-verify.js +192 -0
  57. package/dist/tools/delegation-verify.js.map +1 -0
  58. package/dist/tools/delegations.d.ts +4 -0
  59. package/dist/tools/delegations.d.ts.map +1 -0
  60. package/dist/tools/delegations.js +84 -0
  61. package/dist/tools/delegations.js.map +1 -0
  62. package/dist/tools/domains.d.ts.map +1 -1
  63. package/dist/tools/domains.js +1 -2
  64. package/dist/tools/domains.js.map +1 -1
  65. package/dist/tools/hitl-keys.d.ts +4 -0
  66. package/dist/tools/hitl-keys.d.ts.map +1 -0
  67. package/dist/tools/hitl-keys.js +52 -0
  68. package/dist/tools/hitl-keys.js.map +1 -0
  69. package/dist/tools/hitl.d.ts +4 -0
  70. package/dist/tools/hitl.d.ts.map +1 -0
  71. package/dist/tools/hitl.js +151 -0
  72. package/dist/tools/hitl.js.map +1 -0
  73. package/dist/tools/phones.js +1 -1
  74. package/dist/tools/phones.js.map +1 -1
  75. package/dist/tools/profiles.d.ts.map +1 -1
  76. package/dist/tools/profiles.js +73 -0
  77. package/dist/tools/profiles.js.map +1 -1
  78. package/dist/tools/proof-me.d.ts +4 -0
  79. package/dist/tools/proof-me.d.ts.map +1 -0
  80. package/dist/tools/proof-me.js +36 -0
  81. package/dist/tools/proof-me.js.map +1 -0
  82. package/dist/tools/proofs.d.ts.map +1 -1
  83. package/dist/tools/proofs.js +9 -6
  84. package/dist/tools/proofs.js.map +1 -1
  85. package/dist/tools/render-auth-link.d.ts +3 -0
  86. package/dist/tools/render-auth-link.d.ts.map +1 -0
  87. package/dist/tools/render-auth-link.js +30 -0
  88. package/dist/tools/render-auth-link.js.map +1 -0
  89. package/dist/tools/sessions.js +5 -5
  90. package/dist/tools/sessions.js.map +1 -1
  91. package/dist/tools/settings.d.ts.map +1 -1
  92. package/dist/tools/settings.js +77 -2
  93. package/dist/tools/settings.js.map +1 -1
  94. package/dist/tools/twofa.d.ts.map +1 -1
  95. package/dist/tools/twofa.js +16 -3
  96. package/dist/tools/twofa.js.map +1 -1
  97. package/dist/tools/user-requests.d.ts.map +1 -1
  98. package/dist/tools/user-requests.js +1 -2
  99. package/dist/tools/user-requests.js.map +1 -1
  100. package/dist/tools/verification-requests.d.ts.map +1 -1
  101. package/dist/tools/verification-requests.js +40 -13
  102. package/dist/tools/verification-requests.js.map +1 -1
  103. package/dist/tools/verifications.d.ts.map +1 -1
  104. package/dist/tools/verifications.js +59 -12
  105. package/dist/tools/verifications.js.map +1 -1
  106. package/dist/types.d.ts +18 -0
  107. package/dist/types.d.ts.map +1 -1
  108. package/dist/types.js +114 -5
  109. package/dist/types.js.map +1 -1
  110. package/package.json +11 -5
  111. package/dist/tools/projects.d.ts.map +0 -1
  112. package/dist/tools/projects.js +0 -159
  113. package/dist/tools/projects.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"remote.js","sourceRoot":"","sources":["../src/remote.ts"],"names":[],"mappings":";AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,OAAO,EAAE,YAAY,EAA0D,MAAM,WAAW,CAAC;AACjG,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,O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AC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;IAClD,CAAC,CAAC;IACF,OAAO,CAAC,EAAE,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;IAChC,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;AACjC,CAAC"}
package/dist/server.js CHANGED
@@ -1,66 +1,20 @@
1
1
  #!/usr/bin/env node
2
- import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
3
2
  import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
4
- import { HttpClient } from './http.js';
5
- import { registerTools as registerVerifications } from './tools/verifications.js';
6
- import { registerTools as registerVerificationRequests } from './tools/verification-requests.js';
7
- import { registerTools as registerProofs } from './tools/proofs.js';
8
- import { registerTools as registerSessions } from './tools/sessions.js';
9
- import { registerTools as registerAssets } from './tools/assets.js';
10
- import { registerTools as registerAuth } from './tools/auth.js';
11
- import { registerTools as registerSettings } from './tools/settings.js';
12
- import { registerTools as registerTemplates } from './tools/templates.js';
13
- import { registerTools as registerWebhookDeliveries } from './tools/webhook-deliveries.js';
14
- import { registerTools as registerBilling } from './tools/billing.js';
15
- import { registerTools as registerProjects } from './tools/projects.js';
16
- import { registerTools as registerProfiles } from './tools/profiles.js';
17
- import { registerTools as registerEmails } from './tools/emails.js';
18
- import { registerTools as registerPhones } from './tools/phones.js';
19
- import { registerTools as registerApiKeys } from './tools/api-keys.js';
20
- import { registerTools as registerTwofa } from './tools/twofa.js';
21
- import { registerTools as registerDomains } from './tools/domains.js';
22
- import { registerTools as registerDnsCredentials } from './tools/dns-credentials.js';
23
- import { registerTools as registerUserRequests } from './tools/user-requests.js';
24
- import { registerTools as registerUserDomainVerify } from './tools/user-domain-verify.js';
25
- import { registerTools as registerPublicProfiles } from './tools/public-profiles.js';
3
+ import { createProofServer } from './factory.js';
26
4
  const API_KEY = process.env.PROOF_API_KEY;
27
5
  const BASE_URL = process.env.PROOF_BASE_URL ?? 'https://api.proof.holdings';
6
+ // PUBLIC MODE: no key is required to START. The bootstrap surface (create_account, start_login and
7
+ // their polls) and the public verification surface (validate_proof, list_revoked_proofs,
8
+ // verify_delegation*) work with no credential; every other tool answers `api_key_required` from
9
+ // HttpClient. Exiting here instead would make trying Proof impossible without an account already
10
+ // in hand, which is the precondition both the publisher showcase and the remote server need.
28
11
  if (!API_KEY) {
29
- console.error('Error: PROOF_API_KEY environment variable is required.');
30
- console.error('Set it in your MCP client config or export it before running.');
31
- process.exit(1);
12
+ console.error('Notice: PROOF_API_KEY is not set — starting in public mode.');
13
+ console.error('Account-bootstrap, login and public verification tools work; the rest ask for a key.');
32
14
  }
33
- const http = new HttpClient({
34
- apiKey: API_KEY,
35
- baseUrl: BASE_URL,
36
- });
37
- const server = new McpServer({
38
- name: 'proof-holdings',
39
- version: '1.0.0',
40
- });
41
- // Register all tool modules
42
- const tool = server.tool.bind(server);
43
- registerVerifications(tool, http);
44
- registerVerificationRequests(tool, http);
45
- registerProofs(tool, http);
46
- registerSessions(tool, http);
47
- registerAssets(tool, http);
48
- registerAuth(tool, http);
49
- registerSettings(tool, http);
50
- registerTemplates(tool, http);
51
- registerWebhookDeliveries(tool, http);
52
- registerBilling(tool, http);
53
- registerProjects(tool, http);
54
- registerProfiles(tool, http);
55
- registerEmails(tool, http);
56
- registerPhones(tool, http);
57
- registerApiKeys(tool, http);
58
- registerTwofa(tool, http);
59
- registerDomains(tool, http);
60
- registerDnsCredentials(tool, http);
61
- registerUserRequests(tool, http);
62
- registerUserDomainVerify(tool, http);
63
- registerPublicProfiles(tool, http);
15
+ // One server + one HTTP client, built by the SAME factory the remote server calls per connection.
16
+ // stdio serves a single user, so one instance for the whole process is correct here.
17
+ const { server } = createProofServer({ apiKey: API_KEY, baseUrl: BASE_URL });
64
18
  // Catch unhandled errors to avoid silent crashes
65
19
  process.on('uncaughtException', (err) => {
66
20
  console.error('Uncaught exception:', err.message);
@@ -1 +1 @@
1
- {"version":3,"file":"server.js","sourceR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AC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;IAChF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC;AAEH,oBAAoB;AACpB,MAAM,SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAC;AAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC"}
@@ -0,0 +1,27 @@
1
+ import type { ToolAnnotations } from '@modelcontextprotocol/sdk/types.js';
2
+ /**
3
+ * What each tool does to the caller's account, stated to the CLIENT (live review 2026-09-26, M5).
4
+ *
5
+ * With no annotations an MCP client must assume every tool may be destructive, so a read is gated
6
+ * behind the same confirmation as `revoke_api_key`, and the dangerous tools get no warning of their
7
+ * own. `factory.ts` stamps these onto every registration in one place.
8
+ *
9
+ * Two sets, and everything outside both is an ADDITIVE write (`destructiveHint: false` is the MCP
10
+ * meaning of "performs only additive updates"). Written as names rather than derived at runtime
11
+ * because the registrar never sees what a handler calls; `__tests__/factory.test.ts` derives the
12
+ * same split from the HTTP method each handler calls and requires the two to agree in both
13
+ * directions, so a new tool that deletes and is missing here goes red rather than advertising itself
14
+ * as additive.
15
+ */
16
+ export declare const READ_ONLY_TOOLS: ReadonlySet<string>;
17
+ /**
18
+ * Writes that remove, revoke, overwrite or replace something that already exists. Every tool
19
+ * sending `PUT`, `PATCH` or `DELETE` is here, plus the POSTs that do the same under a create-shaped
20
+ * verb: a revoked delegation or proof is terminal, a regenerated key invalidates the old one, the
21
+ * DNS-connect tools upsert the ACCOUNT's stored provider credential (replacing the token every other
22
+ * domain uses), and making a profile primary — directly or by creating one with `is_primary` —
23
+ * demotes the current primary.
24
+ */
25
+ export declare const DESTRUCTIVE_TOOLS: ReadonlySet<string>;
26
+ export declare function annotationsFor(tool: string): ToolAnnotations;
27
+ //# sourceMappingURL=toolAnnotations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toolAnnotations.d.ts","sourceRoot":"","sources":["../src/toolAnnotations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AAE1E;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,eAAe,EAAE,WAAW,CAAC,MAAM,CAoF9C,CAAC;AAEH;;;;;;;GAOG;AACH,eAAO,MAAM,iBAAiB,EAAE,WAAW,CAAC,MAAM,CA4ChD,CAAC;AAEH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,eAAe,CAG5D"}
@@ -0,0 +1,158 @@
1
+ /**
2
+ * What each tool does to the caller's account, stated to the CLIENT (live review 2026-09-26, M5).
3
+ *
4
+ * With no annotations an MCP client must assume every tool may be destructive, so a read is gated
5
+ * behind the same confirmation as `revoke_api_key`, and the dangerous tools get no warning of their
6
+ * own. `factory.ts` stamps these onto every registration in one place.
7
+ *
8
+ * Two sets, and everything outside both is an ADDITIVE write (`destructiveHint: false` is the MCP
9
+ * meaning of "performs only additive updates"). Written as names rather than derived at runtime
10
+ * because the registrar never sees what a handler calls; `__tests__/factory.test.ts` derives the
11
+ * same split from the HTTP method each handler calls and requires the two to agree in both
12
+ * directions, so a new tool that deletes and is missing here goes red rather than advertising itself
13
+ * as additive.
14
+ */
15
+ export const READ_ONLY_TOOLS = new Set([
16
+ // Local or third-party reads: no call to our API at all.
17
+ 'render_auth_link',
18
+ 'verify_delegation',
19
+ 'verify_delegations',
20
+ // POSTs that compute and store nothing.
21
+ 'validate_proof',
22
+ 'preview_template',
23
+ 'preview_profile_template',
24
+ 'render_template',
25
+ // GETs. `export_data` is deliberately absent: it spends the once-per-24h export allowance.
26
+ 'get_webhook_stats',
27
+ 'list_webhook_deliveries',
28
+ 'get_webhook_delivery',
29
+ 'get_current_user',
30
+ 'list_auth_sessions',
31
+ 'get_session',
32
+ 'wait_for_session',
33
+ 'get_user_domain_verification_status',
34
+ 'get_verification_request',
35
+ 'get_request_proofs',
36
+ 'list_verification_requests',
37
+ 'get_request_by_reference',
38
+ 'wait_for_request',
39
+ 'list_emails',
40
+ 'get_add_email_status',
41
+ 'get_authorization',
42
+ 'list_authorizations',
43
+ 'export_authorizations',
44
+ 'list_domains',
45
+ 'get_domain',
46
+ 'get_dns_providers',
47
+ 'check_domain_credentials',
48
+ 'check_domain_email_status',
49
+ 'get_verification',
50
+ 'list_verifications',
51
+ 'list_verified_users',
52
+ 'get_verified_user',
53
+ 'wait_for_verification',
54
+ 'get_multi_channel_verification_status',
55
+ 'get_subscription',
56
+ 'list_circles',
57
+ 'get_circle',
58
+ 'list_circle_members',
59
+ 'list_circle_member_channels',
60
+ 'get_identity_challenge',
61
+ 'list_delegations',
62
+ 'get_delegation',
63
+ 'list_api_keys',
64
+ 'list_assets',
65
+ 'get_asset',
66
+ 'get_usage',
67
+ 'get_platform_summary',
68
+ 'get_settings',
69
+ 'search',
70
+ 'get_self_api_key',
71
+ 'get_api_key_usage',
72
+ 'list_dns_credentials',
73
+ 'wait_for_login',
74
+ 'wait_for_account_creation',
75
+ 'list_phones',
76
+ 'get_add_phone_status',
77
+ 'get_proof_status',
78
+ 'list_revoked_proofs',
79
+ 'list_profiles',
80
+ 'get_profile',
81
+ 'list_profile_templates',
82
+ 'get_my_profile',
83
+ 'get_profile_assets',
84
+ 'list_templates',
85
+ 'get_default_templates',
86
+ 'get_template',
87
+ 'get_hitl_keys',
88
+ 'get_2fa_status',
89
+ 'wait_for_2fa',
90
+ 'list_my_requests',
91
+ 'list_incoming_requests',
92
+ 'get_hitl',
93
+ 'list_hitls',
94
+ 'poll_chat_id_discovery',
95
+ 'wait_for_chat_id_discovery',
96
+ 'get_confirmation',
97
+ 'list_confirmations',
98
+ 'wait_for_confirmation',
99
+ ]);
100
+ /**
101
+ * Writes that remove, revoke, overwrite or replace something that already exists. Every tool
102
+ * sending `PUT`, `PATCH` or `DELETE` is here, plus the POSTs that do the same under a create-shaped
103
+ * verb: a revoked delegation or proof is terminal, a regenerated key invalidates the old one, the
104
+ * DNS-connect tools upsert the ACCOUNT's stored provider credential (replacing the token every other
105
+ * domain uses), and making a profile primary — directly or by creating one with `is_primary` —
106
+ * demotes the current primary.
107
+ */
108
+ export const DESTRUCTIVE_TOOLS = new Set([
109
+ // DELETE
110
+ 'revoke_api_key',
111
+ 'revoke_asset',
112
+ 'revoke_auth_session',
113
+ 'revoke_authorization',
114
+ 'delete_circle',
115
+ 'remove_circle_member',
116
+ 'remove_circle_member_channel',
117
+ 'delete_dns_credential',
118
+ 'delete_domain',
119
+ 'remove_email',
120
+ 'delete_hitl_keys',
121
+ 'delete_hitl',
122
+ 'remove_phone',
123
+ 'delete_profile',
124
+ 'delete_profile_template',
125
+ 'delete_template',
126
+ 'cancel_user_request',
127
+ 'cancel_verification_request',
128
+ // PUT / PATCH
129
+ 'set_primary_email',
130
+ 'set_primary_phone',
131
+ 'upload_hitl_keys',
132
+ 'update_profile_template',
133
+ 'update_profile_proofs',
134
+ 'update_my_profile',
135
+ 'update_public_proofs',
136
+ 'update_template',
137
+ 'update_circle',
138
+ 'update_hitl',
139
+ 'update_profile',
140
+ 'update_settings',
141
+ // POSTs that end or replace something
142
+ 'revoke_delegation',
143
+ 'revoke_proof',
144
+ 'regenerate_api_key',
145
+ 'connect_cloudflare',
146
+ 'connect_godaddy',
147
+ 'connect_dns_provider',
148
+ 'add_verification_provider',
149
+ 'create_dns_credential',
150
+ 'set_primary_profile',
151
+ 'create_profile',
152
+ ]);
153
+ export function annotationsFor(tool) {
154
+ if (READ_ONLY_TOOLS.has(tool))
155
+ return { readOnlyHint: true };
156
+ return { readOnlyHint: false, destructiveHint: DESTRUCTIVE_TOOLS.has(tool) };
157
+ }
158
+ //# sourceMappingURL=toolAnnotations.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toolAnnotations.js","sourceRoot":"","sources":["../src/toolAnnotations.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,eAAe,GAAwB,IAAI,GAAG,CAAC;IAC1D,yDAAyD;IACzD,kBA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BAAgB;IAChB,cAAc;IACd,qBAAqB;IACrB,sBAAsB;IACtB,eAAe;IACf,sBAAsB;IACtB,8BAA8B;IAC9B,uBAAuB;IACvB,eAAe;IACf,cAAc;IACd,kBAAkB;IAClB,aAAa;IACb,cAAc;IACd,gBAAgB;IAChB,yBAAyB;IACzB,iBAAiB;IACjB,qBAAqB;IACrB,6BAA6B;IAC7B,cAAc;IACd,mBAAmB;IACnB,mBAAmB;IACnB,kBAAkB;IAClB,yBAAyB;IACzB,uBAAuB;IACvB,mBAAmB;IACnB,sBAAsB;IACtB,iBAAiB;IACjB,eAAe;IACf,aAAa;IACb,gBAAgB;IAChB,iBAAiB;IACjB,sCAAsC;IACtC,mBAAmB;IACnB,cAAc;IACd,oBAAoB;IACpB,oBAAoB;IACpB,iBAAiB;IACjB,sBAAsB;IACtB,2BAA2B;IAC3B,uBAAuB;IACvB,qBAAqB;IACrB,gBAAgB;CACjB,CAAC,CAAC;AAEH,MAAM,UAAU,cAAc,CAAC,IAAY;IACzC,IAAI,eAAe,CAAC,GAAG,CAAC,IAAI,CAAC;QAAE,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,CAAC;IAC7D,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,eAAe,EAAE,iBAAiB,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC;AAC/E,CAAC"}
@@ -1,4 +1,4 @@
1
1
  import type { HttpClient } from '../http.js';
2
2
  import type { ToolRegistrar } from '../types.js';
3
3
  export declare function registerTools(tool: ToolRegistrar, http: HttpClient): void;
4
- //# sourceMappingURL=projects.d.ts.map
4
+ //# sourceMappingURL=accounts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"accounts.d.ts","sourceRoot":"","sources":["../../src/tools/accounts.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAIjD,wBAAgB,aAAa,CAAC,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE,UAAU,QAqFlE"}
@@ -0,0 +1,70 @@
1
+ import { z } from 'zod';
2
+ import { jsonResult, errorResult, pollUntilTerminal, WAIT_DEFAULT_SECONDS } from '../types.js';
3
+ import { ApiError } from '../http.js';
4
+ export function registerTools(tool, http) {
5
+ tool('create_account', 'Create an account-bootstrap session for agent-driven onboarding. Public endpoint (no API key required). Returns a session id, channel-specific instructions, and — FOR TELEGRAM AND WHATSAPP ONLY — deep_link, qr_code (base64 PNG) and qr_text (UTF-8 text QR).\n\nThe endpoint is safe to call regardless of whether the submitted identity is new: completing verification transparently creates a User when none exists, or logs the user in when one already does. The response is intentionally uniform — the server does NOT reveal whether the identity is already registered (this would be a user-enumeration oracle). If the agent needs to distinguish new-vs-returning users, call `get_current_user` after verification and inspect the user\'s `created_at`.\n\nEMAIL CHANNEL SENDS NOTHING HERE. The response carries email_sent=false and send_required=true: confirm with the user that the address is theirs, then call send_account_email. The other channels dispatch nothing either way — the user sends the first message themselves (reverse OTP).\n\nAgent usage: (1) Call create_account with the user\'s chosen channel. (2) For email, confirm with the user and call send_account_email. On telegram/whatsapp pass `deep_link` to render_auth_link, which prints the clickable link and a QR code beneath it. On sms `deep_link` is an EMPTY STRING and render_auth_link will reject it — show `sms_message`, which is what the user sends; this response carries no destination number, so do not invent one. Do not hand `qr_text` to a link renderer either — it is the link already rendered as QR art; print it verbatim inside a fenced code block if a real terminal needs the QR. (3) Call wait_for_account_creation with the session id until verification completes. (4) On verified, JWT + refresh cookies are set; proceed with whatever follow-up the agent was asked to do.', {
6
+ channel: z.enum(['telegram', 'whatsapp', 'sms', 'email']).describe('Authentication channel the user will verify through'),
7
+ phone_number: z.string().optional().describe('E.164 phone number. Required for SMS channel (determines DID routing).'),
8
+ email: z.string().email().optional().describe('Email address. Required for email channel.'),
9
+ }, async (args) => {
10
+ try {
11
+ const result = await http.post('/api/v1/accounts', args);
12
+ return jsonResult(result);
13
+ }
14
+ catch (e) {
15
+ if (e instanceof ApiError)
16
+ return errorResult(`${e.code}: ${e.message}`);
17
+ throw e;
18
+ }
19
+ });
20
+ tool('send_account_email', 'Deliver the verification email for an account-bootstrap session created with channel "email". Public endpoint (no API key required).\n\nWhy this is a separate call: create_account deliberately sends NOTHING. A message from proof.holdings arriving in someone\'s inbox is an act with a person on the other end, so it takes an explicit second step rather than being a side effect of creating a session. ASK THE USER to confirm the address is theirs before calling this — do not call it automatically after create_account.\n\nThe other channels (telegram, whatsapp, sms) never need this: the user sends the first message themselves (reverse OTP), so nothing is dispatched to them at all.\n\nOne session sends at most one email, including under concurrent calls. A repeat answers 410 already_sent, which means the material backing the send is gone: usually because the email went out, occasionally because an attempt was interrupted mid-send and nothing was delivered. Do not tell the user a message was sent on the strength of a 410 — create a new session instead. (A session the recipient cancelled via the decline link, or an expired one, answers 404, not 410.) If delivery fails the response carries email_sent=false and the call can be retried.', {
21
+ id: z.string().describe('Account session id from create_account'),
22
+ }, async ({ id }) => {
23
+ try {
24
+ const result = await http.post(`/api/v1/accounts/${encodeURIComponent(id)}/send`);
25
+ return jsonResult(result);
26
+ }
27
+ catch (e) {
28
+ if (e instanceof ApiError)
29
+ return errorResult(`${e.code}: ${e.message}`);
30
+ throw e;
31
+ }
32
+ });
33
+ tool('wait_for_account_creation', 'Poll an account-bootstrap session until the user completes verification. Uses exponential backoff (2s initial, 1.5x, 30s max) with jitter.\n\nAgent usage: Call this after create_account with the returned session id. Terminal states: "verified" (this server keeps the session for this connection; the `user_id` field in the terminal body identifies the authenticated user), "expired". A result with status "pending" means the wait ran out before the user finished — call this tool again with the same id. Works identically whether the underlying flow created a new User or logged in an existing one.', {
34
+ id: z.string().describe('Account session id from create_account'),
35
+ timeout_seconds: z.number().int().min(1).max(600).optional().describe(`Maximum wait time in seconds (default: ${WAIT_DEFAULT_SECONDS}, max: 600). Keep it under your MCP client's request timeout (the SDK default is 60 s) — a longer wait is cut off by the client while the server is still polling. On timeout the tool answers status "pending"; call it again with the same identifier.`),
36
+ }, async ({ id, timeout_seconds }) => {
37
+ try {
38
+ return await pollUntilTerminal(() => http.get(`/api/v1/accounts/${encodeURIComponent(id)}`), ['verified', 'expired'], timeout_seconds ?? WAIT_DEFAULT_SECONDS, `account session ${id}`);
39
+ }
40
+ catch (e) {
41
+ if (e instanceof ApiError)
42
+ return errorResult(`${e.code}: ${e.message}`);
43
+ throw e;
44
+ }
45
+ });
46
+ tool('start_2fa_for_action', 'Start a 2FA challenge that grants the authenticated user permission to perform a sensitive action. The 2FA must complete on a channel DIFFERENT from the user\'s last login channel (the backend enforces this). On success a grant is stored keyed by the user id and action_type; middleware on the protected endpoint reads the grant and allows the mutation.\n\nDestructive action types (api_key_create, api_key_revoke, api_key_regenerate, api_key_view, account_delete, phone_remove, email_remove, revocation_bulk) are capped at 5min TTL and forced single-use by server policy. Configuration scopes (settings_write, profile_update, templates_write) allow up to 24h TTL and caller-chosen single_use — useful for agents making multiple settings mutations in one session.\n\nAgent usage: (1) Attempt the sensitive call; if you get `403 2fa_required` note the `action_type`. (2) Call start_2fa_for_action with that action_type and a channel different from the login channel. (3) Present the challenge: on telegram/whatsapp pass `deep_link` to render_auth_link; on sms show `sms_message` and the number to send it to; on email check the response first: with more than one verified email and no `email_id` given, it answers 200 with `requires_email_selection: true` and `available_emails` — NO session was started and nothing was sent, so ask the user which address and call again with `email_id` rather than telling them to open a mailbox. Never hand `qr_text` to a link renderer — it is the link already rendered as QR art. Print it verbatim inside a fenced code block only when a real terminal needs the QR. (4) Call wait_for_2fa until the session is verified. (5) Retry the original sensitive call.', {
47
+ action_type: z.enum([
48
+ 'api_key_create', 'api_key_revoke', 'api_key_regenerate', 'api_key_view',
49
+ 'phone_remove', 'email_remove',
50
+ 'account_delete', 'revocation_bulk',
51
+ 'settings_write', 'profile_update', 'templates_write',
52
+ ]).describe('The sensitive action the 2FA grant will authorize. Destructive scopes (api_key_*, account_delete, phone_remove, email_remove, revocation_bulk) are capped at 5 min TTL + forced single-use. Configuration scopes (settings_write, profile_update, templates_write) allow up to 24h TTL with caller-chosen single_use. See config/twoFAPolicy.ts on the backend for the canonical policy.'),
53
+ channel: z.enum(['telegram', 'whatsapp', 'sms', 'email']).describe('Channel for the 2FA challenge — must differ from the user\'s last login channel'),
54
+ email_id: z.string().optional().describe('Optional: specific UserEmail id for email-channel 2FA'),
55
+ phone_id: z.string().optional().describe('Optional: specific UserPhone id for phone-channel 2FA'),
56
+ ttl_seconds: z.number().int().min(60).max(86400).optional().describe('Requested grant lifetime in seconds. Server caps to 300s for destructive action types, 86400s for configuration scopes. Defaults to 300 if omitted.'),
57
+ single_use: z.boolean().optional().describe('Whether the grant is consumed on first use. Server forces true for destructive action types. Defaults to true.'),
58
+ }, async (args) => {
59
+ try {
60
+ const result = await http.post('/api/v1/me/2fa/start', args);
61
+ return jsonResult(result);
62
+ }
63
+ catch (e) {
64
+ if (e instanceof ApiError)
65
+ return errorResult(`${e.code}: ${e.message}`);
66
+ throw e;
67
+ }
68
+ });
69
+ }
70
+ //# sourceMappingURL=accounts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"accounts.js","sourceRoot":"","sources":["../../src/tools/accounts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAC/F,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,MAAM,UAAU,aAAa,CAAC,IAAmB,EAAE,IAAgB;IACjE,IAAI,CACF,gBAAgB,EAChB,wzDAAwzD,EACxzD;QACE,OAAO,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,UAAU,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC,qDAAqD,CAAC;QACzH,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAA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C,uDAAuD,CAAC;QACjG,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,uDAAuD,CAAC;QACjG,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,qJAAqJ,CAAC;QAC3N,UAAU,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,gHAAgH,CAAC;KAC9J,EACD,KAAK,EAAE,IAAI,EAAE,EAAE;QACb,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,sBAAsB,EAAE,IAAI,CAAC,CAAC;YAC7D,OAAO,UAAU,CAAC,MAAM,CAAC,CAAC;QAC5B,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,IAAI,CAAC,YAAY,QAAQ;gBAAE,OAAO,WAAW,CAAC,GAAG,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;YACzE,MAAM,CAAC,CAAC;QACV,CAAC;IACH,CAAC,CACF,CAAC;AACJ,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"api-keys.d.ts","sourceRoot":"","sources":["../../src/tools/api-keys.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAkBjD,wBAAgB,aAAa,CAAC,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE,UAAU,QAoElE"}
1
+ {"version":3,"file":"api-keys.d.ts","sourceRoot":"","sources":["../../src/tools/api-keys.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AA0BjD,wBAAgB,aAAa,CAAC,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE,UAAU,QAqElE"}
@@ -1,13 +1,21 @@
1
1
  import { z } from 'zod';
2
2
  import { jsonResult, errorResult } from '../types.js';
3
3
  import { ApiError } from '../http.js';
4
- // Mirrors validApiKeyScopes from src/routes/me.ts — keep in sync with backend scope definitions.
4
+ // Mirrors validApiKeyScopes — the canonical scope taxonomy in the backend's
5
+ // src/constants/apiKeyScopes.ts. This package is published to npm and cannot import
6
+ // backend src/, so it carries its own copy; the backend drift test
7
+ // src/__tests__/drift/api-key-scopes.test.ts fails CI if this list diverges.
5
8
  const validScopes = [
6
9
  'verifications:read', 'verifications:write', 'verifications:create', 'verifications:*',
7
10
  'proofs:read', 'proofs:*',
11
+ 'delegations:read', 'delegations:write', 'delegations:create', 'delegations:*',
12
+ 'lookalike-watch:read', 'lookalike-watch:write', 'lookalike-watch:*',
8
13
  'templates:read', 'templates:write', 'templates:*',
14
+ 'authorizations:read', 'authorizations:write', 'authorizations:create', 'authorizations:*',
15
+ 'hitl:read', 'hitl:write', 'hitl:create', 'hitl:*',
16
+ 'confirmations:read', 'confirmations:write', 'confirmations:create', 'confirmations:*',
17
+ 'circles:read', 'circles:write', 'circles:create', 'circles:*',
9
18
  'profiles:read', 'profiles:write', 'profiles:*',
10
- 'projects:read', 'projects:write', 'projects:*',
11
19
  'billing:read', 'billing:write', 'billing:*',
12
20
  'settings:read', 'settings:write', 'settings:*',
13
21
  'assets:read', 'assets:write', 'assets:*',
@@ -26,10 +34,11 @@ export function registerTools(tool, http) {
26
34
  throw e;
27
35
  }
28
36
  });
29
- tool('create_api_key', 'Create a new API key. The secret key value is returned ONLY in this response — store it securely. Note: the secret will be visible in the AI conversation context. May require 2FA verification.', {
37
+ tool('create_api_key', 'Create a new API key. The secret key value is returned ONLY in this response — store it securely. Note: the secret will be visible in the AI conversation context. Optionally bind the key to a sub-account (project) via profile_id — outbound messages sent with the key are then branded as that project.\n\nAgent usage: This operation requires 2FA. Before calling, complete the 2FA flow: (1) call start_2fa with action_type "api_key_create" and the user\'s preferred channel, (2) tell the user a code was sent and wait for them to verify, (3) poll get_2fa_status until status is "verified", (4) then call create_api_key — the backend session will be elevated. If you get a 403, the 2FA session has expired — restart the flow.', {
30
38
  name: z.string().min(1).max(100).optional().describe('Human-readable key name'),
31
39
  environment: z.enum(['production', 'test']).optional().describe('Key environment (default: production)'),
32
40
  scopes: z.array(z.enum(validScopes)).max(20).optional().describe('Permission scopes for the key'),
41
+ profile_id: z.string().optional().describe('Bind the new key to a sub-account (PublicProfile) project you own (24-hex id). Immutable after creation; omit for an unbound account-wide key.'),
33
42
  }, async (args) => {
34
43
  try {
35
44
  const result = await http.post('/api/v1/me/api-keys', args);
@@ -41,7 +50,7 @@ export function registerTools(tool, http) {
41
50
  throw e;
42
51
  }
43
52
  });
44
- tool('revoke_api_key', 'Revoke an API key by ID. The key will immediately stop working. This action cannot be undone.', {
53
+ tool('revoke_api_key', 'Revoke an API key by ID. The key will immediately stop working. This action cannot be undone.\n\nAgent usage: This operation requires 2FA. Before calling, complete the 2FA flow: (1) call start_2fa with action_type "api_key_revoke", (2) wait for user to verify the code, (3) poll get_2fa_status until "verified", (4) then call revoke_api_key.', {
45
54
  id: z.string().describe('API key ID to revoke'),
46
55
  }, async ({ id }) => {
47
56
  try {
@@ -54,7 +63,7 @@ export function registerTools(tool, http) {
54
63
  throw e;
55
64
  }
56
65
  });
57
- tool('regenerate_api_key', 'Regenerate an API key, issuing a new secret while keeping the same ID and settings. The old key stops working immediately. The new secret is returned ONLY in this response. Note: the secret will be visible in the AI conversation context.', {
66
+ tool('regenerate_api_key', 'Regenerate an API key, issuing a new secret while keeping the same ID and settings. The old key stops working immediately. The new secret is returned ONLY in this response. Note: the secret will be visible in the AI conversation context.\n\nAgent usage: This operation requires 2FA. Before calling, complete the 2FA flow: (1) call start_2fa with action_type "api_key_regenerate", (2) wait for user to verify the code, (3) poll get_2fa_status until "verified", (4) then call regenerate_api_key.', {
58
67
  id: z.string().describe('API key ID to regenerate'),
59
68
  }, async ({ id }) => {
60
69
  try {
@@ -1 +1 @@
1
- {"version":3,"file":"api-keys.js","sourceRoot":"","sources":["../../src/tools/api-keys.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,iGAAiG;AACjG,MAAM,WAAW,GAAG;IAClB,oBAAoB,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,iBAAiB;IACtF,aAAa,EAAE,UAAU;IACzB,gBAAgB,EAAE,iBAAiB,EAAE,aAAa;IAClD,eAAe,EAAE,gBAAgB,EAAE,YAAY;IAC/C,eAAe,EAAE,gBAAgB,EAAE,YAAY;IAC/C,cAAc,EAAE,eAAe,EAAE,WAAW;IAC5C,eAAe,EAAE,gBAAgB,EAAE,YAAY;IAC/C,aAAa,EAAE,cAAc,EAAE,UAAU;IACzC,eAAe,EAAE,gBAAgB,EAAE,YAAY;IAC/C,WAAW,EAAE,YAAY,EAAE,QAAQ;CAC3B,CAAC;AAEX,MAAM,UAAU,aAAa,CAAC,IAAmB,EAAE,IAAgB;IACjE,IAAI,CACF,eAAe,EACf,oGAAoG,EACpG,EAAE,EACF,KAAK,IAAI,EAAE;QACT,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAC;YACrD,OAAO,UAAU,CAAC,MAAM,CAAC,CAAC;QAC5B,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,IAAI,CAAC,YAAY,QAAQ;gBAAE,OAAO,WAAW,CAAC,GAAG,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;YACzE,MAAM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C,OAAO,CAAC,EAAE,CAAC;YACX,IAAI,CAAC,YAAY,QAAQ;gBAAE,OAAO,WAAW,CAAC,GAAG,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;YACzE,MAAM,CAAC,CAAC;QACV,CAAC;IACH,CAAC,CACF,CAAC;IAEF,IAAI,CACF,oBAAoB,EACpB,+eAA+e,EAC/e;QACE,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,0BAA0B,CAAC;KACpD,EACD,KAAK,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE;QACf,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,uBAAuB,kBAAkB,CAAC,EAAE,CAAC,aAAa,CAAC,CAAC;YAC3F,OAAO,UAAU,CAAC,MAAM,CAAC,CAAC;QAC5B,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,IAAI,CAAC,YAAY,QAAQ;gBAAE,OAAO,WAAW,CAAC,GAAG,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;YACzE,MAAM,CAAC,CAAC;QACV,CAAC;IACH,CAAC,CACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { HttpClient } from '../http.js';
2
+ import type { ToolRegistrar } from '../types.js';
3
+ export declare function registerTools(tool: ToolRegistrar, http: HttpClient): void;
4
+ //# sourceMappingURL=auth-flows.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth-flows.d.ts","sourceRoot":"","sources":["../../src/tools/auth-flows.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAIjD,wBAAgB,aAAa,CAAC,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE,UAAU,QAyClE"}
@@ -0,0 +1,34 @@
1
+ import { z } from 'zod';
2
+ import { jsonResult, errorResult, pollUntilTerminal, WAIT_DEFAULT_SECONDS } from '../types.js';
3
+ import { ApiError } from '../http.js';
4
+ export function registerTools(tool, http) {
5
+ tool('start_login', 'Start a login session by sending an authentication challenge to the user\'s chosen channel (Telegram, WhatsApp, SMS, or email). Returns a session ID and, FOR TELEGRAM AND WHATSAPP ONLY, deep_link, qr_code (base64 PNG) and qr_text (UTF-8 text QR for terminal display); on sms it returns sms_message with sms_dids instead, and on email nothing to display.\n\nAgent usage: (1) Call start_login with the desired channel and phone_number (for SMS) or email (for email). (2) Present the challenge, and WHICH FIELD depends on the channel. On telegram/whatsapp pass `deep_link` to render_auth_link, which prints the clickable link and a QR code; in a chat client the link is what the user acts on, since they are usually on the same machine. On sms `deep_link` is an EMPTY STRING and render_auth_link will reject it — show `sms_message` and let the user pick a number from `sms_dids`. `suggested_region` is always set, but the matching ENTRY in `sms_dids` may be missing (europe and israel appear only when a number is configured) or present with an empty `did`, so offer that region first only when `sms_dids[suggested_region]` exists and carries a number, and otherwise offer whatever the object does. On email there is nothing to display at all, and nothing to check either: a result means the mail was accepted for delivery, so tell the user to open their inbox. A delivery failure is an ERROR here, not a field — the tool answers `challenge_delivery_failed` and NO session exists, so do not call wait_for_login; retry, or offer another channel. Never hand `qr_text` to a link renderer — it is the link already rendered as QR art, so print it verbatim inside a fenced code block or not at all, because its rows stop scanning the moment one wraps or a blank line lands between them. (3) Call wait_for_login with the returned session ID to poll until the user completes authentication. Terminal states: "verified" (login succeeded), "failed", "expired".', {
6
+ channel: z.enum(['telegram', 'whatsapp', 'sms', 'email']).describe('Authentication channel'),
7
+ phone_number: z.string().optional().describe('Phone number in E.164 format (required for SMS channel)'),
8
+ email: z.string().email().optional().describe('Email address (required for email channel)'),
9
+ }, async (args) => {
10
+ try {
11
+ const result = await http.post('/api/v1/auth/sessions', args);
12
+ return jsonResult(result);
13
+ }
14
+ catch (e) {
15
+ if (e instanceof ApiError)
16
+ return errorResult(`${e.code}: ${e.message}`);
17
+ throw e;
18
+ }
19
+ });
20
+ tool('wait_for_login', 'Poll a login session until the user completes authentication. Uses exponential backoff (2s initial, 1.5x, 30s max) with jitter.\n\nAgent usage: Call this after start_login with the returned session ID. Terminal states: "verified" (login succeeded — this server keeps the session for this connection and signs your own account records with it: emails, phones, domains, API keys, 2FA, DNS credentials, verification requests, your public profile\'s username and proof list), "failed", "expired". A result with status "pending" means the wait ran out before the user finished — call this tool again with the same id.', {
21
+ id: z.string().describe('Auth session ID from start_login'),
22
+ timeout_seconds: z.number().int().min(1).max(600).optional().describe(`Maximum wait time in seconds (default: ${WAIT_DEFAULT_SECONDS}, max: 600). Keep it under your MCP client's request timeout (the SDK default is 60 s) — a longer wait is cut off by the client while the server is still polling. On timeout the tool answers status "pending"; call it again with the same identifier.`),
23
+ }, async ({ id, timeout_seconds }) => {
24
+ try {
25
+ return await pollUntilTerminal(() => http.get(`/api/v1/auth/sessions/${encodeURIComponent(id)}`), ['verified', 'failed', 'expired'], timeout_seconds ?? WAIT_DEFAULT_SECONDS, `login session ${id}`);
26
+ }
27
+ catch (e) {
28
+ if (e instanceof ApiError)
29
+ return errorResult(`${e.code}: ${e.message}`);
30
+ throw e;
31
+ }
32
+ });
33
+ }
34
+ //# sourceMappingURL=auth-flows.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth-flows.js","sourceRoot":"","sources":["../../src/tools/auth-flows.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAC/F,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,MAAM,UAAU,aAAa,CAAC,IAAmB,EAAE,IAAgB;IACjE,IAAI,CACF,aAAa,EACb,65DAA65D,EAC75D;QACE,OAAO,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,UA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AC,UAAU,EAAE,QAAQ,EAAE,SAAS,CAAC,EACjC,eAAe,IAAI,oBAAoB,EACvC,iBAAiB,EAAE,EAAE,CACtB,CAAC;QACJ,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,IAAI,CAAC,YAAY,QAAQ;gBAAE,OAAO,WAAW,CAAC,GAAG,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;YACzE,MAAM,CAAC,CAAC;QACV,CAAC;IACH,CAAC,CACF,CAAC;AACJ,CAAC"}
@@ -2,7 +2,7 @@ import { z } from 'zod';
2
2
  import { jsonResult, errorResult } from '../types.js';
3
3
  import { ApiError } from '../http.js';
4
4
  export function registerTools(tool, http) {
5
- tool('get_current_user', 'Get the current authenticated user. Returns account details, plan, and settings for the API key owner.', {}, async () => {
5
+ tool('get_current_user', 'Get the signed-in user\'s account details, plan and settings. Needs a login session: call start_login, then wait_for_login until it reports success. An API key alone cannot read this — for the key\'s own account use get_self_api_key or get_settings.', {}, async () => {
6
6
  try {
7
7
  const result = await http.get('/api/v1/auth/me');
8
8
  return jsonResult(result);
@@ -1 +1 @@
1
- {"version":3,"file":"auth.js","sourceRoot":"","sources":["../../src/tools/auth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,MAAM,UAAU,aAAa,CAAC,IAAmB,EAAE,IAAgB;IACjE,IAAI,CACF,kBAAkB,EAClB,wGAAwG,EACxG,EAAE,EACF,KAAK,IAAI,EAAE;QACT,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;YACjD,OAAO,UAAU,CAAC,MAAM,CAAC,CAAC;QAC5B,CAAC;QAAC,OAAO,CAAC,EAAE,C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,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE;QACvB,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,GAAG,CAAC,yBAAyB,kBAAkB,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC;YACzF,OAAO,UAAU,CAAC,MAAM,CAAC,CAAC;QAC5B,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,IAAI,CAAC,YAAY,QAAQ;gBAAE,OAAO,WAAW,CAAC,GAAG,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;YACzE,MAAM,CAAC,CAAC;QACV,CAAC;IACH,CAAC,CACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { HttpClient } from '../http.js';
2
+ import type { ToolRegistrar } from '../types.js';
3
+ export declare function registerTools(tool: ToolRegistrar, http: HttpClient): void;
4
+ //# sourceMappingURL=authorizations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"authorizations.d.ts","sourceRoot":"","sources":["../../src/tools/authorizations.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAQjD,wBAAgB,aAAa,CAAC,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE,UAAU,QAiHlE"}