@firedrill-tools/notion 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 (65) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +402 -0
  3. package/firedrill/agent.target.json +17 -0
  4. package/firedrill/baseline.scenario.json +5 -0
  5. package/firedrill/bounded.scenario.json +19 -0
  6. package/firedrill/conformance.suite.json +23 -0
  7. package/firedrill/notion-bounded.drill.json +318 -0
  8. package/firedrill/notion-byte-budget.drill.json +116 -0
  9. package/firedrill/notion-mcp-aliases.drill.json +150 -0
  10. package/firedrill/notion-page-authoring.drill.json +254 -0
  11. package/firedrill/notion-rate-limited.drill.json +118 -0
  12. package/firedrill/notion-schema-growth.drill.json +88 -0
  13. package/firedrill/notion-scope-agent-only.drill.json +131 -0
  14. package/firedrill/notion-scope-auditor.drill.json +86 -0
  15. package/firedrill/notion-scope-board-bot.drill.json +128 -0
  16. package/firedrill/notion-scope-notes-bot.drill.json +303 -0
  17. package/firedrill/notion-scope-stranger.drill.json +773 -0
  18. package/firedrill/notion-task-triage.drill.json +277 -0
  19. package/firedrill/notion-trash-and-restore.drill.json +186 -0
  20. package/firedrill/notion-update-lost.drill.json +88 -0
  21. package/firedrill/notion-workspace-read.drill.json +258 -0
  22. package/firedrill/notion-write-unavailable.drill.json +161 -0
  23. package/firedrill/rate-limited.scenario.json +11 -0
  24. package/firedrill/tools/notion/app/assets/ATTRIBUTION.md +35 -0
  25. package/firedrill/tools/notion/app/assets/fonts/OFL.txt +93 -0
  26. package/firedrill/tools/notion/app/assets/fonts/inter-latin.woff2 +0 -0
  27. package/firedrill/tools/notion/app/assets/notion-wordmark.svg +1 -0
  28. package/firedrill/tools/notion/app/assets/notion.svg +1 -0
  29. package/firedrill/tools/notion/app/site/app.js +797 -0
  30. package/firedrill/tools/notion/app/site/assets/fonts/inter-latin.woff2 +0 -0
  31. package/firedrill/tools/notion/app/site/assets/notion-wordmark.svg +1 -0
  32. package/firedrill/tools/notion/app/site/assets/notion.svg +1 -0
  33. package/firedrill/tools/notion/app/site/chrome.js +104 -0
  34. package/firedrill/tools/notion/app/site/cover-picker.js +83 -0
  35. package/firedrill/tools/notion/app/site/database.js +648 -0
  36. package/firedrill/tools/notion/app/site/editors.js +320 -0
  37. package/firedrill/tools/notion/app/site/format-bar.js +97 -0
  38. package/firedrill/tools/notion/app/site/icons.js +131 -0
  39. package/firedrill/tools/notion/app/site/index.html +125 -0
  40. package/firedrill/tools/notion/app/site/page.js +826 -0
  41. package/firedrill/tools/notion/app/site/rich.js +159 -0
  42. package/firedrill/tools/notion/app/site/state.js +170 -0
  43. package/firedrill/tools/notion/app/site/styles.css +826 -0
  44. package/firedrill/tools/notion/app/site/ui.js +418 -0
  45. package/firedrill/tools/notion/behavior.mjs +1123 -0
  46. package/firedrill/tools/notion/lib/blocks.mjs +371 -0
  47. package/firedrill/tools/notion/lib/identity.mjs +123 -0
  48. package/firedrill/tools/notion/lib/ids.mjs +63 -0
  49. package/firedrill/tools/notion/lib/json-depth.mjs +26 -0
  50. package/firedrill/tools/notion/lib/markdown.mjs +381 -0
  51. package/firedrill/tools/notion/lib/properties.mjs +513 -0
  52. package/firedrill/tools/notion/lib/query.mjs +272 -0
  53. package/firedrill/tools/notion/lib/render.mjs +137 -0
  54. package/firedrill/tools/notion/lib/rich-text.mjs +134 -0
  55. package/firedrill/tools/notion/lib/size.mjs +44 -0
  56. package/firedrill/tools/notion/lib/state.mjs +192 -0
  57. package/firedrill/tools/notion/lib/wire.mjs +89 -0
  58. package/firedrill/tools/notion/notion.tool.json +9837 -0
  59. package/firedrill/update-lost.scenario.json +11 -0
  60. package/firedrill/world.json +7039 -0
  61. package/firedrill/write-unavailable.scenario.json +11 -0
  62. package/firedrill.json +5 -0
  63. package/package.json +63 -0
  64. package/starter.json +6482 -0
  65. package/test/conformance.mjs +1186 -0
