@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
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.VENDOR_BUSINESS_TOOLS = void 0;
3
4
  exports.listBusinesses = listBusinesses;
4
5
  exports.createBusiness = createBusiness;
5
6
  exports.getBusiness = getBusiness;
@@ -7,6 +8,9 @@ exports.updateBusiness = updateBusiness;
7
8
  exports.updateBusinessStatus = updateBusinessStatus;
8
9
  exports.deleteBusinesses = deleteBusinesses;
9
10
  const config_1 = require("../config");
11
+ const search_1 = require("./search");
12
+ const shared_schema_1 = require("./shared-schema");
13
+ const orgapp_1 = require("../orgapp");
10
14
  const security_1 = require("../security");
11
15
  // Vendor businesses — the console resource is `vendor-businesses`, org/app-scoped (these are
12
16
  // vendor business ENTITIES, not KYB sessions — KYB sessions are the separate `businesses`/
@@ -54,4 +58,129 @@ async function deleteBusinesses(vendorDataList, diditInternalIdList, deleteAll,
54
58
  },
55
59
  });
56
60
  }
61
+ // ── The vendor business tools (tools/registry.ts) ──────────────────────────────────
62
+ // Each tool declares here what index.ts and permissions.ts used to keep in their name-keyed tables.
63
+ // The definitions are listed where these tools always were, so the tool list does not change.
64
+ exports.VENDOR_BUSINESS_TOOLS = [
65
+ {
66
+ def: {
67
+ name: "didit_vendor_business_list",
68
+ description: "List verified businesses (KYB, grouped by vendor_data) for ONE app; with multiple apps (or no scope) it auto-spans all your apps. For a cross-app lookup prefer didit_vendor_business_search. Supports limit/offset pagination.",
69
+ inputSchema: {
70
+ type: "object",
71
+ properties: {
72
+ ...orgapp_1.ORG_APP_PROPS,
73
+ limit: { type: "string" },
74
+ offset: { type: "string" },
75
+ },
76
+ },
77
+ },
78
+ access: "read",
79
+ permission: "list:businesses", // GET …/vendor-businesses/ → vendor_business.py:150
80
+ run: (args) => listBusinesses(args),
81
+ spanAllApplications: (args) => (0, search_1.searchVendorBusinesses)(args),
82
+ },
83
+ {
84
+ def: {
85
+ name: "didit_vendor_business_create",
86
+ description: "Create a business record manually (KYB).",
87
+ inputSchema: {
88
+ type: "object",
89
+ properties: {
90
+ ...orgapp_1.ORG_APP_PROPS,
91
+ vendor_data: { type: "string", description: "Your unique identifier for the business" },
92
+ display_name: { type: "string" },
93
+ legal_name: { type: "string" },
94
+ registration_number: { type: "string" },
95
+ country_code: { type: "string", description: "ISO 3166-1 alpha-2 country code" },
96
+ status: { type: "string", enum: shared_schema_1.ENTITY_STATUSES },
97
+ metadata: { type: "object" },
98
+ },
99
+ },
100
+ },
101
+ access: "write",
102
+ permission: "create:businesses", // POST …/vendor-businesses/ → vendor_business.py:154
103
+ run: (args) => createBusiness(args),
104
+ },
105
+ {
106
+ def: {
107
+ name: "didit_vendor_business_get",
108
+ description: "Get details of a specific business by its vendor_data identifier.",
109
+ inputSchema: {
110
+ type: "object",
111
+ properties: {
112
+ ...orgapp_1.ORG_APP_PROPS,
113
+ vendor_data: { type: "string", description: "The vendor_data value that identifies the business" },
114
+ },
115
+ required: ["vendor_data"],
116
+ },
117
+ },
118
+ access: "read",
119
+ permission: "read:businesses", // GET …/vendor-businesses/{vendor_data}/ → vendor_business.py:197
120
+ run: (args) => getBusiness(args.vendor_data),
121
+ },
122
+ {
123
+ def: {
124
+ name: "didit_vendor_business_update",
125
+ description: "Update a business's profile fields. Only send the fields you want to change.",
126
+ inputSchema: {
127
+ type: "object",
128
+ properties: {
129
+ ...orgapp_1.ORG_APP_PROPS,
130
+ vendor_data: { type: "string" },
131
+ display_name: { type: "string" },
132
+ legal_name: { type: "string" },
133
+ registration_number: { type: "string" },
134
+ country_code: { type: "string", description: "ISO 3166-1 alpha-2 country code" },
135
+ status: { type: "string", enum: shared_schema_1.ENTITY_STATUSES },
136
+ metadata: { type: "object" },
137
+ },
138
+ required: ["vendor_data"],
139
+ },
140
+ },
141
+ access: "write",
142
+ permission: null, // PATCH …/vendor-businesses/{vendor_data}/update/ — route does not exist as coded (only by-id/)
143
+ run: ({ vendor_data, ...data }) => updateBusiness(vendor_data, data),
144
+ },
145
+ {
146
+ def: {
147
+ name: "didit_vendor_business_update_status",
148
+ description: "Set a business's monitoring status (ACTIVE, FLAGGED, or BLOCKED).",
149
+ inputSchema: {
150
+ type: "object",
151
+ properties: {
152
+ ...orgapp_1.ORG_APP_PROPS,
153
+ vendor_data: { type: "string" },
154
+ status: { type: "string", enum: shared_schema_1.ENTITY_STATUSES, description: "New status" },
155
+ },
156
+ required: ["vendor_data", "status"],
157
+ },
158
+ },
159
+ access: "write",
160
+ permission: "write:businesses", // POST …/vendor-businesses/bulk-status/ → vendor_business.py:965
161
+ run: (args) => updateBusinessStatus(args.vendor_data, args.status),
162
+ },
163
+ {
164
+ def: {
165
+ name: "didit_vendor_business_delete",
166
+ description: "Batch delete businesses by vendor_data list and/or didit_internal_id list, or delete all businesses. Deletion is permanent. If the API answers 409 (in_filed_report or subject_deletion_in_progress), nothing is deleted: repeat the request once the other deletion has finished.",
167
+ inputSchema: {
168
+ type: "object",
169
+ properties: {
170
+ ...orgapp_1.ORG_APP_PROPS,
171
+ vendor_data_list: { type: "array", items: { type: "string" } },
172
+ didit_internal_id_list: { type: "array", items: { type: "string" } },
173
+ delete_all: { type: "boolean", description: "Set true to delete ALL businesses" },
174
+ confirm: {
175
+ type: "boolean",
176
+ description: "REQUIRED when delete_all is true - permanently removes EVERY vendor business. Only set after explicit user confirmation of this exact action.",
177
+ },
178
+ },
179
+ },
180
+ },
181
+ access: "destructive",
182
+ permission: "delete:businesses", // DELETE …/vendor-businesses/delete/ → vendor_business.py:935
183
+ run: (args) => deleteBusinesses(args.vendor_data_list, args.didit_internal_id_list, args.delete_all, args.confirm),
184
+ },
185
+ ];
57
186
  //# sourceMappingURL=businesses.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"businesses.js","sourceRoot":"","sources":["../../src/tools/businesses.ts"],"names":[],"mappings":";;AAQA,wCAEC;AAED,wCAEC;AAED,kCAEC;AAED,wCAEC;AAED,oDAKC;AAED,4CA0BC;AAzDD,sCAAmD;AACnD,0CAAoF;AAEpF,6FAA6F;AAC7F,2FAA2F;AAC3F,yFAAyF;AACzF,uFAAuF;AAEhF,KAAK,UAAU,cAAc,CAAC,MAA+B;IAClE,OAAO,IAAA,mBAAU,EAAC,IAAA,mBAAU,EAAC,qBAAqB,CAAC,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;AACnE,CAAC;AAEM,KAAK,UAAU,cAAc,CAAC,IAAyB;IAC5D,OAAO,IAAA,mBAAU,EAAC,IAAA,mBAAU,EAAC,qBAAqB,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;AACvF,CAAC;AAEM,KAAK,UAAU,WAAW,CAAC,UAAkB;IAClD,OAAO,IAAA,mBAAU,EAAC,IAAA,mBAAU,EAAC,sBAAsB,IAAA,sBAAW,EAAC,UAAU,EAAE,aAAa,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;AACnH,CAAC;AAEM,KAAK,UAAU,cAAc,CAAC,UAAkB,EAAE,IAAyB;IAChF,OAAO,IAAA,mBAAU,EAAC,IAAA,mBAAU,EAAC,sBAAsB,IAAA,sBAAW,EAAC,UAAU,EAAE,aAAa,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,UAAU,CAAC,EAAE,E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E,QAAiB;gBACvB,UAAU,EAAE;oBACV,GAAG,sBAAa;oBAChB,gBAAgB,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;oBAC9D,sBAAsB,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;oBACpE,UAAU,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,WAAW,EAAE,mCAAmC,EAAE;oBACjF,OAAO,EAAE;wBACP,IAAI,EAAE,SAAS;wBACf,WAAW,EACT,+IAA+I;qBAClJ;iBACF;aACF;SACF;QACD,MAAM,EAAE,aAAa;QACrB,UAAU,EAAE,mBAAmB,EAAE,8DAA8D;QAC/F,GAAG,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,gBAAgB,CAAC,IAAI,CAAC,gBAAgB,EAAE,IAAI,CAAC,sBAAsB,EAAE,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,OAAO,CAAC;KACnH;CACF,CAAC"}
