@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,156 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "id": "salesforce-mcp-aliases",
4
+ "title": "MCP: the @salesforce/mcp tool names run_soql_query and get_username plus the canonical salesforce.* names; SDK-side validation; framework-invalid arguments over REST",
5
+ "targetId": "conformance-agent",
6
+ "scenarioId": "baseline",
7
+ "actorId": "admin",
8
+ "task": {
9
+ "instruction": "Run the mcp-aliases conformance flow against the synthetic Salesforce Tool and fail loudly on any unexpected status, header or body."
10
+ },
11
+ "assertions": [
12
+ {
13
+ "id": "userinfo-get-ok-ge-2",
14
+ "kind": "operation.count",
15
+ "operation": {
16
+ "packageId": "salesforce",
17
+ "operationId": "userinfo.get"
18
+ },
19
+ "outcomes": [
20
+ "ok"
21
+ ],
22
+ "comparison": {
23
+ "operator": "greater_than_or_equal",
24
+ "value": 2
25
+ }
26
+ },
27
+ {
28
+ "id": "userinfo-get-tool-error-eq-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": "equals",
39
+ "value": 1
40
+ }
41
+ },
42
+ {
43
+ "id": "query-execute-ok-ge-4",
44
+ "kind": "operation.count",
45
+ "operation": {
46
+ "packageId": "salesforce",
47
+ "operationId": "query.execute"
48
+ },
49
+ "outcomes": [
50
+ "ok"
51
+ ],
52
+ "comparison": {
53
+ "operator": "greater_than_or_equal",
54
+ "value": 4
55
+ }
56
+ },
57
+ {
58
+ "id": "query-execute-tool-error-eq-3",
59
+ "kind": "operation.count",
60
+ "operation": {
61
+ "packageId": "salesforce",
62
+ "operationId": "query.execute"
63
+ },
64
+ "outcomes": [
65
+ "tool_error"
66
+ ],
67
+ "comparison": {
68
+ "operator": "equals",
69
+ "value": 3
70
+ }
71
+ },
72
+ {
73
+ "id": "records-create-ok-eq-1",
74
+ "kind": "operation.count",
75
+ "operation": {
76
+ "packageId": "salesforce",
77
+ "operationId": "records.create"
78
+ },
79
+ "outcomes": [
80
+ "ok"
81
+ ],
82
+ "comparison": {
83
+ "operator": "equals",
84
+ "value": 1
85
+ }
86
+ },
87
+ {
88
+ "id": "sobjects-describe-ok-eq-1",
89
+ "kind": "operation.count",
90
+ "operation": {
91
+ "packageId": "salesforce",
92
+ "operationId": "sobjects.describe"
93
+ },
94
+ "outcomes": [
95
+ "ok"
96
+ ],
97
+ "comparison": {
98
+ "operator": "equals",
99
+ "value": 1
100
+ }
101
+ },
102
+ {
103
+ "id": "versions-list-ok-eq-1",
104
+ "kind": "operation.count",
105
+ "operation": {
106
+ "packageId": "salesforce",
107
+ "operationId": "versions.list"
108
+ },
109
+ "outcomes": [
110
+ "ok"
111
+ ],
112
+ "comparison": {
113
+ "operator": "equals",
114
+ "value": 1
115
+ }
116
+ },
117
+ {
118
+ "id": "collections-delete-invalid-ge-1",
119
+ "kind": "operation.count",
120
+ "operation": {
121
+ "packageId": "salesforce",
122
+ "operationId": "collections.delete"
123
+ },
124
+ "outcomes": [
125
+ "invalid"
126
+ ],
127
+ "comparison": {
128
+ "operator": "greater_than_or_equal",
129
+ "value": 1
130
+ }
131
+ },
132
+ {
133
+ "id": "leads-count-9",
134
+ "kind": "state.count",
135
+ "packageId": "salesforce",
136
+ "namespace": "leads",
137
+ "comparison": {
138
+ "operator": "equals",
139
+ "value": 9
140
+ }
141
+ },
142
+ {
143
+ "id": "event-record-created-eq-1",
144
+ "kind": "event.count",
145
+ "event": {
146
+ "packageId": "salesforce",
147
+ "eventId": "record.created"
148
+ },
149
+ "phase": "emitted",
150
+ "comparison": {
151
+ "operator": "equals",
152
+ "value": 1
153
+ }
154
+ }
155
+ ]
156
+ }
@@ -0,0 +1,241 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "id": "salesforce-profile-permissions",
4
+ "title": "Profile object permissions: a type without read access is invisible (INVALID_TYPE / NOT_FOUND), missing create/edit/delete rights fail INSUFFICIENT_ACCESS_OR_READONLY",
5
+ "targetId": "conformance-agent",
6
+ "scenarioId": "baseline",
7
+ "actorId": "sdr",
8
+ "task": {
9
+ "instruction": "Run the profile-permissions conformance flow against the synthetic Salesforce Tool and fail loudly on any unexpected status, header or body."
10
+ },
11
+ "assertions": [
12
+ {
13
+ "id": "query-execute-tool-error-ge-2",
14
+ "kind": "operation.count",
15
+ "operation": {
16
+ "packageId": "salesforce",
17
+ "operationId": "query.execute"
18
+ },
19
+ "outcomes": [
20
+ "tool_error"
21
+ ],
22
+ "comparison": {
23
+ "operator": "greater_than_or_equal",
24
+ "value": 2
25
+ }
26
+ },
27
+ {
28
+ "id": "records-create-tool-error-eq-2",
29
+ "kind": "operation.count",
30
+ "operation": {
31
+ "packageId": "salesforce",
32
+ "operationId": "records.create"
33
+ },
34
+ "outcomes": [
35
+ "tool_error"
36
+ ],
37
+ "comparison": {
38
+ "operator": "equals",
39
+ "value": 2
40
+ }
41
+ },
42
+ {
43
+ "id": "records-create-ok-eq-1",
44
+ "kind": "operation.count",
45
+ "operation": {
46
+ "packageId": "salesforce",
47
+ "operationId": "records.create"
48
+ },
49
+ "outcomes": [
50
+ "ok"
51
+ ],
52
+ "comparison": {
53
+ "operator": "equals",
54
+ "value": 1
55
+ }
56
+ },
57
+ {
58
+ "id": "records-retrieve-tool-error-eq-1",
59
+ "kind": "operation.count",
60
+ "operation": {
61
+ "packageId": "salesforce",
62
+ "operationId": "records.retrieve"
63
+ },
64
+ "outcomes": [
65
+ "tool_error"
66
+ ],
67
+ "comparison": {
68
+ "operator": "equals",
69
+ "value": 1
70
+ }
71
+ },
72
+ {
73
+ "id": "records-update-tool-error-eq-2",
74
+ "kind": "operation.count",
75
+ "operation": {
76
+ "packageId": "salesforce",
77
+ "operationId": "records.update"
78
+ },
79
+ "outcomes": [
80
+ "tool_error"
81
+ ],
82
+ "comparison": {
83
+ "operator": "equals",
84
+ "value": 2
85
+ }
86
+ },
87
+ {
88
+ "id": "records-delete-tool-error-eq-2",
89
+ "kind": "operation.count",
90
+ "operation": {
91
+ "packageId": "salesforce",
92
+ "operationId": "records.delete"
93
+ },
94
+ "outcomes": [
95
+ "tool_error"
96
+ ],
97
+ "comparison": {
98
+ "operator": "equals",
99
+ "value": 2
100
+ }
101
+ },
102
+ {
103
+ "id": "records-upsert-tool-error-eq-2",
104
+ "kind": "operation.count",
105
+ "operation": {
106
+ "packageId": "salesforce",
107
+ "operationId": "records.upsert"
108
+ },
109
+ "outcomes": [
110
+ "tool_error"
111
+ ],
112
+ "comparison": {
113
+ "operator": "equals",
114
+ "value": 2
115
+ }
116
+ },
117
+ {
118
+ "id": "sobjects-basic-info-tool-error-ge-1",
119
+ "kind": "operation.count",
120
+ "operation": {
121
+ "packageId": "salesforce",
122
+ "operationId": "sobjects.basic-info"
123
+ },
124
+ "outcomes": [
125
+ "tool_error"
126
+ ],
127
+ "comparison": {
128
+ "operator": "greater_than_or_equal",
129
+ "value": 1
130
+ }
131
+ },
132
+ {
133
+ "id": "sobjects-describe-tool-error-ge-1",
134
+ "kind": "operation.count",
135
+ "operation": {
136
+ "packageId": "salesforce",
137
+ "operationId": "sobjects.describe"
138
+ },
139
+ "outcomes": [
140
+ "tool_error"
141
+ ],
142
+ "comparison": {
143
+ "operator": "greater_than_or_equal",
144
+ "value": 1
145
+ }
146
+ },
147
+ {
148
+ "id": "collections-retrieve-tool-error-ge-1",
149
+ "kind": "operation.count",
150
+ "operation": {
151
+ "packageId": "salesforce",
152
+ "operationId": "collections.retrieve"
153
+ },
154
+ "outcomes": [
155
+ "tool_error"
156
+ ],
157
+ "comparison": {
158
+ "operator": "greater_than_or_equal",
159
+ "value": 1
160
+ }
161
+ },
162
+ {
163
+ "id": "search-parameterized-tool-error-ge-1",
164
+ "kind": "operation.count",
165
+ "operation": {
166
+ "packageId": "salesforce",
167
+ "operationId": "search.parameterized"
168
+ },
169
+ "outcomes": [
170
+ "tool_error"
171
+ ],
172
+ "comparison": {
173
+ "operator": "greater_than_or_equal",
174
+ "value": 1
175
+ }
176
+ },
177
+ {
178
+ "id": "collections-create-ok-ge-1",
179
+ "kind": "operation.count",
180
+ "operation": {
181
+ "packageId": "salesforce",
182
+ "operationId": "collections.create"
183
+ },
184
+ "outcomes": [
185
+ "ok"
186
+ ],
187
+ "comparison": {
188
+ "operator": "greater_than_or_equal",
189
+ "value": 1
190
+ }
191
+ },
192
+ {
193
+ "id": "composite-execute-ok-ge-1",
194
+ "kind": "operation.count",
195
+ "operation": {
196
+ "packageId": "salesforce",
197
+ "operationId": "composite.execute"
198
+ },
199
+ "outcomes": [
200
+ "ok"
201
+ ],
202
+ "comparison": {
203
+ "operator": "greater_than_or_equal",
204
+ "value": 1
205
+ }
206
+ },
207
+ {
208
+ "id": "accounts-count-10",
209
+ "kind": "state.count",
210
+ "packageId": "salesforce",
211
+ "namespace": "accounts",
212
+ "comparison": {
213
+ "operator": "equals",
214
+ "value": 10
215
+ }
216
+ },
217
+ {
218
+ "id": "leads-count-10",
219
+ "kind": "state.count",
220
+ "packageId": "salesforce",
221
+ "namespace": "leads",
222
+ "comparison": {
223
+ "operator": "equals",
224
+ "value": 10
225
+ }
226
+ },
227
+ {
228
+ "id": "event-record-created-eq-2",
229
+ "kind": "event.count",
230
+ "event": {
231
+ "packageId": "salesforce",
232
+ "eventId": "record.created"
233
+ },
234
+ "phase": "emitted",
235
+ "comparison": {
236
+ "operator": "equals",
237
+ "value": 2
238
+ }
239
+ }
240
+ ]
241
+ }
@@ -0,0 +1,154 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "id": "salesforce-read-only",
4
+ "title": "Read Only profile: queries work (Private opportunities invisible), every write path fails INSUFFICIENT_ACCESS_OR_READONLY, item-level in envelopes",
5
+ "targetId": "conformance-agent",
6
+ "scenarioId": "baseline",
7
+ "actorId": "analyst",
8
+ "task": {
9
+ "instruction": "Run the read-only 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-1",
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": 1
25
+ }
26
+ },
27
+ {
28
+ "id": "records-update-tool-error-eq-1",
29
+ "kind": "operation.count",
30
+ "operation": {
31
+ "packageId": "salesforce",
32
+ "operationId": "records.update"
33
+ },
34
+ "outcomes": [
35
+ "tool_error"
36
+ ],
37
+ "comparison": {
38
+ "operator": "equals",
39
+ "value": 1
40
+ }
41
+ },
42
+ {
43
+ "id": "records-delete-tool-error-eq-1",
44
+ "kind": "operation.count",
45
+ "operation": {
46
+ "packageId": "salesforce",
47
+ "operationId": "records.delete"
48
+ },
49
+ "outcomes": [
50
+ "tool_error"
51
+ ],
52
+ "comparison": {
53
+ "operator": "equals",
54
+ "value": 1
55
+ }
56
+ },
57
+ {
58
+ "id": "records-upsert-tool-error-eq-1",
59
+ "kind": "operation.count",
60
+ "operation": {
61
+ "packageId": "salesforce",
62
+ "operationId": "records.upsert"
63
+ },
64
+ "outcomes": [
65
+ "tool_error"
66
+ ],
67
+ "comparison": {
68
+ "operator": "equals",
69
+ "value": 1
70
+ }
71
+ },
72
+ {
73
+ "id": "collections-update-ok-eq-1",
74
+ "kind": "operation.count",
75
+ "operation": {
76
+ "packageId": "salesforce",
77
+ "operationId": "collections.update"
78
+ },
79
+ "outcomes": [
80
+ "ok"
81
+ ],
82
+ "comparison": {
83
+ "operator": "equals",
84
+ "value": 1
85
+ }
86
+ },
87
+ {
88
+ "id": "composite-execute-ok-eq-1",
89
+ "kind": "operation.count",
90
+ "operation": {
91
+ "packageId": "salesforce",
92
+ "operationId": "composite.execute"
93
+ },
94
+ "outcomes": [
95
+ "ok"
96
+ ],
97
+ "comparison": {
98
+ "operator": "equals",
99
+ "value": 1
100
+ }
101
+ },
102
+ {
103
+ "id": "query-execute-ok-ge-6",
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": 6
115
+ }
116
+ },
117
+ {
118
+ "id": "event-record-created-eq-0",
119
+ "kind": "event.count",
120
+ "event": {
121
+ "packageId": "salesforce",
122
+ "eventId": "record.created"
123
+ },
124
+ "phase": "emitted",
125
+ "comparison": {
126
+ "operator": "equals",
127
+ "value": 0
128
+ }
129
+ },
130
+ {
131
+ "id": "event-record-updated-eq-0",
132
+ "kind": "event.count",
133
+ "event": {
134
+ "packageId": "salesforce",
135
+ "eventId": "record.updated"
136
+ },
137
+ "phase": "emitted",
138
+ "comparison": {
139
+ "operator": "equals",
140
+ "value": 0
141
+ }
142
+ },
143
+ {
144
+ "id": "leads-count-8",
145
+ "kind": "state.count",
146
+ "packageId": "salesforce",
147
+ "namespace": "leads",
148
+ "comparison": {
149
+ "operator": "equals",
150
+ "value": 8
151
+ }
152
+ }
153
+ ]
154
+ }