@firedrill-tools/salesforce 0.1.1

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 (41) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +156 -0
  3. package/firedrill/agent.target.json +17 -0
  4. package/firedrill/api-limit-exceeded.scenario.json +11 -0
  5. package/firedrill/baseline.scenario.json +2213 -0
  6. package/firedrill/conformance.suite.json +23 -0
  7. package/firedrill/row-locked.scenario.json +11 -0
  8. package/firedrill/salesforce-api-limit-exceeded.drill.json +336 -0
  9. package/firedrill/salesforce-collections-composite.drill.json +277 -0
  10. package/firedrill/salesforce-denied.drill.json +74 -0
  11. package/firedrill/salesforce-fresh-install.drill.json +86 -0
  12. package/firedrill/salesforce-inactive-user.drill.json +43 -0
  13. package/firedrill/salesforce-invalid-session.drill.json +336 -0
  14. package/firedrill/salesforce-large-responses.drill.json +138 -0
  15. package/firedrill/salesforce-mcp-aliases.drill.json +156 -0
  16. package/firedrill/salesforce-profile-permissions.drill.json +241 -0
  17. package/firedrill/salesforce-read-only.drill.json +154 -0
  18. package/firedrill/salesforce-rest-flow.drill.json +714 -0
  19. package/firedrill/salesforce-row-locked.drill.json +227 -0
  20. package/firedrill/salesforce-sharing.drill.json +201 -0
  21. package/firedrill/salesforce-soql.drill.json +139 -0
  22. package/firedrill/salesforce-tight-limits.drill.json +336 -0
  23. package/firedrill/salesforce-write-committed-lost.drill.json +176 -0
  24. package/firedrill/tight-limits.scenario.json +41 -0
  25. package/firedrill/tools/salesforce/behavior.mjs +637 -0
  26. package/firedrill/tools/salesforce/lib/bytes.mjs +56 -0
  27. package/firedrill/tools/salesforce/lib/ids.mjs +68 -0
  28. package/firedrill/tools/salesforce/lib/match.mjs +352 -0
  29. package/firedrill/tools/salesforce/lib/records.mjs +506 -0
  30. package/firedrill/tools/salesforce/lib/schema.mjs +429 -0
  31. package/firedrill/tools/salesforce/lib/search.mjs +92 -0
  32. package/firedrill/tools/salesforce/lib/soql.mjs +1119 -0
  33. package/firedrill/tools/salesforce/lib/state.mjs +378 -0
  34. package/firedrill/tools/salesforce/lib/wire.mjs +109 -0
  35. package/firedrill/tools/salesforce/salesforce.tool.json +3939 -0
  36. package/firedrill/world.json +2705 -0
  37. package/firedrill/write-committed-lost.scenario.json +11 -0
  38. package/firedrill.json +5 -0
  39. package/package.json +64 -0
  40. package/starter.json +2212 -0
  41. package/test/conformance.mjs +1122 -0