@@ -1,6 +1,8 @@
1
+ import type { RegisteredTool } from "./registry";
1
2
  export declare function listCases(params?: Record<string, any>): Promise<any>;
2
3
  export declare function getCase(caseId: string): Promise<any>;
3
4
  export declare function createCase(data: Record<string, any>): Promise<any>;
4
5
  export declare function caseStatistics(params?: Record<string, any>): Promise<any>;
5
6
  export declare function manageCase(caseId: string, action: string, data?: Record<string, any>, confirm?: unknown): Promise<any>;
7
+ export declare const CASE_TOOLS: readonly RegisteredTool[];
6
8
  //# sourceMappingURL=cases.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"cases.d.ts","sourceRoot":"","sources":["../../src/tools/cases.ts"],"names":[],"mappings":"AASA,wBAAsB,SAAS,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC,CAE1E;AAED,wBAAsB,OAAO,CAAC,MAAM,EAA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EAAE,SAAS,cAAc,EA+H/C,CAAC"}
@@ -1,11 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CASE_TOOLS = void 0;
3
4
  exports.listCases = listCases;
4
5
  exports.getCase = getCase;
5
6
  exports.createCase = createCase;
6
7
  exports.caseStatistics = caseStatistics;
7
8
  exports.manageCase = manageCase;
