@didit-protocol/mcp-server 5.1.53 → 5.1.62

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 (142) hide show
  1. package/README.md +14 -4
  2. package/dist/accept.d.ts +54 -0
  3. package/dist/accept.d.ts.map +1 -0
  4. package/dist/accept.js +98 -0
  5. package/dist/accept.js.map +1 -0
  6. package/dist/audit-log.d.ts.map +1 -1
  7. package/dist/audit-log.js +22 -6
  8. package/dist/audit-log.js.map +1 -1
  9. package/dist/auth/refusal-log.d.ts +62 -0
  10. package/dist/auth/refusal-log.d.ts.map +1 -0
  11. package/dist/auth/refusal-log.js +131 -0
  12. package/dist/auth/refusal-log.js.map +1 -0
  13. package/dist/chatgpt-app.d.ts +1 -0
  14. package/dist/chatgpt-app.d.ts.map +1 -1
  15. package/dist/chatgpt-app.js +4 -0
  16. package/dist/chatgpt-app.js.map +1 -1
  17. package/dist/config.d.ts +17 -1
  18. package/dist/config.d.ts.map +1 -1
  19. package/dist/config.js +62 -9
  20. package/dist/config.js.map +1 -1
  21. package/dist/connect-page.d.ts +10 -0
  22. package/dist/connect-page.d.ts.map +1 -0
  23. package/dist/connect-page.js +8 -0
  24. package/dist/connect-page.js.map +1 -0
  25. package/dist/connection-timeouts.d.ts +30 -0
  26. package/dist/connection-timeouts.d.ts.map +1 -0
  27. package/dist/connection-timeouts.js +52 -0
  28. package/dist/connection-timeouts.js.map +1 -0
  29. package/dist/http.d.ts.map +1 -1
  30. package/dist/http.js +95 -7
  31. package/dist/http.js.map +1 -1
  32. package/dist/index.d.ts.map +1 -1
  33. package/dist/index.js +209 -3242
  34. package/dist/index.js.map +1 -1
  35. package/dist/paging.d.ts +3 -0
  36. package/dist/paging.d.ts.map +1 -1
  37. package/dist/paging.js +4 -1
  38. package/dist/paging.js.map +1 -1
  39. package/dist/permissions.d.ts.map +1 -1
  40. package/dist/permissions.js +3 -153
  41. package/dist/permissions.js.map +1 -1
  42. package/dist/release-version.d.ts +45 -0
  43. package/dist/release-version.d.ts.map +1 -0
  44. package/dist/release-version.js +90 -0
  45. package/dist/release-version.js.map +1 -0
  46. package/dist/schema/feature-config-schema.json +43 -4
  47. package/dist/security.d.ts.map +1 -1
  48. package/dist/security.js +41 -2
  49. package/dist/security.js.map +1 -1
  50. package/dist/tools/billing.d.ts +2 -0
  51. package/dist/tools/billing.d.ts.map +1 -1
  52. package/dist/tools/billing.js +124 -1
  53. package/dist/tools/billing.js.map +1 -1
  54. package/dist/tools/blocklist.d.ts +2 -0
  55. package/dist/tools/blocklist.d.ts.map +1 -1
  56. package/dist/tools/blocklist.js +94 -0
  57. package/dist/tools/blocklist.js.map +1 -1
  58. package/dist/tools/businesses.d.ts +2 -0
  59. package/dist/tools/businesses.d.ts.map +1 -1
  60. package/dist/tools/businesses.js +129 -0
  61. package/dist/tools/businesses.js.map +1 -1
  62. package/dist/tools/cases.d.ts +2 -0
  63. package/dist/tools/cases.d.ts.map +1 -1
  64. package/dist/tools/cases.js +131 -0
  65. package/dist/tools/cases.js.map +1 -1
  66. package/dist/tools/customization.d.ts +2 -0
  67. package/dist/tools/customization.d.ts.map +1 -1
  68. package/dist/tools/customization.js +43 -0
  69. package/dist/tools/customization.js.map +1 -1
  70. package/dist/tools/feature-config.d.ts +45 -0
  71. package/dist/tools/feature-config.d.ts.map +1 -1
  72. package/dist/tools/feature-config.js +100 -9
  73. package/dist/tools/feature-config.js.map +1 -1
  74. package/dist/tools/lists.d.ts +2 -0
  75. package/dist/tools/lists.d.ts.map +1 -1
  76. package/dist/tools/lists.js +193 -0
  77. package/dist/tools/lists.js.map +1 -1
  78. package/dist/tools/members.d.ts +2 -0
  79. package/dist/tools/members.d.ts.map +1 -1
  80. package/dist/tools/members.js +141 -0
  81. package/dist/tools/members.js.map +1 -1
  82. package/dist/tools/observability.d.ts +2 -0
  83. package/dist/tools/observability.d.ts.map +1 -1
  84. package/dist/tools/observability.js +77 -0
  85. package/dist/tools/observability.js.map +1 -1
  86. package/dist/tools/questionnaires.d.ts +2 -0
  87. package/dist/tools/questionnaires.d.ts.map +1 -1
  88. package/dist/tools/questionnaires.js +171 -0
  89. package/dist/tools/questionnaires.js.map +1 -1
  90. package/dist/tools/registered.d.ts +5 -0
  91. package/dist/tools/registered.d.ts.map +1 -0
  92. package/dist/tools/registered.js +30 -0
  93. package/dist/tools/registered.js.map +1 -0
  94. package/dist/tools/registry.d.ts +47 -0
  95. package/dist/tools/registry.d.ts.map +1 -0
  96. package/dist/tools/registry.js +40 -0
  97. package/dist/tools/registry.js.map +1 -0
  98. package/dist/tools/reports.d.ts +2 -0
  99. package/dist/tools/reports.d.ts.map +1 -1
  100. package/dist/tools/reports.js +65 -0
  101. package/dist/tools/reports.js.map +1 -1
  102. package/dist/tools/search.d.ts +2 -0
  103. package/dist/tools/search.d.ts.map +1 -1
  104. package/dist/tools/search.js +133 -3
  105. package/dist/tools/search.js.map +1 -1
  106. package/dist/tools/sessions.d.ts +3 -0
  107. package/dist/tools/sessions.d.ts.map +1 -1
  108. package/dist/tools/sessions.js +715 -8
  109. package/dist/tools/sessions.js.map +1 -1
  110. package/dist/tools/settings.d.ts +19 -0
  111. package/dist/tools/settings.d.ts.map +1 -1
  112. package/dist/tools/settings.js +93 -5
  113. package/dist/tools/settings.js.map +1 -1
  114. package/dist/tools/shared-schema.d.ts +27 -0
  115. package/dist/tools/shared-schema.d.ts.map +1 -0
  116. package/dist/tools/shared-schema.js +68 -0
  117. package/dist/tools/shared-schema.js.map +1 -0
  118. package/dist/tools/standalone.d.ts +6 -0
  119. package/dist/tools/standalone.d.ts.map +1 -1
  120. package/dist/tools/standalone.js +366 -0
  121. package/dist/tools/standalone.js.map +1 -1
  122. package/dist/tools/transactions.d.ts +3 -0
  123. package/dist/tools/transactions.d.ts.map +1 -1
  124. package/dist/tools/transactions.js +512 -0
  125. package/dist/tools/transactions.js.map +1 -1
  126. package/dist/tools/users.d.ts +2 -0
  127. package/dist/tools/users.d.ts.map +1 -1
  128. package/dist/tools/users.js +137 -0
  129. package/dist/tools/users.js.map +1 -1
  130. package/dist/tools/webhooks.d.ts +2 -0
  131. package/dist/tools/webhooks.d.ts.map +1 -1
  132. package/dist/tools/webhooks.js +98 -0
  133. package/dist/tools/webhooks.js.map +1 -1
  134. package/dist/tools/workflow-graph.d.ts +1 -0
  135. package/dist/tools/workflow-graph.d.ts.map +1 -1
  136. package/dist/tools/workflow-graph.js +107 -39
  137. package/dist/tools/workflow-graph.js.map +1 -1
  138. package/dist/tools/workflows.d.ts +3 -0
  139. package/dist/tools/workflows.d.ts.map +1 -0
  140. package/dist/tools/workflows.js +440 -0
  141. package/dist/tools/workflows.js.map +1 -0
  142. package/package.json +1 -1