@@ -0,0 +1,19 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "id": "bounded",
4
+ "title": "Baseline data with meta/limits.max_rows_per_namespace lowered to 4: bounded scans fail with FAILED_PRECONDITION instead of truncating",
5
+ "state": [
6
+ {
7
+ "action": "upsert",
8
+ "packageId": "notion",
9
+ "namespace": "meta",
10
+ "rowId": "limits",
11
+ "value": {
12
+ "max_rows_per_namespace": 4,
13
+ "max_page_size": 100,
14
+ "max_children_per_append": 100,
15
+ "max_markdown_bytes": 102400
16
+ }
17
+ }
18
+ ]
19
+ }
@@ -0,0 +1,23 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "id": "conformance",
4
+ "title": "Notion Tool conformance",
5
+ "drills": [
6
+ "notion-workspace-read",
7
+ "notion-task-triage",
8
+ "notion-page-authoring",
9
+ "notion-trash-and-restore",
10
+ "notion-mcp-aliases",
11
+ "notion-scope-notes-bot",
12
+ "notion-scope-board-bot",
13
+ "notion-scope-stranger",
14
+ "notion-scope-auditor",
15
+ "notion-scope-agent-only",
16
+ "notion-rate-limited",
17
+ "notion-write-unavailable",
18
+ "notion-update-lost",
19
+ "notion-bounded",
20
+ "notion-byte-budget",
21
+ "notion-schema-growth"
22
+ ]
23
+ }
@@ -0,0 +1,318 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "id": "notion-bounded",
4
+ "title": "With meta/limits.max_rows_per_namespace = 4 every bounded scan fails with FAILED_PRECONDITION (400 validation_error) instead of truncating",
5
+ "targetId": "conformance-agent",
6
+ "scenarioId": "bounded",
7
+ "actorId": "member",
8
+ "task": {
9
+ "instruction": "Run the bounded conformance flow against the synthetic Notion Tool and fail loudly on any unexpected status, header or body."
10
+ },
11
+ "assertions": [
12
+ {
13
+ "id": "workspace-trash-error",
14
+ "kind": "operation.count",
15
+ "operation": {
16
+ "packageId": "notion",
17
+ "operationId": "workspace.trash"
18
+ },
19
+ "outcomes": [
20
+ "tool_error"
21
+ ],
22
+ "comparison": {
23
+ "operator": "greater_than_or_equal",
24
+ "value": 1
25
+ }
26
+ },
27
+ {
28
+ "id": "users-list-error",
29
+ "kind": "operation.count",
30
+ "operation": {
31
+ "packageId": "notion",
32
+ "operationId": "users.list"
33
+ },
34
+ "outcomes": [
35
+ "tool_error"
36
+ ],
37
+ "comparison": {
38
+ "operator": "greater_than_or_equal",
39
+ "value": 1
40
+ }
41
+ },
42
+ {
43
+ "id": "search-error",
44
+ "kind": "operation.count",
45
+ "operation": {
46
+ "packageId": "notion",
47
+ "operationId": "search"
48
+ },
49
+ "outcomes": [
50
+ "tool_error"
51
+ ],
52
+ "comparison": {
53
+ "operator": "greater_than_or_equal",
54
+ "value": 1
55
+ }
56
+ },
57
+ {
58
+ "id": "pages-create-error",
59
+ "kind": "operation.count",
60
+ "operation": {
61
+ "packageId": "notion",
62
+ "operationId": "pages.create"
63
+ },
64
+ "outcomes": [
65
+ "tool_error"
66
+ ],
67
+ "comparison": {
68
+ "operator": "greater_than_or_equal",
69
+ "value": 1
70
+ }
71
+ },
72
+ {
73
+ "id": "pages-update-error",
74
+ "kind": "operation.count",
75
+ "operation": {
76
+ "packageId": "notion",
77
+ "operationId": "pages.update"
78
+ },
79
+ "outcomes": [
80
+ "tool_error"
81
+ ],
82
+ "comparison": {
83
+ "operator": "greater_than_or_equal",
84
+ "value": 1
85
+ }
86
+ },
87
+ {
88
+ "id": "pages-move-error",
89
+ "kind": "operation.count",
90
+ "operation": {
91
+ "packageId": "notion",
92
+ "operationId": "pages.move"
93
+ },
94
+ "outcomes": [
95
+ "tool_error"
96
+ ],
97
+ "comparison": {
98
+ "operator": "greater_than_or_equal",
99
+ "value": 1
100
+ }
101
+ },
102
+ {
103
+ "id": "pages-retrieve-markdown-error",
104
+ "kind": "operation.count",
105
+ "operation": {
106
+ "packageId": "notion",
107
+ "operationId": "pages.retrieve-markdown"
108
+ },
109
+ "outcomes": [
110
+ "tool_error"
111
+ ],
112
+ "comparison": {
113
+ "operator": "greater_than_or_equal",
114
+ "value": 1
115
+ }
116
+ },
117
+ {
118
+ "id": "pages-update-markdown-error",
119
+ "kind": "operation.count",
120
+ "operation": {
121
+ "packageId": "notion",
122
+ "operationId": "pages.update-markdown"
123
+ },
124
+ "outcomes": [
125
+ "tool_error"
126
+ ],
127
+ "comparison": {
128
+ "operator": "greater_than_or_equal",
129
+ "value": 1
130
+ }
131
+ },
132
+ {
133
+ "id": "databases-create-error",
134
+ "kind": "operation.count",
135
+ "operation": {
136
+ "packageId": "notion",
137
+ "operationId": "databases.create"
138
+ },
139
+ "outcomes": [
140
+ "tool_error"
141
+ ],
142
+ "comparison": {
143
+ "operator": "greater_than_or_equal",
144
+ "value": 1
145
+ }
146
+ },
147
+ {
148
+ "id": "data-sources-query-error",
149
+ "kind": "operation.count",
150
+ "operation": {
151
+ "packageId": "notion",
152
+ "operationId": "data-sources.query"
153
+ },
154
+ "outcomes": [
155
+ "tool_error"
156
+ ],
157
+ "comparison": {
158
+ "operator": "greater_than_or_equal",
159
+ "value": 1
160
+ }
161
+ },
162
+ {
163
+ "id": "data-sources-update-error",
164
+ "kind": "operation.count",
165
+ "operation": {
166
+ "packageId": "notion",
167
+ "operationId": "data-sources.update"
168
+ },
169
+ "outcomes": [
170
+ "tool_error"
171
+ ],
172
+ "comparison": {
173
+ "operator": "greater_than_or_equal",
174
+ "value": 1
175
+ }
176
+ },
177
+ {
178
+ "id": "blocks-children-list-error",
179
+ "kind": "operation.count",
180
+ "operation": {
181
+ "packageId": "notion",
182
+ "operationId": "blocks.children.list"
183
+ },
184
+ "outcomes": [
185
+ "tool_error"
186
+ ],
187
+ "comparison": {
188
+ "operator": "greater_than_or_equal",
189
+ "value": 1
190
+ }
191
+ },
192
+ {
193
+ "id": "blocks-children-append-error",
194
+ "kind": "operation.count",
195
+ "operation": {
196
+ "packageId": "notion",
197
+ "operationId": "blocks.children.append"
198
+ },
199
+ "outcomes": [
200
+ "tool_error"
201
+ ],
202
+ "comparison": {
203
+ "operator": "greater_than_or_equal",
204
+ "value": 1
205
+ }
206
+ },
207
+ {
208
+ "id": "blocks-update-error",
209
+ "kind": "operation.count",
210
+ "operation": {
211
+ "packageId": "notion",
212
+ "operationId": "blocks.update"
213
+ },
214
+ "outcomes": [
215
+ "tool_error"
216
+ ],
217
+ "comparison": {
218
+ "operator": "greater_than_or_equal",
219
+ "value": 1
220
+ }
221
+ },
222
+ {
223
+ "id": "blocks-delete-error",
224
+ "kind": "operation.count",
225
+ "operation": {
226
+ "packageId": "notion",
227
+ "operationId": "blocks.delete"
228
+ },
229
+ "outcomes": [
230
+ "tool_error"
231
+ ],
232
+ "comparison": {
233
+ "operator": "greater_than_or_equal",
234
+ "value": 1
235
+ }
236
+ },
237
+ {
238
+ "id": "comments-create-error",
239
+ "kind": "operation.count",
240
+ "operation": {
241
+ "packageId": "notion",
242
+ "operationId": "comments.create"
243
+ },
244
+ "outcomes": [
245
+ "tool_error"
246
+ ],
247
+ "comparison": {
248
+ "operator": "greater_than_or_equal",
249
+ "value": 1
250
+ }
251
+ },
252
+ {
253
+ "id": "comments-list-error",
254
+ "kind": "operation.count",
255
+ "operation": {
256
+ "packageId": "notion",
257
+ "operationId": "comments.list"
258
+ },
259
+ "outcomes": [
260
+ "tool_error"
261
+ ],
262
+ "comparison": {
263
+ "operator": "greater_than_or_equal",
264
+ "value": 1
265
+ }
266
+ },
267
+ {
268
+ "id": "users-me-ok",
269
+ "kind": "operation.count",
270
+ "operation": {
271
+ "packageId": "notion",
272
+ "operationId": "users.me"
273
+ },
274
+ "outcomes": [
275
+ "ok"
276
+ ],
277
+ "comparison": {
278
+ "operator": "greater_than_or_equal",
279
+ "value": 1
280
+ }
281
+ },
282
+ {
283
+ "id": "pages-retrieve-ok",
284
+ "kind": "operation.count",
285
+ "operation": {
286
+ "packageId": "notion",
287
+ "operationId": "pages.retrieve"
288
+ },
289
+ "outcomes": [
290
+ "ok"
291
+ ],
292
+ "comparison": {
293
+ "operator": "greater_than_or_equal",
294
+ "value": 1
295
+ }
296
+ },
297
+ {
298
+ "id": "pages-unchanged",
299
+ "kind": "state.count",
300
+ "packageId": "notion",
301
+ "namespace": "pages",
302
+ "comparison": {
303
+ "operator": "equals",
304
+ "value": 28
305
+ }
306
+ },
307
+ {
308
+ "id": "blocks-unchanged",
309
+ "kind": "state.count",
310
+ "packageId": "notion",
311
+ "namespace": "blocks",
312
+ "comparison": {
313
+ "operator": "equals",
314
+ "value": 49
315
+ }
316
+ }
317
+ ]
318
+ }
@@ -0,0 +1,116 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "id": "notion-byte-budget",
4
+ "title": "Oversized rich text is refused; block children, comments, search and queries page by encoded bytes under 1 MiB",
5
+ "targetId": "conformance-agent",
6
+ "scenarioId": "baseline",
7
+ "actorId": "member",
8
+ "task": {
9
+ "instruction": "Run the byte-budget conformance flow against the synthetic Notion Tool and fail loudly on any unexpected status, header or body."
10
+ },
11
+ "assertions": [
12
+ {
13
+ "id": "oversized-append-refused",
14
+ "kind": "operation.count",
15
+ "operation": {
16
+ "packageId": "notion",
17
+ "operationId": "blocks.children.append"
18
+ },
19
+ "outcomes": [
20
+ "tool_error"
21
+ ],
22
+ "comparison": {
23
+ "operator": "equals",
24
+ "value": 2
25
+ }
26
+ },
27
+ {
28
+ "id": "near-limit-appends-ok",
29
+ "kind": "operation.count",
30
+ "operation": {
31
+ "packageId": "notion",
32
+ "operationId": "blocks.children.append"
33
+ },
34
+ "outcomes": [
35
+ "ok"
36
+ ],
37
+ "comparison": {
38
+ "operator": "equals",
39
+ "value": 4
40
+ }
41
+ },
42
+ {
43
+ "id": "children-paged-by-bytes",
44
+ "kind": "operation.count",
45
+ "operation": {
46
+ "packageId": "notion",
47
+ "operationId": "blocks.children.list"
48
+ },
49
+ "outcomes": [
50
+ "ok"
51
+ ],
52
+ "comparison": {
53
+ "operator": "greater_than_or_equal",
54
+ "value": 5
55
+ }
56
+ },
57
+ {
58
+ "id": "oversized-markdown-refused",
59
+ "kind": "operation.count",
60
+ "operation": {
61
+ "packageId": "notion",
62
+ "operationId": "pages.retrieve-markdown"
63
+ },
64
+ "outcomes": [
65
+ "tool_error"
66
+ ],
67
+ "comparison": {
68
+ "operator": "equals",
69
+ "value": 1
70
+ }
71
+ },
72
+ {
73
+ "id": "oversized-database-refused",
74
+ "kind": "operation.count",
75
+ "operation": {
76
+ "packageId": "notion",
77
+ "operationId": "databases.create"
78
+ },
79
+ "outcomes": [
80
+ "tool_error"
81
+ ],
82
+ "comparison": {
83
+ "operator": "equals",
84
+ "value": 1
85
+ }
86
+ },
87
+ {
88
+ "id": "search-paged-by-bytes",
89
+ "kind": "operation.count",
90
+ "operation": {
91
+ "packageId": "notion",
92
+ "operationId": "search"
93
+ },
94
+ "outcomes": [
95
+ "ok"
96
+ ],
97
+ "comparison": {
98
+ "operator": "equals",
99
+ "value": 4
100
+ }
101
+ },
102
+ {
103
+ "id": "comments-created",
104
+ "kind": "event.count",
105
+ "event": {
106
+ "packageId": "notion",
107
+ "eventId": "comment.created"
108
+ },
109
+ "phase": "emitted",
110
+ "comparison": {
111
+ "operator": "equals",
112
+ "value": 2
113
+ }
114
+ }
115
+ ]
116
+ }
@@ -0,0 +1,150 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "id": "notion-mcp-aliases",
4
+ "title": "The Notion MCP server tool names are listed and work through the MCP binding",
5
+ "targetId": "conformance-agent",
6
+ "scenarioId": "baseline",
7
+ "actorId": "member",
8
+ "task": {
9
+ "instruction": "Run the mcp-aliases conformance flow against the synthetic Notion Tool and fail loudly on any unexpected status, header or body."
10
+ },
11
+ "assertions": [
12
+ {
13
+ "id": "users-me-ok",
14
+ "kind": "operation.count",
15
+ "operation": {
16
+ "packageId": "notion",
17
+ "operationId": "users.me"
18
+ },
19
+ "outcomes": [
20
+ "ok"
21
+ ],
22
+ "comparison": {
23
+ "operator": "greater_than_or_equal",
24
+ "value": 1
25
+ }
26
+ },
27
+ {
28
+ "id": "search-ok",
29
+ "kind": "operation.count",
30
+ "operation": {
31
+ "packageId": "notion",
32
+ "operationId": "search"
33
+ },
34
+ "outcomes": [
35
+ "ok"
36
+ ],
37
+ "comparison": {
38
+ "operator": "greater_than_or_equal",
39
+ "value": 1
40
+ }
41
+ },
42
+ {
43
+ "id": "pages-retrieve-ok",
44
+ "kind": "operation.count",
45
+ "operation": {
46
+ "packageId": "notion",
47
+ "operationId": "pages.retrieve"
48
+ },
49
+ "outcomes": [
50
+ "ok"
51
+ ],
52
+ "comparison": {
53
+ "operator": "greater_than_or_equal",
54
+ "value": 1
55
+ }
56
+ },
57
+ {
58
+ "id": "data-sources-query-ok",
59
+ "kind": "operation.count",
60
+ "operation": {
61
+ "packageId": "notion",
62
+ "operationId": "data-sources.query"
63
+ },
64
+ "outcomes": [
65
+ "ok"
66
+ ],
67
+ "comparison": {
68
+ "operator": "greater_than_or_equal",
69
+ "value": 1
70
+ }
71
+ },
72
+ {
73
+ "id": "blocks-children-list-ok",
74
+ "kind": "operation.count",
75
+ "operation": {
76
+ "packageId": "notion",
77
+ "operationId": "blocks.children.list"
78
+ },
79
+ "outcomes": [
80
+ "ok"
81
+ ],
82
+ "comparison": {
83
+ "operator": "greater_than_or_equal",
84
+ "value": 1
85
+ }
86
+ },
87
+ {
88
+ "id": "pages-update-ok",
89
+ "kind": "operation.count",
90
+ "operation": {
91
+ "packageId": "notion",
92
+ "operationId": "pages.update"
93
+ },
94
+ "outcomes": [
95
+ "ok"
96
+ ],
97
+ "comparison": {
98
+ "operator": "greater_than_or_equal",
99
+ "value": 1
100
+ }
101
+ },
102
+ {
103
+ "id": "blocks-update-ok",
104
+ "kind": "operation.count",
105
+ "operation": {
106
+ "packageId": "notion",
107
+ "operationId": "blocks.update"
108
+ },
109
+ "outcomes": [
110
+ "ok"
111
+ ],
112
+ "comparison": {
113
+ "operator": "greater_than_or_equal",
114
+ "value": 1
115
+ }
116
+ },
117
+ {
118
+ "id": "comments-list-ok",
119
+ "kind": "operation.count",
120
+ "operation": {
121
+ "packageId": "notion",
122
+ "operationId": "comments.list"
123
+ },
124
+ "outcomes": [
125
+ "ok"
126
+ ],
127
+ "comparison": {
128
+ "operator": "greater_than_or_equal",
129
+ "value": 1
130
+ }
131
+ },
132
+ {
133
+ "id": "t3-status-set-over-mcp",
134
+ "kind": "state.value",
135
+ "packageId": "notion",
136
+ "namespace": "pages",
137
+ "rowId": "fd000000-0000-4000-8000-000200000122",
138
+ "path": [
139
+ "properties",
140
+ "Status",
141
+ "value",
142
+ "name"
143
+ ],
144
+ "comparison": {
145
+ "operator": "equals",
146
+ "value": "In progress"
147
+ }
148
+ }
149
+ ]
150
+ }