8
9
  const config_1 = require("../config");
10
+ const search_1 = require("./search");
11
+ const orgapp_1 = require("../orgapp");
9
12
  const security_1 = require("../security");
10
13
  // Case management — org/app-scoped console resource. Read/create are dedicated tools;
11
14
  // the many per-case actions (assign/resolve/reopen/escalate/comment) fold into one
@@ -72,4 +75,132 @@ async function manageCase(caseId, action, data = {}, confirm) {
72
75
  }
73
76
  return (0, config_1.apiRequest)((0, config_1.orgAppPath)(`/cases/${cid(caseId)}/${(0, security_1.pathSegment)(action, "action")}/`), { method: "POST", json: data });
74
77
  }
78
+ // ── The case tools (tools/registry.ts) ──────────────────────────────────
79
+ // Each tool declares here what index.ts and permissions.ts used to keep in their name-keyed tables.
80
+ // The definitions are listed where these tools always were, so the tool list does not change.
81
+ exports.CASE_TOOLS = [
82
+ {
83
+ def: {
84
+ name: "didit_case_list",
85
+ description: "List investigation/compliance cases for ONE app; with multiple apps (or no scope) it auto-spans all your apps. For a cross-app query prefer didit_case_search.",
86
+ inputSchema: { type: "object", properties: { ...orgapp_1.ORG_APP_PROPS, status: { type: "string" }, cursor: { type: "string" } } },
87
+ },
88
+ access: "read",
89
+ permission: "list:cases", // GET …/cases/ → case_management.py:264
90
+ run: (args) => listCases(args),
91
+ spanAllApplications: (args) => (0, search_1.searchCases)(args),
92
+ },
93
+ {
94
+ def: {
95
+ name: "didit_case_get",
96
+ description: "Get a case with its details.",
97
+ inputSchema: { type: "object", properties: { ...orgapp_1.ORG_APP_PROPS, case_id: { type: "string" } }, required: ["case_id"] },
98
+ },
99
+ access: "read",
100
+ permission: "read:cases", // GET …/cases/{id}/ → case_management.py:353
101
+ run: (args) => getCase(args.case_id),
102
+ },
103
+ {
104
+ def: {
105
+ name: "didit_case_create",
106
+ description: "Open a case for a compliance review. A case is about a subject (one of your users or businesses) or is " +
107
+ "linked to at least one session or transaction: pass `subject`, `links` or both. `subject.uuid` is the " +
108
+ "`didit_internal_id` of the user or the business, as didit_vendor_user_get and didit_vendor_business_get " +
109
+ "return it; it is not their vendor_data. Returns the case with its `uuid`. With review_duplicates true the API first looks " +
110
+ "for cases already open about the same subject and answers 409 case_duplicate_review_required when it finds " +
111
+ "one: show it to the person, and to open a separate case anyway send separate_incident_reason.",
112
+ inputSchema: {
113
+ type: "object",
114
+ properties: {
115
+ ...orgapp_1.ORG_APP_PROPS,
116
+ title: { type: "string", description: "What the case is about, in one line (255 characters at most)." },
117
+ subject: {
118
+ type: "object",
119
+ description: "Who the case is about. Required unless `links` is given.",
120
+ properties: {
121
+ type: { type: "string", enum: ["user", "business"] },
122
+ uuid: { type: "string", description: "The `didit_internal_id` of that user or business." },
123
+ },
124
+ required: ["type", "uuid"],
125
+ },
126
+ links: {
127
+ type: "array",
128
+ description: "What the case is linked to, 20 at most. Required unless `subject` is given.",
129
+ items: {
130
+ type: "object",
131
+ properties: {
132
+ entity_type: { type: "string", enum: ["session", "business_session", "transaction"] },
133
+ entity_uuid: { type: "string", description: "The id of that session or transaction." },
134
+ },
135
+ required: ["entity_type", "entity_uuid"],
136
+ },
137
+ },
138
+ priority: { type: "string", enum: ["LOW", "MEDIUM", "HIGH"], description: "MEDIUM when left out." },
139
+ assigned_to: { type: "string", description: "The reviewer to assign the case to: the `user_id` of a member (didit_org_list_members)." },
140
+ due_at: { type: "string", description: "The deadline, ISO 8601. Left out, the review policy's own deadline applies when it has one." },
141
+ tags: { type: "array", items: { type: "string" }, description: "Labels to find the case by." },
142
+ blueprint: { type: "string", description: "The uuid of the review policy to open the case under. It must be active." },
143
+ review_duplicates: { type: "boolean", description: "Look for cases already open about the same subject before creating this one." },
144
+ separate_incident_reason: { type: "string", description: "Why a separate case is wanted although one is already open (1,000 characters at most)." },
145
+ },
146
+ required: ["title"],
147
+ },
148
+ },
149
+ access: "write",
150
+ permission: "write:cases", // POST …/cases/ → case_management.py:292
151
+ run: (args) => createCase(args),
152
+ },
153
+ {
154
+ def: {
155
+ name: "didit_case_statistics",
156
+ description: "Case analytics for a period (totals, series over time, the queue, outcomes and workload): the last 30 days " +
157
+ "unless both dates are given, two years at most. Every filter narrows the numbers.",
158
+ inputSchema: {
159
+ type: "object",
160
+ properties: {
161
+ ...orgapp_1.ORG_APP_PROPS,
162
+ date_from: { type: "string", description: "First day, YYYY-MM-DD. Give it together with date_to." },
163
+ date_to: { type: "string", description: "Last day, YYYY-MM-DD." },
164
+ status: { type: "string", enum: ["OPEN", "AWAITING_USER", "RESOLVED"] },
165
+ priority: { type: "string", enum: ["LOW", "MEDIUM", "HIGH"] },
166
+ source: {
167
+ type: "string",
168
+ enum: ["MANUAL", "AML_SCREENING", "TRANSACTION_RULE", "WORKFLOW_BUILDER"],
169
+ description: "What opened the cases.",
170
+ },
171
+ scope: { type: "string", enum: ["identity", "transactions"], description: "Only identity cases, or only the ones a transaction rule opened." },
172
+ assigned_to: { type: "string", description: "Only cases assigned to this reviewer (a member's `user_id`)." },
173
+ blueprint: { type: "string", description: "Only cases under this review policy (its uuid)." },
174
+ },
175
+ },
176
+ },
177
+ access: "read",
178
+ permission: "list:cases", // GET …/cases/statistics/ → case_management.py:910
179
+ run: (args) => caseStatistics(args),
180
+ },
181
+ {
182
+ def: {
183
+ name: "didit_case_manage",
184
+ description: "Act on a case: assign, resolve, reopen, escalate, comment, or update.",
185
+ inputSchema: {
186
+ type: "object",
187
+ properties: {
188
+ ...orgapp_1.ORG_APP_PROPS,
189
+ case_id: { type: "string" },
190
+ action: { type: "string", enum: ["assign", "resolve", "reopen", "escalate", "comment", "update"] },
191
+ data: { type: "object", description: "Action payload (e.g. {assignee_id}, {comment}, or fields to update)" },
192
+ confirm: {
193
+ type: "boolean",
194
+ description: "REQUIRED when filing a SAR (action 'sar'/'file_sar', or any action whose data.status is 'SAR_FILED') - a high-impact regulatory action. Only set after explicit user confirmation of this exact action.",
195
+ },
196
+ },
197
+ required: ["case_id", "action"],
198
+ },
199
+ },
200
+ // Resolves, reopens, escalates or reassigns a case: a client asks before running it.
201
+ access: "destructive",
202
+ permission: "write:cases", // POST …/cases/{id}/{resolve|assign|reopen|escalate}/, PATCH …/cases/{id}/ → case_management.py
203
+ run: (args) => manageCase(args.case_id, args.action, args.data || {}, args.confirm),
204
+ },
205
+ ];
75
206
  //# sourceMappingURL=cases.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"cases.js","sourceRoot":"","sources":["../../src/tools/cases.ts"],"names":[],"mappings":";;AASA,8BAEC;AAED,0BAEC;AAED,gCAcC;AAED,wCAEC;AAMD,gCAsCC;AA/ED,sCAAmD;AACnD,0CAAsD;AAEtD,sFAAsF;AACtF,mFAAmF;AACnF,kDAAkD;AAElD,MAAM,GAAG,GAAG,CAAC,EAAU,EAAE,EAAE,CAAC,IAAA,sBAAW,EAAC,EAAE,EAAE,SAAS,CAAC,CAAC;AAEhD,KAAK,UAAU,SAAS,CAAC,MAA4B;IAC1D,OAAO,IAAA,mBAAU,EAAC,IAAA,mBAAU,EAAC,SAAS,CAAC,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;AACvD,CAAC;AAEM,KAAK,UAAU,OAAO,CAAC,MAAc;IAC1C,OAAO,IAAA,mBAAU,EAAC,IAAA,mBAAU,EAAC,UAAU,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;AAC1D,CAAC;AAEM,KAAK,UAAU,UAAU,CAAC,IAAyB;IACxD,6FAA6F;IAC7F,+DAA+D;IAC/D,MAAM,UAAU,GAAG,OAAO,CAAC,IAAI,EAAE,OAAO,IAAI,OAAO,IAAI,CAAC,OAAO,KAAK,QAAQ,CAAC,CAAC;IAC9E,MAAM,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,EAAE,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OAAO,EAAE,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,IAAI,EAAE,EAAE,IAAI,CAAC,OAAO,CAAC;KACpF;CACF,CAAC"}