@@ -0,0 +1,336 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "id": "salesforce-tight-limits",
4
+ "title": "Org scan bound lowered to 2 rows: every operation fails LIMIT_EXCEEDED on the users scan instead of returning a truncated result",
5
+ "targetId": "conformance-agent",
6
+ "scenarioId": "tight-limits",
7
+ "actorId": "admin",
8
+ "task": {
9
+ "instruction": "Run the tight-limits conformance flow against the synthetic Salesforce Tool and fail loudly on any unexpected status, header or body."
10
+ },
11
+ "assertions": [
12
+ {
13
+ "id": "versions-list-tool-error-ge-1",
14
+ "kind": "operation.count",
15
+ "operation": {
16
+ "packageId": "salesforce",
17
+ "operationId": "versions.list"
18
+ },
19
+ "outcomes": [
20
+ "tool_error"
21
+ ],
22
+ "comparison": {
23
+ "operator": "greater_than_or_equal",
24
+ "value": 1
25
+ }
26
+ },
27
+ {
28
+ "id": "userinfo-get-tool-error-ge-1",
29
+ "kind": "operation.count",
30
+ "operation": {
31
+ "packageId": "salesforce",
32
+ "operationId": "userinfo.get"
33
+ },
34
+ "outcomes": [
35
+ "tool_error"
36
+ ],
37
+ "comparison": {
38
+ "operator": "greater_than_or_equal",
39
+ "value": 1
40
+ }
41
+ },
42
+ {
43
+ "id": "limits-get-tool-error-ge-1",
44
+ "kind": "operation.count",
45
+ "operation": {
46
+ "packageId": "salesforce",
47
+ "operationId": "limits.get"
48
+ },
49
+ "outcomes": [
50
+ "tool_error"
51
+ ],
52
+ "comparison": {
53
+ "operator": "greater_than_or_equal",
54
+ "value": 1
55
+ }
56
+ },
57
+ {
58
+ "id": "sobjects-list-tool-error-ge-1",
59
+ "kind": "operation.count",
60
+ "operation": {
61
+ "packageId": "salesforce",
62
+ "operationId": "sobjects.list"
63
+ },
64
+ "outcomes": [
65
+ "tool_error"
66
+ ],
67
+ "comparison": {
68
+ "operator": "greater_than_or_equal",
69
+ "value": 1
70
+ }
71
+ },
72
+ {
73
+ "id": "sobjects-basic-info-tool-error-ge-1",
74
+ "kind": "operation.count",
75
+ "operation": {
76
+ "packageId": "salesforce",
77
+ "operationId": "sobjects.basic-info"
78
+ },
79
+ "outcomes": [
80
+ "tool_error"
81
+ ],
82
+ "comparison": {
83
+ "operator": "greater_than_or_equal",
84
+ "value": 1
85
+ }
86
+ },
87
+ {
88
+ "id": "sobjects-describe-tool-error-ge-1",
89
+ "kind": "operation.count",
90
+ "operation": {
91
+ "packageId": "salesforce",
92
+ "operationId": "sobjects.describe"
93
+ },
94
+ "outcomes": [
95
+ "tool_error"
96
+ ],
97
+ "comparison": {
98
+ "operator": "greater_than_or_equal",
99
+ "value": 1
100
+ }
101
+ },
102
+ {
103
+ "id": "records-create-tool-error-ge-1",
104
+ "kind": "operation.count",
105
+ "operation": {
106
+ "packageId": "salesforce",
107
+ "operationId": "records.create"
108
+ },
109
+ "outcomes": [
110
+ "tool_error"
111
+ ],
112
+ "comparison": {
113
+ "operator": "greater_than_or_equal",
114
+ "value": 1
115
+ }
116
+ },
117
+ {
118
+ "id": "records-retrieve-tool-error-ge-1",
119
+ "kind": "operation.count",
120
+ "operation": {
121
+ "packageId": "salesforce",
122
+ "operationId": "records.retrieve"
123
+ },
124
+ "outcomes": [
125
+ "tool_error"
126
+ ],
127
+ "comparison": {
128
+ "operator": "greater_than_or_equal",
129
+ "value": 1
130
+ }
131
+ },
132
+ {
133
+ "id": "records-update-tool-error-ge-1",
134
+ "kind": "operation.count",
135
+ "operation": {
136
+ "packageId": "salesforce",
137
+ "operationId": "records.update"
138
+ },
139
+ "outcomes": [
140
+ "tool_error"
141
+ ],
142
+ "comparison": {
143
+ "operator": "greater_than_or_equal",
144
+ "value": 1
145
+ }
146
+ },
147
+ {
148
+ "id": "records-delete-tool-error-ge-1",
149
+ "kind": "operation.count",
150
+ "operation": {
151
+ "packageId": "salesforce",
152
+ "operationId": "records.delete"
153
+ },
154
+ "outcomes": [
155
+ "tool_error"
156
+ ],
157
+ "comparison": {
158
+ "operator": "greater_than_or_equal",
159
+ "value": 1
160
+ }
161
+ },
162
+ {
163
+ "id": "records-upsert-tool-error-ge-1",
164
+ "kind": "operation.count",
165
+ "operation": {
166
+ "packageId": "salesforce",
167
+ "operationId": "records.upsert"
168
+ },
169
+ "outcomes": [
170
+ "tool_error"
171
+ ],
172
+ "comparison": {
173
+ "operator": "greater_than_or_equal",
174
+ "value": 1
175
+ }
176
+ },
177
+ {
178
+ "id": "query-execute-tool-error-ge-1",
179
+ "kind": "operation.count",
180
+ "operation": {
181
+ "packageId": "salesforce",
182
+ "operationId": "query.execute"
183
+ },
184
+ "outcomes": [
185
+ "tool_error"
186
+ ],
187
+ "comparison": {
188
+ "operator": "greater_than_or_equal",
189
+ "value": 1
190
+ }
191
+ },
192
+ {
193
+ "id": "query-more-tool-error-ge-1",
194
+ "kind": "operation.count",
195
+ "operation": {
196
+ "packageId": "salesforce",
197
+ "operationId": "query.more"
198
+ },
199
+ "outcomes": [
200
+ "tool_error"
201
+ ],
202
+ "comparison": {
203
+ "operator": "greater_than_or_equal",
204
+ "value": 1
205
+ }
206
+ },
207
+ {
208
+ "id": "search-parameterized-tool-error-ge-1",
209
+ "kind": "operation.count",
210
+ "operation": {
211
+ "packageId": "salesforce",
212
+ "operationId": "search.parameterized"
213
+ },
214
+ "outcomes": [
215
+ "tool_error"
216
+ ],
217
+ "comparison": {
218
+ "operator": "greater_than_or_equal",
219
+ "value": 1
220
+ }
221
+ },
222
+ {
223
+ "id": "collections-create-tool-error-ge-1",
224
+ "kind": "operation.count",
225
+ "operation": {
226
+ "packageId": "salesforce",
227
+ "operationId": "collections.create"
228
+ },
229
+ "outcomes": [
230
+ "tool_error"
231
+ ],
232
+ "comparison": {
233
+ "operator": "greater_than_or_equal",
234
+ "value": 1
235
+ }
236
+ },
237
+ {
238
+ "id": "collections-retrieve-tool-error-ge-1",
239
+ "kind": "operation.count",
240
+ "operation": {
241
+ "packageId": "salesforce",
242
+ "operationId": "collections.retrieve"
243
+ },
244
+ "outcomes": [
245
+ "tool_error"
246
+ ],
247
+ "comparison": {
248
+ "operator": "greater_than_or_equal",
249
+ "value": 1
250
+ }
251
+ },
252
+ {
253
+ "id": "collections-update-tool-error-ge-1",
254
+ "kind": "operation.count",
255
+ "operation": {
256
+ "packageId": "salesforce",
257
+ "operationId": "collections.update"
258
+ },
259
+ "outcomes": [
260
+ "tool_error"
261
+ ],
262
+ "comparison": {
263
+ "operator": "greater_than_or_equal",
264
+ "value": 1
265
+ }
266
+ },
267
+ {
268
+ "id": "collections-delete-tool-error-ge-1",
269
+ "kind": "operation.count",
270
+ "operation": {
271
+ "packageId": "salesforce",
272
+ "operationId": "collections.delete"
273
+ },
274
+ "outcomes": [
275
+ "tool_error"
276
+ ],
277
+ "comparison": {
278
+ "operator": "greater_than_or_equal",
279
+ "value": 1
280
+ }
281
+ },
282
+ {
283
+ "id": "collections-upsert-tool-error-ge-1",
284
+ "kind": "operation.count",
285
+ "operation": {
286
+ "packageId": "salesforce",
287
+ "operationId": "collections.upsert"
288
+ },
289
+ "outcomes": [
290
+ "tool_error"
291
+ ],
292
+ "comparison": {
293
+ "operator": "greater_than_or_equal",
294
+ "value": 1
295
+ }
296
+ },
297
+ {
298
+ "id": "composite-execute-tool-error-ge-1",
299
+ "kind": "operation.count",
300
+ "operation": {
301
+ "packageId": "salesforce",
302
+ "operationId": "composite.execute"
303
+ },
304
+ "outcomes": [
305
+ "tool_error"
306
+ ],
307
+ "comparison": {
308
+ "operator": "greater_than_or_equal",
309
+ "value": 1
310
+ }
311
+ },
312
+ {
313
+ "id": "accounts-count-10",
314
+ "kind": "state.count",
315
+ "packageId": "salesforce",
316
+ "namespace": "accounts",
317
+ "comparison": {
318
+ "operator": "equals",
319
+ "value": 10
320
+ }
321
+ },
322
+ {
323
+ "id": "event-record-created-eq-0",
324
+ "kind": "event.count",
325
+ "event": {
326
+ "packageId": "salesforce",
327
+ "eventId": "record.created"
328
+ },
329
+ "phase": "emitted",
330
+ "comparison": {
331
+ "operator": "equals",
332
+ "value": 0
333
+ }
334
+ }
335
+ ]
336
+ }
@@ -0,0 +1,176 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "id": "salesforce-write-committed-lost",
4
+ "title": "Fault write-committed-lost: inserts commit (rows and record.created exist) while the caller sees 503; a retry hits DUPLICATE_VALUE or duplicates silently",
5
+ "targetId": "conformance-agent",
6
+ "scenarioId": "write-committed-lost",
7
+ "actorId": "admin",
8
+ "task": {
9
+ "instruction": "Run the write-committed-lost conformance flow against the synthetic Salesforce Tool and fail loudly on any unexpected status, header or body."
10
+ },
11
+ "assertions": [
12
+ {
13
+ "id": "records-create-tool-error-eq-3",
14
+ "kind": "operation.count",
15
+ "operation": {
16
+ "packageId": "salesforce",
17
+ "operationId": "records.create"
18
+ },
19
+ "outcomes": [
20
+ "tool_error"
21
+ ],
22
+ "comparison": {
23
+ "operator": "equals",
24
+ "value": 3
25
+ }
26
+ },
27
+ {
28
+ "id": "records-create-ok-eq-0",
29
+ "kind": "operation.count",
30
+ "operation": {
31
+ "packageId": "salesforce",
32
+ "operationId": "records.create"
33
+ },
34
+ "outcomes": [
35
+ "ok"
36
+ ],
37
+ "comparison": {
38
+ "operator": "equals",
39
+ "value": 0
40
+ }
41
+ },
42
+ {
43
+ "id": "records-upsert-tool-error-eq-1",
44
+ "kind": "operation.count",
45
+ "operation": {
46
+ "packageId": "salesforce",
47
+ "operationId": "records.upsert"
48
+ },
49
+ "outcomes": [
50
+ "tool_error"
51
+ ],
52
+ "comparison": {
53
+ "operator": "equals",
54
+ "value": 1
55
+ }
56
+ },
57
+ {
58
+ "id": "collections-create-tool-error-eq-1",
59
+ "kind": "operation.count",
60
+ "operation": {
61
+ "packageId": "salesforce",
62
+ "operationId": "collections.create"
63
+ },
64
+ "outcomes": [
65
+ "tool_error"
66
+ ],
67
+ "comparison": {
68
+ "operator": "equals",
69
+ "value": 1
70
+ }
71
+ },
72
+ {
73
+ "id": "collections-upsert-tool-error-eq-1",
74
+ "kind": "operation.count",
75
+ "operation": {
76
+ "packageId": "salesforce",
77
+ "operationId": "collections.upsert"
78
+ },
79
+ "outcomes": [
80
+ "tool_error"
81
+ ],
82
+ "comparison": {
83
+ "operator": "equals",
84
+ "value": 1
85
+ }
86
+ },
87
+ {
88
+ "id": "records-update-ok-eq-1",
89
+ "kind": "operation.count",
90
+ "operation": {
91
+ "packageId": "salesforce",
92
+ "operationId": "records.update"
93
+ },
94
+ "outcomes": [
95
+ "ok"
96
+ ],
97
+ "comparison": {
98
+ "operator": "equals",
99
+ "value": 1
100
+ }
101
+ },
102
+ {
103
+ "id": "query-execute-ok-ge-4",
104
+ "kind": "operation.count",
105
+ "operation": {
106
+ "packageId": "salesforce",
107
+ "operationId": "query.execute"
108
+ },
109
+ "outcomes": [
110
+ "ok"
111
+ ],
112
+ "comparison": {
113
+ "operator": "greater_than_or_equal",
114
+ "value": 4
115
+ }
116
+ },
117
+ {
118
+ "id": "event-record-created-eq-5",
119
+ "kind": "event.count",
120
+ "event": {
121
+ "packageId": "salesforce",
122
+ "eventId": "record.created"
123
+ },
124
+ "phase": "emitted",
125
+ "comparison": {
126
+ "operator": "equals",
127
+ "value": 5
128
+ }
129
+ },
130
+ {
131
+ "id": "accounts-count-12",
132
+ "kind": "state.count",
133
+ "packageId": "salesforce",
134
+ "namespace": "accounts",
135
+ "comparison": {
136
+ "operator": "equals",
137
+ "value": 12
138
+ }
139
+ },
140
+ {
141
+ "id": "contacts-count-16",
142
+ "kind": "state.count",
143
+ "packageId": "salesforce",
144
+ "namespace": "contacts",
145
+ "comparison": {
146
+ "operator": "equals",
147
+ "value": 16
148
+ }
149
+ },
150
+ {
151
+ "id": "leads-count-9",
152
+ "kind": "state.count",
153
+ "packageId": "salesforce",
154
+ "namespace": "leads",
155
+ "comparison": {
156
+ "operator": "equals",
157
+ "value": 9
158
+ }
159
+ },
160
+ {
161
+ "id": "lost-phone",
162
+ "kind": "state.value",
163
+ "packageId": "salesforce",
164
+ "namespace": "accounts",
165
+ "rowId": "001Fd0000001001IAA",
166
+ "path": [
167
+ "fields",
168
+ "Phone"
169
+ ],
170
+ "comparison": {
171
+ "operator": "equals",
172
+ "value": "1"
173
+ }
174
+ }
175
+ ]
176
+ }
@@ -0,0 +1,41 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "id": "tight-limits",
4
+ "title": "Org scan bound lowered below the starter data so every bounded scan fails LIMIT_EXCEEDED instead of truncating",
5
+ "state": [
6
+ {
7
+ "action": "upsert",
8
+ "packageId": "salesforce",
9
+ "namespace": "org",
10
+ "rowId": "org",
11
+ "value": {
12
+ "organizationId": "00DFd0000000001MAA",
13
+ "name": "Brightwater Instruments",
14
+ "instanceUrl": "https://brightwater.example.my.salesforce.test",
15
+ "myDomain": "brightwater",
16
+ "timeZoneSidKey": "Europe/Amsterdam",
17
+ "defaultCurrencyIsoCode": "EUR",
18
+ "defaultLocaleSidKey": "en_GB",
19
+ "orgWideDefaults": {
20
+ "Account": "ReadOnly",
21
+ "Contact": "ControlledByParent",
22
+ "Lead": "ReadWrite",
23
+ "Opportunity": "Private",
24
+ "Task": "Private"
25
+ },
26
+ "dailyApiRequests": {
27
+ "max": 15000,
28
+ "used": 138
29
+ },
30
+ "dataStorageMB": {
31
+ "max": 200,
32
+ "used": 3
33
+ },
34
+ "defaultUserId": "005Fd0000000001IAA",
35
+ "limits": {
36
+ "maxRowsPerNamespace": 2
37
+ }
38
+ }
39
+ }
40
+ ]
41
+ }