@@ -21,6 +21,7 @@ exports.missingPermissionError = missingPermissionError;
21
21
  const security_1 = require("./security");
22
22
  const internal_tools_1 = require("./internal-tools");
23
23
  const investigator_1 = require("./tools/investigator");
24
+ const registered_1 = require("./tools/registered");
24
25
  /** Only the backend's permission strings count; `scopes` also carries OAuth scopes and
25
26
  * claims, and a token with none of the former (stdio env token) is not a role we can judge. */
26
27
  const PERMISSION_RE = /^(read|write|delete|list|create|approve):[a-z-]+$/;
@@ -39,173 +40,22 @@ exports.TOOL_PERMISSIONS = {
39
40
  didit_org_list: null, // GET auth /organizations/me/ — membership-scoped
40
41
  didit_org_list_applications: null, // GET auth /organizations/me/{org}/applications/ — hardcoded owner/admin check, no decorator
41
42
  didit_org_reveal_application_api_key: null, // same endpoint as didit_org_get_application
42
- didit_org_invite_member: "write:members", // POST auth /organizations/{org}/members/invite/ → member.py:394
43
- didit_org_create_api_key: "write:api-keys", // POST auth /organizations/{org}/applications/{app}/api-keys/ → application_api_keys.py (agent rules: services/agent_api_keys.py)
44
- didit_org_list_api_keys: "read:applications", // GET auth /organizations/{org}/applications/{app}/api-keys/ → application_api_keys.py:24
45
- didit_org_list_members: "list:members", // GET auth /organizations/{org}/members/ → member.py:141
46
- didit_org_list_roles: "list:roles", // GET auth /organizations/{org}/roles/ → roles.py:55
47
- didit_org_remove_member: "delete:members", // DELETE auth /organizations/{org}/members/{id}/ → member.py:109
48
- didit_org_update_member: "write:members", // PATCH auth /organizations/{org}/members/{id}/ → member.py:76
49
43
  // ── Billing ──
50
44
  didit_org_get_balance: "read:subscription", // GET /organization/{org}/top-up/ → stripe.py:498
51
45
  didit_org_top_up: "write:subscription", // checkout: GET /organization/{org}/checkout-session/ → stripe.py CreateCheckoutSessionView; saved_card: POST /organization/{org}/billing/agent-top-ups/ (or POST /v3/billing/top-up/ with an API key), both write:subscription
52
- didit_billing_get_plan: "read:subscription", // GET /organization/{org}/billing/plans/ → billing/views.py PlanBillingView
53
- didit_billing_quote_plan: "read:subscription", // GET …/billing/plans/quote/ → PlanQuoteView
54
- didit_billing_list_payment_methods: "read:subscription", // GET …/billing/payment-methods/ → PaymentMethodsView
55
- didit_billing_list_receipts: "read:subscription", // GET …/billing/receipts/ → ReceiptsView
56
- didit_billing_get_details: "read:subscription", // GET …/billing/details/ → BillingDetailsView
57
- didit_billing_update_details: "write:subscription", // PUT …/billing/details/ → BillingDetailsView (+ step-up)
58
46
  // ── Alerts, analytics, audit ──
59
- didit_alert_configure: "write:applications", // PATCH …/alerts/{type}/ → alerts.py:42
60
- didit_alert_list: "read:applications", // GET …/alerts/ → alerts.py:62
61
47
  didit_analytics: "read:analytics", // GET …/analytics/ → analytics.py:196
62
- didit_audit_log_list: "read:audit-logs", // GET /audit/{org}/audit-logs/ → audit/views/audit_log.py:292
63
- // ── Blocklist / allowlist ──
64
- didit_allowlist_add: "write:blocklist", // POST …/allowlist/add/ → allowlist.py:33
65
- didit_blocklist_add: "write:blocklist", // POST …/blocklist/add/ → blocklist.py:47
66
- didit_blocklist_get: "read:blocklist", // GET …/blocklist/ → blocklist.py:178
67
- didit_blocklist_remove: "write:blocklist", // POST …/blocklist/remove/ → blocklist.py:76
68
- // ── Branding ──
69
- didit_branding_get: "read:customization", // GET …/white-label-customization/ → white_label_customization.py:66
70
- didit_branding_update: "write:customization", // PATCH …/white-label-customization/ → white_label_customization.py:73
71
- // ── Cases ──
72
- didit_case_create: "write:cases", // POST …/cases/ → case_management.py:292
73
- didit_case_get: "read:cases", // GET …/cases/{id}/ → case_management.py:353
74
- didit_case_list: "list:cases", // GET …/cases/ → case_management.py:264
75
- didit_case_manage: "write:cases", // POST …/cases/{id}/{resolve|assign|reopen|escalate}/, PATCH …/cases/{id}/ → case_management.py
76
- didit_case_search: "list:cases", // GET /organization/{org}/cases/ → case_management.py:264
77
- didit_case_statistics: "list:cases", // GET …/cases/statistics/ → case_management.py:910
78
- // ── Lists ──
79
- didit_lists_create: "create:lists", // POST …/lists/ → lists.py:69
80
- didit_lists_delete: "delete:lists", // DELETE …/lists/{uuid}/ → lists.py:122
81
- didit_lists_entries_list: "read:lists", // GET …/lists/{uuid}/entries/ → lists.py:153
82
- didit_lists_entry_create: "create:lists", // POST …/lists/{uuid}/entries/ → lists.py:197
83
- didit_lists_entry_delete: "delete:lists", // DELETE …/lists/{uuid}/entries/{entry}/ → lists.py:233
84
- didit_lists_entry_upload_face: "create:lists", // POST …/lists/{uuid}/entries/face-upload/ → list_face_upload.py:126
85
- didit_lists_get: "read:lists", // GET …/lists/{uuid}/ → lists.py:110
86
- didit_lists_list: "read:lists", // GET …/lists/ → lists.py:40
87
- didit_lists_update: "write:lists", // PATCH …/lists/{uuid}/ → lists.py:114
88
- // ── Questionnaires (delete reuses write) ──
89
- didit_questionnaire_append_choices: "write:questionnaires", // PATCH …/questionnaires/{uuid}/ → questionnaire.py:208
90
- didit_questionnaire_create: "write:questionnaires", // POST …/questionnaires/ → questionnaire.py:149
91
- didit_questionnaire_delete: "write:questionnaires", // DELETE …/questionnaires/{uuid}/ → questionnaire.py:227
92
- didit_questionnaire_get: "read:questionnaires", // GET …/questionnaires/{uuid}/ → questionnaire.py:204
93
- didit_questionnaire_list: "read:questionnaires", // GET …/questionnaires/ → questionnaire.py:96
94
- didit_questionnaire_update: "write:questionnaires", // PATCH …/questionnaires/{uuid}/ → questionnaire.py:208
95
- // ── Reports (row-level access, @has_privileges([]) or per-kind) ──
96
- didit_report_export: null, // POST …/reports/{kind}/ — permission varies by kind (read:sessions|transactions|businesses|users)
97
- didit_report_get: null, // GET …/reports/{id}/ → reports.py:129, @has_privileges([]) + row-level check
98
- didit_report_get_download_url: null, // GET …/reports/{id}/download-url/ → reports.py:153, same
99
- didit_report_list: null, // GET …/reports/ → reports.py:100, same
100
- // ── Sessions ──
101
- didit_session_add_review: "write:sessions", // POST …/sessions/{id}/reviews/ → activity.py:97
102
- didit_session_batch_delete: "delete:sessions", // DELETE …/sessions/delete/ → application.py:529
103
- didit_session_create: null, // POST /session/ → session.py:152 — permission classes only, no decorator
104
- didit_session_create_import: null, // POST /session/imports/ → imports.py:77 — no decorator
105
- didit_session_delete: "delete:sessions", // DELETE /session/{id}/delete/ → session.py:1406
106
- didit_session_generate_pdf: "read:sessions", // GET /session/{id}/generate-pdf/ → pdf.py:86
107
- didit_session_get_signature_evidence: "read:sessions", // GET /session/{id}/signatures/{node}/evidence/ → signatures/downloads.py:78
108
- didit_session_get_signature_field_image: "read:sessions", // GET …/signatures/{node}/fields/{field}/image/ → same view
109
- didit_session_get_signed_document: "read:sessions", // GET …/signatures/{node}/documents/{doc}/file/ → same view
110
- didit_session_validate_signatures: "write:sessions", // POST …/signatures/{node}/validate/ → signatures/downloads.py:99
111
- didit_session_list_import_providers: null, // GET /session/imports/providers/ → import_jobs.py:99 — no decorator
112
- didit_session_check_import_provider: null, // POST /session/imports/providers/check/ → import_jobs.py:120 — no decorator
113
- didit_session_manage_import: null, // POST /session/imports/{id}/{start|pause|resume|cancel|retry}/ → import_jobs.py — no decorator
114
- didit_session_get_decision: "read:sessions", // GET /session/{id}/decision/ → session.py:536
115
- didit_session_get_location_evidence: "read:sessions", // GET /geolocation/sessions/{id}/evidence/ → geolocation/views/console.py:53
116
- didit_session_get_import: null, // GET /session/imports/{id}/ → imports.py:170 — no decorator
117
- didit_session_get_import_errors: null, // GET /session/imports/{id}/errors/ → imports.py:182 — no decorator
118
- didit_session_get_import_template: null, // GET /session/imports/template/ → imports.py:197 — no decorator
119
- didit_session_import_shared: null, // POST /session/import-shared/ → shared_session.py:78 — no decorator
120
- didit_session_list: "list:sessions", // GET …/sessions/ → application.py:123
121
- didit_session_list_reviews: "read:sessions", // GET …/sessions/{id}/reviews/ → activity.py:77
122
- didit_session_search: "list:sessions", // GET /organization/{org}/sessions/ → application.py:448
123
- didit_session_share: "write:sessions", // POST /session/{id}/share/ → shared_session.py:44
124
- didit_session_update_data: "write:sessions", // PATCH /session/{id}/update-data/ → session.py:1238
125
- didit_session_update_poa_data: "write:sessions", // PATCH /session/{id}/update-poa-data/ → session.py:1461
126
- didit_session_simulate: "write:sessions", // POST /session/{id}/simulate/ → sandbox simulate (sandbox sessions only)
127
- didit_session_update_status: "write:sessions", // PATCH /session/{id}/update-status/ → session.py:1033
128
- didit_session_explain_decision: "read:sessions", // GET /session/{id}/decision/ folded into its trace
129
- didit_session_webhooks: "read:sessions", // GET /session/{id}/webhooks/ → webhooks.py:38
130
- didit_session_webhook_resend: "create:sessions", // POST /session/{id}/webhook/{uuid}/resend → webhooks.py:109
131
- // ── Transactions (reads are gated by list:transactions) ──
132
- didit_transaction_create: "create:transactions", // POST …/transactions/ → transactions.py:331
133
- didit_transaction_get: "list:transactions", // GET …/transactions/{id}/ → transactions.py:479
134
- didit_transaction_list: "list:transactions", // GET …/transactions/ → transactions.py:278
135
- didit_transaction_rule_backtest: "list:transactions", // POST …/transactions/rules/backtest/ → transactions.py:816
136
- didit_transaction_rule_create: "write:transactions", // POST …/transactions/rules/ → transactions.py:766
137
- didit_transaction_rule_delete: "write:transactions", // DELETE …/transactions/rules/{uuid}/ → transactions.py:801
138
- didit_transaction_rule_get: "list:transactions", // GET …/transactions/rules/{uuid}/ → transactions.py:785
139
- didit_transaction_rule_install: "write:transactions", // POST …/transactions/rules/install/ → transactions.py:914
140
- didit_transaction_rule_library_list: "list:transactions", // GET …/transactions/rules/library/ → transactions.py:895
141
- didit_transaction_rule_list: "list:transactions", // GET …/transactions/rules/ → transactions.py:754
142
- didit_transaction_rule_uninstall: "write:transactions", // DELETE …/transactions/rules/install/ → transactions.py:926
143
- didit_transaction_rule_update: "write:transactions", // PATCH …/transactions/rules/{uuid}/ → transactions.py:790
144
- didit_transaction_screen_wallet: "create:transactions", // POST …/transactions/screen-wallet/ → transactions.py:371
145
- didit_transaction_search: "list:transactions", // GET /organization/{org}/transactions/ → transactions.py:278
146
- // ── Vendor businesses (KYB) ──
147
- didit_vendor_business_create: "create:businesses", // POST …/vendor-businesses/ → vendor_business.py:154
148
- didit_vendor_business_delete: "delete:businesses", // DELETE …/vendor-businesses/delete/ → vendor_business.py:935
149
- didit_vendor_business_get: "read:businesses", // GET …/vendor-businesses/{vendor_data}/ → vendor_business.py:197
150
- didit_vendor_business_list: "list:businesses", // GET …/vendor-businesses/ → vendor_business.py:150
151
- didit_vendor_business_search: "list:businesses", // per-app fan-out over the list endpoint
152
- didit_vendor_business_update: null, // PATCH …/vendor-businesses/{vendor_data}/update/ — route does not exist as coded (only by-id/)
153
- didit_vendor_business_update_status: "write:businesses", // POST …/vendor-businesses/bulk-status/ → vendor_business.py:965
154
- // ── Vendor users ──
155
- didit_vendor_user_create: "create:users", // POST …/vendor-users/ → vendor_user.py:330
156
- didit_vendor_user_delete: "delete:users", // DELETE …/vendor-users/delete/ → vendor_user.py:1139
157
- didit_vendor_user_get: "read:users", // GET …/vendor-users/{vendor_data}/ → vendor_user.py:763
158
- didit_vendor_user_list: "list:users", // GET …/vendor-users/ → vendor_user.py:283
159
- didit_vendor_user_search: "list:users", // per-app fan-out over the list endpoint
160
- didit_vendor_user_update: "write:users", // PATCH …/vendor-users/{vendor_data}/update/ → vendor_user.py:1098
161
- didit_vendor_user_update_status: "write:users", // POST …/vendor-users/bulk-status/ → vendor_user.py:1169
162
48
  // ── Standalone verification APIs (proxy.py:36 gates every …/apis/* POST on create:sessions) ──
163
49
  // The phone OTP pair does not go through that proxy (it registers no phone/send or
164
50
  // phone/check route): it calls the public APIs with the application api-key, which the
165
51
  // console application read only shows to a role holding create:sessions (app-api-key.ts).
166
- didit_verify_age: "create:sessions",
167
- didit_verify_aml: "create:sessions",
168
- didit_verify_account_check: "create:sessions", // POST /bank/account-check/ (api-key) after the same application read as the phone pair
169
- didit_verify_database: "create:sessions",
170
- didit_verify_email_check: null, // …/apis/email/check/ — route does not exist as coded (only /apis/email-risk/)
171
- didit_verify_email_send: null, // …/apis/email/send/ — route does not exist as coded
172
- didit_verify_face_match: "create:sessions",
173
- didit_verify_face_search: "create:sessions",
174
- didit_verify_id: "create:sessions",
175
- didit_verify_kyb_search: "create:sessions",
176
- didit_verify_kyb_select: "create:sessions",
177
- didit_verify_passive_liveness: "create:sessions",
178
- didit_verify_phone_check: "create:sessions", // POST /phone/check/ (api-key) after GET auth /organizations/{org}/applications/{app} → serializers/applications.py:100 blanks the key without it
179
- didit_verify_phone_send: "create:sessions", // POST /phone/send/ (api-key) after the same application read
180
- didit_verify_poa: "create:sessions",
181
- // ── Webhooks (delete reuses write) ──
182
- didit_webhook_create: "write:webhooks", // POST …/webhook/destinations/ → webhook_destinations.py:112
183
- didit_webhook_delete: "write:webhooks", // DELETE …/webhook/destinations/{uuid}/ → webhook_destinations.py:181
184
- didit_webhook_get: "read:webhooks", // GET …/webhook/destinations/{uuid}/ → webhook_destinations.py:151
185
- didit_webhook_list: "read:webhooks", // GET …/webhook/destinations/ → webhook_destinations.py:106
186
- didit_webhook_update: "write:webhooks", // PATCH …/webhook/destinations/{uuid}/ → webhook_destinations.py:160
187
52
  // ── Workflows (delete reuses write; graph helpers are read-gated POSTs) ──
188
53
  didit_workflow_build_graph: "read:workflows", // POST …/compliance/build-workflow/ → compliance.py:137
189
- didit_workflow_create: "write:workflows", // POST …/verification-settings/ → verification_settings.py:146
190
- didit_workflow_create_draft: "write:workflows", // POST …/verification-settings/{uuid}/create-draft/ → verification_settings.py:328
191
- didit_workflow_delete: "write:workflows", // DELETE …/verification-settings/{uuid}/ → verification_settings.py:224
192
- didit_workflow_edit_graph: "write:workflows", // PUT …/verification-settings/{uuid}/workflow-graph/ → workflow_graph.py:63
193
- didit_workflow_get: "read:workflows", // GET …/verification-settings/{uuid}/ → verification_settings.py:214
194
- didit_workflow_get_branch_fields: "read:workflows", // POST …/workflow-graph/branch-fields/ → workflow_graph.py:202
195
- didit_workflow_get_feature_config_schema: null, // no backend call — bundled artifact
196
- didit_workflow_get_field_definitions: "read:workflows", // GET …/workflow-graph/field-definitions/ → workflow_graph.py:451
197
- didit_workflow_get_id_verification_methods_catalog: "read:workflows", // GET …/workflow-graph/id-verification-methods-catalog/ → workflow_graph.py
198
- didit_workflow_get_kyb_registry_catalog: null, // GET /organization/kyb-registry-pricing/ → application.py KYBRegistryPricingView (anonymous, no privilege)
199
- didit_workflow_get_graph: "read:workflows", // GET …/verification-settings/{uuid}/workflow-graph/ → workflow_graph.py:44
200
- didit_workflow_list: "read:workflows", // GET …/verification-settings/ → verification_settings.py:74
201
- didit_workflow_publish: "write:workflows", // PATCH …/verification-settings/{uuid}/ → verification_settings.py:219
202
- didit_workflow_search: "read:workflows", // per-app fan-out over the list endpoint
203
- didit_workflow_set_graph: "write:workflows", // PUT …/verification-settings/{uuid}/workflow-graph/ → workflow_graph.py:63
204
- didit_workflow_update: "write:workflows", // PATCH …/verification-settings/{uuid}/ → verification_settings.py:219
205
- didit_workflow_validate_graph: "read:workflows", // POST …/workflow-graph/validate/ → workflow_graph.py:142
206
54
  // Internal-only families (compliance, travel rule, marketplace, networks, SDK token): empty in the public build.
207
55
  // ── Investigator (/v3/investigator/*): see tools/investigator.ts ──
208
56
  ...investigator_1.INVESTIGATOR_TOOL_PERMISSIONS,
57
+ // ── Tools declared one object per tool (webhooks, branding, ...): see tools/registered.ts ──
58
+ ...registered_1.REGISTERED_TOOL_PERMISSIONS,
209
59
  ...internal_tools_1.INTERNAL_TOOL_PERMISSIONS,
210
60
  };