@@ -1,3 +1,4 @@
1
+ import type { RegisteredTool } from "./registry";
1
2
  export declare function getCustomization(): Promise<any>;
2
3
  /**
3
4
  * Update branding: logo images and/or the SMS sender name. Accepts the tool's *_path
@@ -15,4 +16,5 @@ export declare function updateCustomization(inputs: {
15
16
  image_favicon_base64?: string;
16
17
  sms_sender_name?: string | null;
17
18
  }): Promise<any>;
19
+ export declare const BRANDING_TOOLS: readonly RegisteredTool[];
18
20
  //# sourceMappingURL=customization.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"customization.d.ts","sourceRoot":"","sources":["../../src/tools/customization.ts"],"names":[],"mappings":"AAIA,wBAAsB,gBAAgB,IAAI,OAAO,CAAC,GAAG,CAAC,CAErD;AAED;;;;;;GAMG;AACH,wBAAsB,mBAAmB,CAAC,MAAM,EAAE;IAChD,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACjC,GAAG,OAAO,CAAC,GAAG,CAAC,CAmBf"}
1
+ {"version":3,"file":"customization.d.ts","sourceRoot":"","sources":["../../src/tools/customization.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAKjD,wBAAsB,gBAAgB,IAAI,OAAO,CAAC,GAAG,CAAC,CAErD;AAED;;;;;;GAMG;AACH,wBAAsB,mBAAmB,CAAC,MAAM,EAAE;IAChD,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACjC,GAAG,OAAO,CAAC,GAAG,CAAC,CAmBf;AAKD,eAAO,MAAM,cAAc,EAAE,SAAS,cAAc,EAsCnD,CAAC"}
@@ -1,8 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BRANDING_TOOLS = void 0;
3
4
  exports.getCustomization = getCustomization;
4
5
  exports.updateCustomization = updateCustomization;
5
6
  const config_1 = require("../config");
7
+ const orgapp_1 = require("../orgapp");
6
8
  // White-label branding — the console resource is `white-label-customization`, org/app-scoped.
7
9
  async function getCustomization() {
8
10
  return (0, config_1.apiRequest)((0, config_1.orgAppPath)("/white-label-customization/"));
@@ -32,4 +34,45 @@ async function updateCustomization(inputs) {
32
34
  form: (0, config_1.buildFormData)(files, scalars),
33
35
  });
34
36
  }
37
+ // ── The branding tools (tools/registry.ts) ──────────────────────────────────
38
+ // Each tool declares here what index.ts and permissions.ts used to keep in their name-keyed tables.
39
+ // The definitions are listed where these tools always were, so the tool list does not change.
40
+ exports.BRANDING_TOOLS = [
41
+ {
42
+ def: {
43
+ name: "didit_branding_get",
44
+ description: "Get the current branding customization (logos, colors) applied to your verification UI.",
45
+ inputSchema: { type: "object", properties: { ...orgapp_1.ORG_APP_PROPS } },
46
+ },
47
+ access: "read",
48
+ permission: "read:customization", // GET …/white-label-customization/ → white_label_customization.py:66
49
+ run: () => getCustomization(),
50
+ },
51
+ {
52
+ def: {
53
+ name: "didit_branding_update",
54
+ description: "Update verification UI branding images and/or the SMS sender name. Each image is a local absolute *_path (local/stdio runs) or inline *_base64 content (hosted runs).",
55
+ inputSchema: {
56
+ type: "object",
57
+ properties: {
58
+ ...orgapp_1.ORG_APP_PROPS,
59
+ image_square_path: { type: "string", description: "Absolute path to a square logo image (local/stdio only)" },
60
+ image_rectangular_path: { type: "string", description: "Absolute path to a rectangular logo image (local/stdio only)" },
61
+ image_favicon_path: { type: "string", description: "Absolute path to a favicon image (local/stdio only)" },
62
+ image_square_base64: { type: "string", description: "Square logo as base64 or data URL (or an attachment reference like att_1)" },
63
+ image_rectangular_base64: { type: "string", description: "Rectangular logo as base64 or data URL (or an attachment reference like att_1)" },
64
+ image_favicon_base64: { type: "string", description: "Favicon as base64 or data URL (or an attachment reference like att_1)" },
65
+ sms_sender_name: {
66
+ type: ["string", "null"],
67
+ maxLength: 30,
68
+ description: "The name every SMS verification code of this application carries (\"123456 is your verification code for Acme Bank\"), in every workflow and through the phone verification API. Free. 1 to 30 characters: letters, digits, spaces and ' & - ! only, not only digits, single spaces between words. Empty string or null clears it. WhatsApp codes are not branded.",
69
+ },
70
+ },
71
+ },
72
+ },
73
+ access: "write",
74
+ permission: "write:customization", // PATCH …/white-label-customization/ → white_label_customization.py:73
75
+ run: (args) => updateCustomization(args),
76
+ },
77
+ ];
35
78
  //# sourceMappingURL=customization.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"customization.js","sourceRoot":"","sources":["../../src/tools/customization.ts"],"names":[],"mappings":";;AAIA,4CAEC;AASD,kDA2BC;AA1CD,sCAAkE;AAElE,8FAA8F;AAEvF,KAAK,UAAU,gBAAgB;IACpC,OAAO,IAAA,mBAAU,EAAC,IAAA,mBAAU,EAAC,6BAA6B,CAAC,CAAC,CAAC;AAC/D,CAAC;AAED;;;;;;GAMG;AACI,KAAK,UAAU,mBAAmB,CAAC,MAQzC;IACC,MAAM,KAAK,GAAG;QACZ,YAAY,EAAE,EAAE,IAAI,EAAE,MAAM,CAAC,iBAAiB,EAAE,MAAM,EAAE,MAAM,CAAC,mBAAmB,EAAE;QACpF,iBAAiB,EAAE,EAAE,IAAI,EAAE,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E,oBAAoB,EAAE,qEAAqE;QACvG,GAAG,EAAE,GAAG,EAAE,CAAC,gBAAgB,EAAE;KAC9B;IACD;QACE,GAAG,EAAE;YACH,IAAI,EAAE,uBAAuB;YAC7B,WAAW,EAAE,uKAAuK;YACpL,WAAW,EAAE;gBACX,IAAI,EAAE,QAAiB;gBACvB,UAAU,EAAE;oBACV,GAAG,sBAAa;oBAChB,iBAAiB,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,yDAAyD,EAAE;oBAC7G,sBAAsB,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,8DAA8D,EAAE;oBACvH,kBAAkB,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,qDAAqD,EAAE;oBAC1G,mBAAmB,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,2EAA2E,EAAE;oBACjI,wBAAwB,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,gFAAgF,EAAE;oBAC3I,oBAAoB,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,uEAAuE,EAAE;oBAC9H,eAAe,EAAE;wBACf,IAAI,EAAE,CAAC,QAAQ,EAAE,MAAM,CAAC;wBACxB,SAAS,EAAE,EAAE;wBACb,WAAW,EACT,oWAAoW;qBACvW;iBACF;aACF;SACF;QACD,MAAM,EAAE,OAAO;QACf,UAAU,EAAE,qBAAqB,EAAE,uEAAuE;QAC1G,GAAG,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,mBAAmB,CAAC,IAAI,CAAC;KACzC;CACF,CAAC"}
@@ -50,4 +50,49 @@ export declare function workflowTypeForFeatures(features: unknown): "kyb" | unde
50
50
  * KYB flow. Mirrors the backend rule so the agent gets immediate, actionable feedback instead of an
51
51
  * opaque server rejection. A pure-KYC graph (no KYB feature) is never touched. */
52
52
  export declare function assertKycKybSegregation(graph: unknown): void;
53
+ /** Settings of a graph that are not in the graph the API gave back for it. */
54
+ export interface LostSettings {
55
+ /** `<node id>.config.<key>`: sent, not returned, and not a key the feature's contract has. */
56
+ dropped: string[];
57
+ /** Sent and not returned, but a key the contract has: the API may hold it elsewhere. */
58
+ unconfirmed: string[];
59
+ /** The features the dropped keys belong to, for the pointer to the settings tool. */
60
+ features: string[];
61
+ }
62
+ /**
63
+ * Compare the settings a graph was sent with against the graph the API returned for it (the
64
+ * validation answer, or the stored graph read back after a save).
65
+ *
66
+ * The API runs a node's `config` through the feature's serializer and keeps what the serializer
67
+ * knows. A key it does not know is left out without an error, so a save can succeed and a
68
+ * workflow can go live without a setting the request asked for. What was kept is in what comes
69
+ * back, so the loss is visible there and nowhere else.
70
+ *
71
+ * A key counts as dropped only when it is also absent from the contract this server ships: a
72
+ * key the contract has may be held by the API somewhere other than the node's config, and that
73
+ * is reported as unconfirmed, not as lost. A value the API changed is a stored setting. A key
74
+ * sent as null asks for nothing. A node the API did not return cannot be compared.
75
+ */
76
+ export declare function lostSettings(sent: unknown, returned: unknown): LostSettings;
77
+ /** Whether a graph carries any setting: without one there is nothing a save could lose. */
78
+ export declare function carriesSettings(graph: unknown): boolean;
79
+ /** Whether a graph edit carries a setting: a config merge, or a node added or replaced with one. */
80
+ export declare function operationCarriesSettings(operation: {
81
+ config?: unknown;
82
+ node?: {
83
+ config?: unknown;
84
+ };
85
+ }): boolean;
86
+ /**
87
+ * What to say when settings were sent and what the API kept could not be read: the comparison
88
+ * that would catch a dropped setting was not possible, so nothing is claimed and nothing goes live.
89
+ */
90
+ export declare const UNVERIFIED_SETTINGS_NOTE: string;
91
+ /**
92
+ * What to tell the model about dropped settings: which, why, and what to do next. `when` is
93
+ * "dry run" where nothing has been saved yet. Empty when nothing was dropped.
94
+ */
95
+ export declare function droppedSettingsNote(lost: LostSettings, when?: "saved" | "dry run"): string;
96
+ /** The softer line for settings the contract knows and the API did not return. Empty when there are none. */
97
+ export declare function unconfirmedSettingsNote(lost: LostSettings): string;
53
98
  //# sourceMappingURL=feature-config.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"feature-config.d.ts","sourceRoot":"","sources":["../../src/tools/feature-config.ts"],"names":[],"mappings":"AAkHA;;;sDAGsD;AACtD,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAyBjE;AAED;kDACkD;AAClD,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAmBjE;AAED;wGACwG;AACxG,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,OAAO,GAAG,IAAI,CAM5D;AAED,oGAAoG;AACpG,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAQ/D;AAED,MAAM,WAAW,oBAAoB;IACnC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACjC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;uBAMuB;AACvB,wBAAgB,4BAA4B,CAAC,QAAQ,EAAE,oBAAoB,EAAE,GAAG;IAC9E,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAChC,CA+BA;AA+ED;;;;;;uEAMuE;AACvE,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CA6ChE;AAiBD;;;;;;;;GAQG;AACH,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,OAAO,GAAG,KAAK,GAAG,SAAS,CAO5E;AAED;;;mFAGmF;AACnF,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CA2B5D"}