211
61
  /**
@@ -1 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,CAAC;AAeF;;;;;;GAMG;AACH,SAAgB,gBAAgB,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAmB;IAC3F,MAAM,QAAQ,GAAG,wBAAgB,CAAC,IAAI,CAAC,CAAC;IACxC,MAAM,SAAS,GAAG,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,SAAS,IAAI,SAAS,KAAK,QAAQ,CAAC,CAAC;IAC9E,MAAM,WAAW,GAAG,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;IAEhF,IAAI,IAAI,KAAK,KAAK,IAAI,CAAC,QAAQ,IAAI,CAAC,SAAS,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC,IAAI,WAAW,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC5G,OAAO,OAAO,CAAC;IACjB,CAAC;IAED,OAAO,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,YAAY,CAAC;AACpD,CAAC;AAED,SAAgB,sBAAsB,CAAC,IAAY;IACjD,MAAM,QAAQ,GAAG,wBAAgB,CAAC,IAAI,CAAC,CAAC;IAExC,OAAO,IAAI,qBAAU,CAAC;QACpB,IAAI,EAAE,eAAe;QACrB,OAAO,EAAE,mEAAmE,QAAQ,UAAU,IAAI,YAAY;QAC9G,KAAK,EAAE,YAAY;QACnB,IAAI,EAAE,gDAAgD,QAAQ,6BAA6B;KAC5F,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,45 @@
1
+ /** The version an image tag stands for: `v5.1.54` and `5.1.54` are 5.1.54, a build stamp is itself. */
2
+ export declare function versionFromImage(image: unknown): string | undefined;
3
+ /** How the task metadata is read. Every field has a default; tests pass their own. */
4
+ export interface ReleaseLookup {
5
+ /** Reads before giving up. On 12 November 2026 production tasks that autoscaling started answered
6
+ * "5.1.1" while the deployed ones answered "5.1.57": one read at start is not enough. */
7
+ attempts?: number;
8
+ /** The wait before the second read, doubled before each read after it. */
9
+ delayMs?: number;
10
+ /** The longest a single wait may be; a late lookup keeps its reads minutes apart instead of hours. */
11
+ maxDelayMs?: number;
12
+ sleep?: (ms: number) => Promise<void>;
13
+ /** Told why the release could not be named, once, when the lookup gives up on ECS. */
14
+ onGiveUp?: (reason: string) => void;
15
+ }
16
+ /**
17
+ * The version of the release this process runs, or undefined when nothing names it (then the
18
+ * caller keeps the package version).
19
+ *
20
+ * `MCP_SERVER_VERSION` is for a host that is not ECS and knows what it deployed. On ECS a read
21
+ * that fails, or that names no image yet, is tried again; an image whose tag names no release is an
22
+ * answer, not a failure. Never throws.
23
+ */
24
+ export declare function resolveReleaseVersion(env?: Record<string, string | undefined>, fetchImpl?: typeof fetch, { attempts, delayMs, maxDelayMs, sleep, onGiveUp }?: ReleaseLookup): Promise<string | undefined>;
25
+ /**
26
+ * The schedule behind the startup read: `/healthz` and the MCP handshake must answer immediately, so
27
+ * the first read is one attempt with no wait, and this one runs in the background after it failed.
28
+ *
29
+ * It reads for MINUTES, not seconds. On 13 November 2026 production was on v5.1.58 - the deployment
30
+ * record says so, and the reporting customer's browser read "5.1.58" from the host - while `/healthz`
31
+ * answered "5.1.1", the package placeholder, to every sample taken hours later. Two explanations fit:
32
+ * a task that the autoscaler starts under load cannot read its metadata endpoint during its first
33
+ * seconds and then keeps the placeholder for life, or the read fails on that task for good. Only the
34
+ * first is a hypothesis here, not a finding: #274 already retried for fifteen seconds before this and
35
+ * the mixed answers persisted. Minutes of reads cost nothing and cover a slow start; they cannot help
36
+ * a read that never succeeds. Which one it is shows in the line the lookup already writes when it
37
+ * gives up - "Release version unknown: ...", live since the 2026-11-13T06:45Z rollout. A task that
38
+ * logged it never named its release, and every later `/healthz` from that task is the placeholder.
39
+ */
40
+ export declare const LATE_RELEASE_LOOKUP: {
41
+ readonly attempts: 40;
42
+ readonly delayMs: 1000;
43
+ readonly maxDelayMs: 15000;
44
+ };
45
+ //# sourceMappingURL=release-version.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"release-version.d.ts","sourceRoot":"","sources":["../src/release-version.ts"],"names":[],"mappings":"AAWA,uGAAuG;AACvG,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAUnE;AAED,sFAAsF;AACtF,MAAM,WAAW,aAAa;IAC5B;8FAC0F;IAC1F,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,0EAA0E;IAC1E,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,sGAAsG;IACtG,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACtC,sFAAsF;IACtF,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;CACrC;AAMD;;;;;;;GAOG;AACH,wBAAsB,qBAAqB,CACzC,GAAG,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAe,EACrD,SAAS,GAAE,OAAO,KAAa,EAC/B,EAAE,QAAY,EAAE,OAAc,EAAE,UAAqB,EAAE,KAAY,EAAE,QAAQ,EAAE,GAAE,aAAkB,GAClG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CA4B7B;AAED;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,mBAAmB;;;;CAA+D,CAAC"}
@@ -0,0 +1,90 @@
1
+ "use strict";
2
+ // Which release this process is.
3
+ //
4
+ // `package.json` says 5.1.1 on every release: a release is a git tag, and nothing writes the tag
5
+ // back into the file. So a v5.1.54 server answered "version":"5.1.1" on /healthz and in the
6
+ // MCP handshake, and the only way to tell which build was live was to probe for a feature.
7
+ //
8
+ // The deploy does name the release: the image is tagged with the git tag (v5.1.54), or with the
9
+ // build time on a branch deploy (2026.11.11.225733). A container reads its own image name from
10
+ // the ECS task metadata endpoint, a local address ECS gives every task, so the version needs
11
+ // nothing from the build or the deploy.
12
+ Object.defineProperty(exports, "__esModule", { value: true });
13
+ exports.LATE_RELEASE_LOOKUP = void 0;
14
+ exports.versionFromImage = versionFromImage;
15
+ exports.resolveReleaseVersion = resolveReleaseVersion;
16
+ /** The version an image tag stands for: `v5.1.54` and `5.1.54` are 5.1.54, a build stamp is itself. */
17
+ function versionFromImage(image) {
18
+ if (typeof image !== "string")
19
+ return undefined;
20
+ // `registry:5000/repo:tag` has a colon in the registry too, and a digest (`repo@sha256:...`)
21
+ // names no version: only what follows the last `/` can carry the tag.
22
+ const name = image.slice(image.lastIndexOf("/") + 1);
23
+ if (name.includes("@"))
24
+ return undefined;
25
+ const tag = name.includes(":") ? name.slice(name.lastIndexOf(":") + 1) : "";
26
+ const match = /^v?(\d+(?:\.\d+){1,3})$/.exec(tag);
27
+ return match ? match[1] : undefined;
28
+ }
29
+ // Referenced: the wait is part of the lookup a caller awaits, and an unreferenced timer would let the
30
+ // process end before the next read. A caller that runs the lookup in the background says so (`void`).
31
+ const wait = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
32
+ /**
33
+ * The version of the release this process runs, or undefined when nothing names it (then the
34
+ * caller keeps the package version).
35
+ *
36
+ * `MCP_SERVER_VERSION` is for a host that is not ECS and knows what it deployed. On ECS a read
37
+ * that fails, or that names no image yet, is tried again; an image whose tag names no release is an
38
+ * answer, not a failure. Never throws.
39
+ */
40
+ async function resolveReleaseVersion(env = process.env, fetchImpl = fetch, { attempts = 5, delayMs = 1000, maxDelayMs = Infinity, sleep = wait, onGiveUp } = {}) {
41
+ const stated = env.MCP_SERVER_VERSION?.trim();
42
+ if (stated)
43
+ return stated.replace(/^v(?=\d)/, "");
44
+ const metadata = env.ECS_CONTAINER_METADATA_URI_V4;
45
+ if (!metadata)
46
+ return undefined;
47
+ let reason = "";
48
+ for (let attempt = 1; attempt <= attempts; attempt++) {
49
+ if (attempt > 1)
50
+ await sleep(Math.min(delayMs * 2 ** (attempt - 2), maxDelayMs));
51
+ try {
52
+ const response = await fetchImpl(metadata, { signal: AbortSignal.timeout(1500) });
53
+ if (!response.ok) {
54
+ reason = `the task metadata answered HTTP ${response.status}`;
55
+ continue;
56
+ }
57
+ const image = (await response.json())?.Image;
58
+ if (typeof image !== "string" || !image) {
59
+ reason = "the task metadata named no image";
60
+ continue;
61
+ }
62
+ const version = versionFromImage(image);
63
+ if (!version)
64
+ onGiveUp?.(`the image tag names no release (${image.slice(image.lastIndexOf("/") + 1)})`);
65
+ return version;
66
+ }
67
+ catch (error) {
68
+ reason = `the task metadata could not be read (${error instanceof Error ? error.message : String(error)})`;
69
+ }
70
+ }
71
+ onGiveUp?.(`${reason}, ${attempts} ${attempts === 1 ? "read" : "reads"}`);
72
+ return undefined;
73
+ }
74
+ /**
75
+ * The schedule behind the startup read: `/healthz` and the MCP handshake must answer immediately, so
76
+ * the first read is one attempt with no wait, and this one runs in the background after it failed.
77
+ *
78
+ * It reads for MINUTES, not seconds. On 13 November 2026 production was on v5.1.58 - the deployment
79
+ * record says so, and the reporting customer's browser read "5.1.58" from the host - while `/healthz`
80
+ * answered "5.1.1", the package placeholder, to every sample taken hours later. Two explanations fit:
81
+ * a task that the autoscaler starts under load cannot read its metadata endpoint during its first
82
+ * seconds and then keeps the placeholder for life, or the read fails on that task for good. Only the
83
+ * first is a hypothesis here, not a finding: #274 already retried for fifteen seconds before this and
84
+ * the mixed answers persisted. Minutes of reads cost nothing and cover a slow start; they cannot help
85
+ * a read that never succeeds. Which one it is shows in the line the lookup already writes when it
86
+ * gives up - "Release version unknown: ...", live since the 2026-11-13T06:45Z rollout. A task that
87
+ * logged it never named its release, and every later `/healthz` from that task is the placeholder.
88
+ */
89
+ exports.LATE_RELEASE_LOOKUP = { attempts: 40, delayMs: 1000, maxDelayMs: 15000 };
90
+ //# sourceMappingURL=release-version.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":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C,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,WAAW,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;YACxG,OAAO,OAAO,CAAC;QACjB,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,GAAG,wCAAwC,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC;QAC7G,CAAC;IACH,CAAC;IACD,QAAQ,EAAE,CAAC,GAAG,MAAM,KAAK,QAAQ,IAAI,QAAQ,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;IAC1E,OAAO,SAAS,CAAC;AACnB,CAAC;AAED;;;;;;;;;;;;;;GAcG;AACU,QAAA,mBAAmB,GAAG,EAAE,QAAQ,EAAE,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,KAAM,EAAW,CAAC"}
@@ -1,5 +1,5 @@
1
1
  {
2
- "checksum": "sha256:76c4acb7cff69ae13d13d71e61bb7fa0d6b29f04d834a58558d458cd2806bb02",
2
+ "checksum": "sha256:3df917c2503102db29867d1aabd2f78d78b440163e47b4044fc85aaf0c7de26a",
3
3
  "features": {
4
4
  "AGE_ESTIMATION": {
5
5
  "description": "Configuration for Age Estimation feature.",
@@ -206,7 +206,7 @@
206
206
  "type": "boolean"
207
207
  },
208
208
  "frame_injection_action": {
209
- "description": "Verdict when injected video frames are detected.",
209
+ "description": "Verdict when the camera that captured the selfie shows signs of injected frames (FRAME_INJECTION_SUSPECTED, and INJECTION_ATTACK_DETECTED when the injection is proven). Defaults to NO_ACTION.",
210
210
  "enum": [
211
211
  "NO_ACTION",
212
212
  "REVIEW",
@@ -1912,6 +1912,17 @@
1912
1912
  "required": false,
1913
1913
  "type": "string"
1914
1914
  },
1915
+ "face_match_frame_injection_action": {
1916
+ "description": "Verdict when the camera that captured this step's selfie shows signs of injected frames (FRAME_INJECTION_SUSPECTED, and INJECTION_ATTACK_DETECTED when the injection is proven). It applies when the Face Match step captures the selfie itself; a selfie taken by a Liveness step follows that step's frame_injection_action. Defaults to NO_ACTION.",
1917
+ "enum": [
1918
+ "DECLINE",
1919
+ "REVIEW",
1920
+ "NO_ACTION"
1921
+ ],
1922
+ "nullable": true,
1923
+ "required": false,
1924
+ "type": "string"
1925
+ },
1915
1926
  "face_match_max_attempts": {
1916
1927
  "maximum": 3,
1917
1928
  "minimum": 1,
@@ -3034,6 +3045,12 @@
3034
3045
  "required": false,
3035
3046
  "type": "uuid"
3036
3047
  },
3048
+ "kyb_key_people_allow_listed_company_declaration": {
3049
+ "description": "Let the company declare it is listed on a stock exchange, or owned by a listed company, instead of naming a beneficial owner. It must still name at least one director or other senior managing official. Off by default: without it a beneficial owner is required.",
3050
+ "nullable": true,
3051
+ "required": false,
3052
+ "type": "boolean"
3053
+ },
3037
3054
  "kyb_key_people_company_fields": {
3038
3055
  "description": "Which company details are collected for a CORPORATE key person. Same list-of-descriptors shape and same rules as `kyb_key_people_person_fields`.",
3039
3056
  "example": [
@@ -3061,6 +3078,17 @@
3061
3078
  "required": false,
3062
3079
  "type": "string"
3063
3080
  },
3081
+ "kyb_key_people_listed_company_action": {
3082
+ "description": "Verdict when the company makes the listed-company declaration (`KYB_LISTED_COMPANY_DECLARED`). REVIEW (the default) sends the session to an analyst to confirm the listing, NO_ACTION leaves the Key People outcome unchanged, DECLINE declines it. Only applies while `kyb_key_people_allow_listed_company_declaration` is on.",
3083
+ "enum": [
3084
+ "DECLINE",
3085
+ "REVIEW",
3086
+ "NO_ACTION"
3087
+ ],
3088
+ "nullable": true,
3089
+ "required": false,
3090
+ "type": "string"
3091
+ },
3064
3092
  "kyb_key_people_ownership_required": {
3065
3093
  "nullable": true,
3066
3094
  "required": false,
@@ -3610,7 +3638,7 @@
3610
3638
  "type": "boolean"
3611
3639
  },
3612
3640
  "frame_injection_action": {
3613
- "description": "Verdict when injected video frames are detected.",
3641
+ "description": "Verdict when the camera that captured the selfie shows signs of injected frames (FRAME_INJECTION_SUSPECTED, and INJECTION_ATTACK_DETECTED when the injection is proven). Defaults to NO_ACTION.",
3614
3642
  "enum": [
3615
3643
  "NO_ACTION",
3616
3644
  "REVIEW",
@@ -4150,8 +4178,19 @@
4150
4178
  "required": false,
4151
4179
  "type": "integer"
4152
4180
  },
4181
+ "id_verification_frame_injection_action": {
4182
+ "description": "Verdict when the camera that captured the document (or the ID-lookup selfie) shows signs of injected frames (FRAME_INJECTION_SUSPECTED). It covers every capture-integrity signal the client reports, including ones a genuine person can produce (a camera the browser does not list, replaced capture functions, an emulator, an external camera), so it defaults to NO_ACTION and the risk is logged as information. Set DECLINE or REVIEW to act on any sign of injection; the proven cases keep id_verification_injection_attack_action.",
4183
+ "enum": [
4184
+ "DECLINE",
4185
+ "REVIEW",
4186
+ "NO_ACTION"
4187
+ ],
4188
+ "nullable": true,
4189
+ "required": false,
4190
+ "type": "string"
4191
+ },
4153
4192
  "id_verification_injection_attack_action": {
4154
- "description": "Verdict when the document (or the ID-lookup selfie) was injected rather than captured by the device's own camera (INJECTION_ATTACK_DETECTED): a software virtual camera, a camera feed generated by the page or by browser automation, a hooked camera, or an instrumentation tool attached to the app. Defaults to DECLINE: each of these proves the frames did not come from the device's own camera. Heuristic capture signals (FRAME_INJECTION_SUSPECTED and the others) are not covered and stay information.",
4193
+ "description": "Verdict when the document (or the ID-lookup selfie) was injected rather than captured by the device's own camera (INJECTION_ATTACK_DETECTED): a software virtual camera, a camera feed generated by the page or by browser automation, a hooked camera, or an instrumentation tool attached to the app. Defaults to DECLINE: each of these proves the frames did not come from the device's own camera. Heuristic capture signals (FRAME_INJECTION_SUSPECTED and the others) are not covered here: id_verification_frame_injection_action decides those.",
4155
4194
  "enum": [
4156
4195
  "DECLINE",
4157
4196
  "REVIEW",
@@ -1 +1 @@
1
- {"version":3,"file":"security.d.ts","sourceRoot":"","sources":["../src/security.ts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AKzD;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,GAAG,GAAG,GAAG,CAmB/C;AAED,0DAA0D;AAC1D,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,GAAG,GAAG,GAAG,CAUvD;AAED,kEAAkE;AAClE,wBAAgB,YAAY,CAAC,GAAG,EAAE,GAAG,GAAG,GAAG,CAW1C;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,GAAG,GAAG,GAAG,CAMhF"}
package/dist/security.js CHANGED
@@ -630,9 +630,9 @@ function statusToCode(status) {
630
630
  function statusToHint(status, body) {
631
631
  switch (status) {
632
632
  case 402:
633
- return "Insufficient balance. Use didit_org_top_up to add credits ($50 to $20,000), then retry.";
633
+ return "Insufficient balance. didit_org_top_up adds credits where this connection lists it; otherwise call didit_org_get_balance and give the person the top-up link in its next_steps ($50 to $20,000). Then retry.";
634
634
  case 404:
635
- return "The referenced id was not found. List the parent collection first (e.g. didit_list_sessions / didit_list_workflows) to get a valid id.";
635
+ return "The referenced id was not found. List the parent collection first (for example didit_session_list or didit_workflow_list) to get a valid id.";
636
636
  case 422:
637
637
  return body && Array.isArray(body.allowed)
638
638
  ? "Invalid enum value — choose one of the values in `allowed`."
@@ -785,8 +785,47 @@ function parseErrorBody(body) {
785
785
  const explicitField = isPlainObject && typeof body.field === "string" && body.field ? body.field : undefined;
786
786
  return { message: drf.message, field: safeFieldName(explicitField) || drf.field, allowed };
787
787
  }
788
+ // 3) A field mapped to a plain STRING: {"workflow_id": "Invalid workflow_id."}.
789
+ if (isPlainObject) {
790
+ const flat = extractFlatFieldError(body);
791
+ if (flat)
792
+ return { ...flat, allowed };
793
+ }
788
794
  return { allowed };
789
795
  }
796
+ /** Keys of an error body that carry no field's message. `raw` is the text of a body that was not JSON. */
797
+ const NOT_A_FIELD_MESSAGE = new Set(["raw", "code", "status", "field", "allowed"]);
798
+ /**
799
+ * A field mapped to a plain string, which a view answers when it raises
800
+ * `ValidationError({"field": "message"})`: DRF keeps the string as it is.
801
+ *
802
+ * extractDrfFieldError accepts a map only when a value is a list or an object, so this shape had
803
+ * no reader: the reason was dropped and the caller was told "Request failed with status 400."
804
+ * Staging, 12 November 2026: session create with a workflow its application does not have
805
+ * answers {"workflow_id": "Invalid workflow_id."}. Production the same week: 8 of 82
806
+ * didit_session_create calls failed bad_request from 4 people, several retried within minutes.
807
+ *
808
+ * Runs after the {detail}/{message}/{error} path, so a body with one of those never reaches it.
809
+ */
810
+ function extractFlatFieldError(body) {
811
+ let firstKey;
812
+ const parts = [];
813
+ let scanned = 0;
814
+ for (const key in body) {
815
+ if (!Object.prototype.hasOwnProperty.call(body, key))
816
+ continue;
817
+ if (scanned++ >= DRF_MAX_PARTS)
818
+ break;
819
+ const value = body[key];
820
+ if (typeof value !== "string" || !value.trim() || NOT_A_FIELD_MESSAGE.has(key))
821
+ continue;
822
+ firstKey ?? (firstKey = key);
823
+ parts.push(`${key}: ${value.trim()}`);
824
+ }
825
+ if (firstKey === undefined)
826
+ return null;
827
+ return { message: parts.join("; ").slice(0, DRF_MAX_MSG), field: safeFieldName(firstKey) };
828
+ }
790
829
  /**
791
830
  * Mask a secret to a short preview that shows it exists without leaking the value.
792
831
  */