1
+ {"version":3,"file":"feature-config.d.ts","sourceRoot":"","sources":["../../src/tools/feature-config.ts"],"names":[],"mappings":"AAmHA;;;sDAGsD;AACtD,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAyBjE;AAED;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AO,GAAG,OAAO,CAIvD;AAED,oGAAoG;AACpG,wBAAgB,wBAAwB,CAAC,SAAS,EAAE;IAAE,MAAM,CAAC,EAAE,OAAO,CAAC;IAAC,IAAI,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,OAAO,CAAA;KAAE,CAAA;CAAE,GAAG,OAAO,CAE9G;AAED;;;GAGG;AACH,eAAO,MAAM,wBAAwB,QAEqE,CAAC;AAE3G;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,YAAY,EAAE,IAAI,GAAE,OAAO,GAAG,SAAmB,GAAG,MAAM,CAYnG;AAED,6GAA6G;AAC7G,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,YAAY,GAAG,MAAM,CAOlE"}
@@ -1,4 +1,20 @@
1
1
  "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UNVERIFIED_SETTINGS_NOTE = void 0;
4
+ exports.normalizeDocumentsAllowed = normalizeDocumentsAllowed;
5
+ exports.normalizeLanguagesAllowed = normalizeLanguagesAllowed;
6
+ exports.normalizeFeatureConfig = normalizeFeatureConfig;
7
+ exports.normalizeFeatureConfigs = normalizeFeatureConfigs;
8
+ exports.buildLinearGraphFromFeatures = buildLinearGraphFromFeatures;
9
+ exports.resolveBranchRuleNodeIds = resolveBranchRuleNodeIds;
10
+ exports.workflowTypeForFeatures = workflowTypeForFeatures;
11
+ exports.assertKycKybSegregation = assertKycKybSegregation;
12
+ exports.lostSettings = lostSettings;
13
+ exports.carriesSettings = carriesSettings;
14
+ exports.operationCarriesSettings = operationCarriesSettings;
15
+ exports.droppedSettingsNote = droppedSettingsNote;
16
+ exports.unconfirmedSettingsNote = unconfirmedSettingsNote;
17
+ const feature_config_schema_1 = require("../feature-config-schema");
2
18
  // Feature-config normalization.
3
19
  //
4
20
  // The backend stores a feature node's allow-lists in strict, non-obvious shapes:
@@ -20,15 +36,6 @@
20
36
  // payload just works and the agent never has to reverse-engineer the format. Unknown country
21
37
  // codes / doc codes are passed through untouched — the backend remains the source of truth and
22
38
  // will report a precise error if a code really is invalid.
23
- Object.defineProperty(exports, "__esModule", { value: true });
24
- exports.normalizeDocumentsAllowed = normalizeDocumentsAllowed;
25
- exports.normalizeLanguagesAllowed = normalizeLanguagesAllowed;
26
- exports.normalizeFeatureConfig = normalizeFeatureConfig;
27
- exports.normalizeFeatureConfigs = normalizeFeatureConfigs;
28
- exports.buildLinearGraphFromFeatures = buildLinearGraphFromFeatures;
29
- exports.resolveBranchRuleNodeIds = resolveBranchRuleNodeIds;
30
- exports.workflowTypeForFeatures = workflowTypeForFeatures;
31
- exports.assertKycKybSegregation = assertKycKybSegregation;
32
39
  /** Every ISO-3166 alpha-3 code the backend's country allow-list accepts (its own catalog).
33
40
  * Used to fan out an array / "ALL" allow-list to "these documents, every country". */
34
41
  const ALL_ISO3 = [
@@ -429,4 +436,88 @@ function assertKycKybSegregation(graph) {
429
436
  `People node via kyb_ubo_verification_workflow / kyb_officer_verification_workflow / ` +
430
437
  `kyb_shareholder_verification_workflow.`);
431
438
  }
439
+ /**
440
+ * Compare the settings a graph was sent with against the graph the API returned for it (the
441
+ * validation answer, or the stored graph read back after a save).
442
+ *
443
+ * The API runs a node's `config` through the feature's serializer and keeps what the serializer
444
+ * knows. A key it does not know is left out without an error, so a save can succeed and a
445
+ * workflow can go live without a setting the request asked for. What was kept is in what comes
446
+ * back, so the loss is visible there and nowhere else.
447
+ *
448
+ * A key counts as dropped only when it is also absent from the contract this server ships: a
449
+ * key the contract has may be held by the API somewhere other than the node's config, and that
450
+ * is reported as unconfirmed, not as lost. A value the API changed is a stored setting. A key
451
+ * sent as null asks for nothing. A node the API did not return cannot be compared.
452
+ */
453
+ function lostSettings(sent, returned) {
454
+ const lost = { dropped: [], unconfirmed: [], features: [] };
455
+ const sentNodes = sent?.nodes;
456
+ const returnedNodes = returned?.nodes;
457
+ if (!sentNodes || typeof sentNodes !== "object" || !returnedNodes || typeof returnedNodes !== "object")
458
+ return lost;
459
+ for (const [id, node] of Object.entries(sentNodes)) {
460
+ const config = node?.config;
461
+ const back = returnedNodes[id];
462
+ if (!config || typeof config !== "object" || Array.isArray(config) || !back)
463
+ continue;
464
+ const kept = back.config && typeof back.config === "object" ? back.config : {};
465
+ const feature = String(node.feature ?? back.feature ?? "").toUpperCase();
466
+ const known = feature_config_schema_1.FEATURE_CONFIG_SCHEMA.features[feature]?.fields ?? {};
467
+ for (const [key, value] of Object.entries(config)) {
468
+ if (value === null || value === undefined || key in kept)
469
+ continue;
470
+ if (key in known || key === "status_rules") {
471
+ lost.unconfirmed.push(`${id}.config.${key}`);
472
+ }
473
+ else {
474
+ lost.dropped.push(`${id}.config.${key}`);
475
+ if (feature && !lost.features.includes(feature))
476
+ lost.features.push(feature);
477
+ }
478
+ }
479
+ }
480
+ return lost;
481
+ }
482
+ /** Whether a config holds a setting at all: a key with a value in it. */
483
+ function holdsSettings(config) {
484
+ return Boolean(config) && typeof config === "object" && !Array.isArray(config) && Object.values(config).some((value) => value !== null && value !== undefined);
485
+ }
486
+ /** Whether a graph carries any setting: without one there is nothing a save could lose. */
487
+ function carriesSettings(graph) {
488
+ const nodes = graph?.nodes;
489
+ return Boolean(nodes) && typeof nodes === "object" && Object.values(nodes).some((node) => holdsSettings(node?.config));
490
+ }
491
+ /** Whether a graph edit carries a setting: a config merge, or a node added or replaced with one. */
492
+ function operationCarriesSettings(operation) {
493
+ return holdsSettings(operation?.config) || holdsSettings(operation?.node?.config);
494
+ }
495
+ /**
496
+ * What to say when settings were sent and what the API kept could not be read: the comparison
497
+ * that would catch a dropped setting was not possible, so nothing is claimed and nothing goes live.
498
+ */
499
+ exports.UNVERIFIED_SETTINGS_NOTE = "The settings that were sent could not be compared with what the API stored, because the stored graph could not be read. " +
500
+ "Read it with didit_workflow_get_graph (include_config: true) and check the settings before publishing.";
501
+ /**
502
+ * What to tell the model about dropped settings: which, why, and what to do next. `when` is
503
+ * "dry run" where nothing has been saved yet. Empty when nothing was dropped.
504
+ */
505
+ function droppedSettingsNote(lost, when = "saved") {
506
+ if (lost.dropped.length === 0)
507
+ return "";
508
+ const many = lost.dropped.length > 1;
509
+ const features = lost.features.length > 0 ? ` (${lost.features.join(", ")})` : "";
510
+ return (`${lost.dropped.length} setting${many ? "s" : ""} ${when === "dry run" ? "would NOT be saved" : many ? "were NOT saved" : "was NOT saved"}: ${lost.dropped.join(", ")}. ` +
511
+ `The API does not know ${many ? "these keys" : "this key"} and leaves out an unknown setting without an error. ` +
512
+ `Call didit_workflow_get_feature_config_schema with the feature${features} for the real keys and set them with ` +
513
+ "didit_workflow_edit_graph (op merge_node_config). If no key does what was asked, tell the person it cannot be " +
514
+ "configured, rather than publishing without it.");
515
+ }
516
+ /** The softer line for settings the contract knows and the API did not return. Empty when there are none. */
517
+ function unconfirmedSettingsNote(lost) {
518
+ if (lost.unconfirmed.length === 0)
519
+ return "";
520
+ return (`The API did not return ${lost.unconfirmed.join(", ")}. Re-read ${lost.unconfirmed.length > 1 ? "them" : "it"} ` +
521
+ "with didit_workflow_get_graph before telling the person it is set.");
522
+ }
432
523
  //# sourceMappingURL=feature-config.js.map