@gloaming/poke 0.0.0-stage → 0.2.0
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.
- package/LICENSE +21 -0
- package/README.md +136 -2
- package/daemon.js +175 -0
- package/drizzle/20261123093322_init/migration.sql +38 -0
- package/drizzle/20261123093322_init/snapshot.json +330 -0
- package/drizzle/20261123101024_poll_cursors_and_secrets/migration.sql +8 -0
- package/drizzle/20261123101024_poll_cursors_and_secrets/snapshot.json +382 -0
- package/drizzle/20261123124858_owner_trust/migration.sql +5 -0
- package/drizzle/20261123124858_owner_trust/snapshot.json +382 -0
- package/drizzle/20261123130247_looks/migration.sql +7 -0
- package/drizzle/20261123130247_looks/snapshot.json +413 -0
- package/drizzle/20261123133921_look_states/migration.sql +4 -0
- package/drizzle/20261123133921_look_states/snapshot.json +444 -0
- package/drizzle/20261123140834_pattern_states/migration.sql +7 -0
- package/drizzle/20261123140834_pattern_states/snapshot.json +495 -0
- package/drizzle/20261123141452_source_cursors/migration.sql +4 -0
- package/drizzle/20261123141452_source_cursors/snapshot.json +526 -0
- package/drizzle/20261124082939_replies/migration.sql +7 -0
- package/drizzle/20261124082939_replies/snapshot.json +581 -0
- package/package.json +24 -4
- package/poke-skill.md +104 -0
- package/poke.js +301 -0
- package/presets/bluesky.json +22 -0
- package/presets/docker-events.json +18 -0
- package/presets/github-releases.json +22 -0
- package/presets/gmail.json +27 -0
- package/presets/home-assistant.json +23 -0
- package/presets/journald-over-ssh.json +27 -0
- package/presets/kubectl-watch.json +22 -0
- package/presets/log-file.json +24 -0
- package/presets/mastodon.json +27 -0
- package/presets/modbus.json +40 -0
- package/presets/mqtt.json +28 -0
- package/presets/ntfy.json +28 -0
- package/presets/onvif.json +23 -0
- package/presets/serial.json +31 -0
- package/presets/status-page.json +18 -0
- package/presets/syslog.json +24 -0
- package/types/discord/main.js +35 -0
- package/types/discord/type.json +47 -0
- package/types/imap/main.js +134 -0
- package/types/imap/type.json +54 -0
- package/types/presence/main.js +35 -0
- package/types/presence/type.json +27 -0
- package/types/slack/main.js +35 -0
- package/types/slack/type.json +52 -0
- package/types/system/run.sh +19 -0
- package/types/system/system-events.swift +153 -0
- package/types/system/type.json +18 -0
|
@@ -0,0 +1,382 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "7",
|
|
3
|
+
"dialect": "sqlite",
|
|
4
|
+
"id": "540309c6-06ee-45fd-ae6d-fe2d197ceb2d",
|
|
5
|
+
"prevIds": ["12510b37-9503-4239-a948-e25d16ae6f0f"],
|
|
6
|
+
"ddl": [
|
|
7
|
+
{
|
|
8
|
+
"name": "firings",
|
|
9
|
+
"entityType": "tables"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"name": "events",
|
|
13
|
+
"entityType": "tables"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"name": "outcomes",
|
|
17
|
+
"entityType": "tables"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"name": "poll_cursors",
|
|
21
|
+
"entityType": "tables"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"name": "rules",
|
|
25
|
+
"entityType": "tables"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"name": "secrets",
|
|
29
|
+
"entityType": "tables"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"name": "sources",
|
|
33
|
+
"entityType": "tables"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"table": "firings",
|
|
37
|
+
"name": "seq",
|
|
38
|
+
"type": "integer",
|
|
39
|
+
"notNull": false,
|
|
40
|
+
"autoincrement": true,
|
|
41
|
+
"default": null,
|
|
42
|
+
"generated": null,
|
|
43
|
+
"entityType": "columns"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"table": "firings",
|
|
47
|
+
"name": "rule",
|
|
48
|
+
"type": "text",
|
|
49
|
+
"notNull": true,
|
|
50
|
+
"autoincrement": false,
|
|
51
|
+
"default": null,
|
|
52
|
+
"generated": null,
|
|
53
|
+
"entityType": "columns"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"table": "firings",
|
|
57
|
+
"name": "atMillis",
|
|
58
|
+
"type": "integer",
|
|
59
|
+
"notNull": true,
|
|
60
|
+
"autoincrement": false,
|
|
61
|
+
"default": null,
|
|
62
|
+
"generated": null,
|
|
63
|
+
"entityType": "columns"
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"table": "events",
|
|
67
|
+
"name": "seq",
|
|
68
|
+
"type": "integer",
|
|
69
|
+
"notNull": false,
|
|
70
|
+
"autoincrement": true,
|
|
71
|
+
"default": null,
|
|
72
|
+
"generated": null,
|
|
73
|
+
"entityType": "columns"
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"table": "events",
|
|
77
|
+
"name": "source",
|
|
78
|
+
"type": "text",
|
|
79
|
+
"notNull": true,
|
|
80
|
+
"autoincrement": false,
|
|
81
|
+
"default": null,
|
|
82
|
+
"generated": null,
|
|
83
|
+
"entityType": "columns"
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"table": "events",
|
|
87
|
+
"name": "id",
|
|
88
|
+
"type": "text",
|
|
89
|
+
"notNull": true,
|
|
90
|
+
"autoincrement": false,
|
|
91
|
+
"default": null,
|
|
92
|
+
"generated": null,
|
|
93
|
+
"entityType": "columns"
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"table": "events",
|
|
97
|
+
"name": "data",
|
|
98
|
+
"type": "text",
|
|
99
|
+
"notNull": true,
|
|
100
|
+
"autoincrement": false,
|
|
101
|
+
"default": null,
|
|
102
|
+
"generated": null,
|
|
103
|
+
"entityType": "columns"
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"table": "outcomes",
|
|
107
|
+
"name": "seq",
|
|
108
|
+
"type": "integer",
|
|
109
|
+
"notNull": false,
|
|
110
|
+
"autoincrement": true,
|
|
111
|
+
"default": null,
|
|
112
|
+
"generated": null,
|
|
113
|
+
"entityType": "columns"
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
"table": "outcomes",
|
|
117
|
+
"name": "eventSeq",
|
|
118
|
+
"type": "integer",
|
|
119
|
+
"notNull": true,
|
|
120
|
+
"autoincrement": false,
|
|
121
|
+
"default": null,
|
|
122
|
+
"generated": null,
|
|
123
|
+
"entityType": "columns"
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
"table": "outcomes",
|
|
127
|
+
"name": "rule",
|
|
128
|
+
"type": "text",
|
|
129
|
+
"notNull": false,
|
|
130
|
+
"autoincrement": false,
|
|
131
|
+
"default": null,
|
|
132
|
+
"generated": null,
|
|
133
|
+
"entityType": "columns"
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
"table": "outcomes",
|
|
137
|
+
"name": "data",
|
|
138
|
+
"type": "text",
|
|
139
|
+
"notNull": true,
|
|
140
|
+
"autoincrement": false,
|
|
141
|
+
"default": null,
|
|
142
|
+
"generated": null,
|
|
143
|
+
"entityType": "columns"
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
"table": "poll_cursors",
|
|
147
|
+
"name": "source",
|
|
148
|
+
"type": "text",
|
|
149
|
+
"notNull": false,
|
|
150
|
+
"autoincrement": false,
|
|
151
|
+
"default": null,
|
|
152
|
+
"generated": null,
|
|
153
|
+
"entityType": "columns"
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
"table": "poll_cursors",
|
|
157
|
+
"name": "cursor",
|
|
158
|
+
"type": "text",
|
|
159
|
+
"notNull": true,
|
|
160
|
+
"autoincrement": false,
|
|
161
|
+
"default": null,
|
|
162
|
+
"generated": null,
|
|
163
|
+
"entityType": "columns"
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
"table": "rules",
|
|
167
|
+
"name": "seq",
|
|
168
|
+
"type": "integer",
|
|
169
|
+
"notNull": false,
|
|
170
|
+
"autoincrement": true,
|
|
171
|
+
"default": null,
|
|
172
|
+
"generated": null,
|
|
173
|
+
"entityType": "columns"
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
"table": "rules",
|
|
177
|
+
"name": "id",
|
|
178
|
+
"type": "text",
|
|
179
|
+
"notNull": true,
|
|
180
|
+
"autoincrement": false,
|
|
181
|
+
"default": null,
|
|
182
|
+
"generated": null,
|
|
183
|
+
"entityType": "columns"
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
"table": "rules",
|
|
187
|
+
"name": "source",
|
|
188
|
+
"type": "text",
|
|
189
|
+
"notNull": true,
|
|
190
|
+
"autoincrement": false,
|
|
191
|
+
"default": null,
|
|
192
|
+
"generated": null,
|
|
193
|
+
"entityType": "columns"
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
"table": "rules",
|
|
197
|
+
"name": "data",
|
|
198
|
+
"type": "text",
|
|
199
|
+
"notNull": true,
|
|
200
|
+
"autoincrement": false,
|
|
201
|
+
"default": null,
|
|
202
|
+
"generated": null,
|
|
203
|
+
"entityType": "columns"
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
"table": "secrets",
|
|
207
|
+
"name": "name",
|
|
208
|
+
"type": "text",
|
|
209
|
+
"notNull": false,
|
|
210
|
+
"autoincrement": false,
|
|
211
|
+
"default": null,
|
|
212
|
+
"generated": null,
|
|
213
|
+
"entityType": "columns"
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
"table": "sources",
|
|
217
|
+
"name": "name",
|
|
218
|
+
"type": "text",
|
|
219
|
+
"notNull": false,
|
|
220
|
+
"autoincrement": false,
|
|
221
|
+
"default": null,
|
|
222
|
+
"generated": null,
|
|
223
|
+
"entityType": "columns"
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
"table": "sources",
|
|
227
|
+
"name": "data",
|
|
228
|
+
"type": "text",
|
|
229
|
+
"notNull": true,
|
|
230
|
+
"autoincrement": false,
|
|
231
|
+
"default": null,
|
|
232
|
+
"generated": null,
|
|
233
|
+
"entityType": "columns"
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
"table": "firings",
|
|
237
|
+
"name": "firings_rule_at",
|
|
238
|
+
"columns": [
|
|
239
|
+
{
|
|
240
|
+
"value": "rule",
|
|
241
|
+
"isExpression": false
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
"value": "atMillis",
|
|
245
|
+
"isExpression": false
|
|
246
|
+
}
|
|
247
|
+
],
|
|
248
|
+
"isUnique": false,
|
|
249
|
+
"where": null,
|
|
250
|
+
"origin": "manual",
|
|
251
|
+
"entityType": "indexes"
|
|
252
|
+
},
|
|
253
|
+
{
|
|
254
|
+
"table": "events",
|
|
255
|
+
"name": "events_source_id",
|
|
256
|
+
"columns": [
|
|
257
|
+
{
|
|
258
|
+
"value": "source",
|
|
259
|
+
"isExpression": false
|
|
260
|
+
},
|
|
261
|
+
{
|
|
262
|
+
"value": "id",
|
|
263
|
+
"isExpression": false
|
|
264
|
+
}
|
|
265
|
+
],
|
|
266
|
+
"isUnique": true,
|
|
267
|
+
"where": null,
|
|
268
|
+
"origin": "manual",
|
|
269
|
+
"entityType": "indexes"
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
"table": "outcomes",
|
|
273
|
+
"name": "outcomes_event",
|
|
274
|
+
"columns": [
|
|
275
|
+
{
|
|
276
|
+
"value": "eventSeq",
|
|
277
|
+
"isExpression": false
|
|
278
|
+
}
|
|
279
|
+
],
|
|
280
|
+
"isUnique": false,
|
|
281
|
+
"where": null,
|
|
282
|
+
"origin": "manual",
|
|
283
|
+
"entityType": "indexes"
|
|
284
|
+
},
|
|
285
|
+
{
|
|
286
|
+
"table": "outcomes",
|
|
287
|
+
"name": "outcomes_rule",
|
|
288
|
+
"columns": [
|
|
289
|
+
{
|
|
290
|
+
"value": "rule",
|
|
291
|
+
"isExpression": false
|
|
292
|
+
}
|
|
293
|
+
],
|
|
294
|
+
"isUnique": false,
|
|
295
|
+
"where": null,
|
|
296
|
+
"origin": "manual",
|
|
297
|
+
"entityType": "indexes"
|
|
298
|
+
},
|
|
299
|
+
{
|
|
300
|
+
"table": "rules",
|
|
301
|
+
"name": "rules_source",
|
|
302
|
+
"columns": [
|
|
303
|
+
{
|
|
304
|
+
"value": "source",
|
|
305
|
+
"isExpression": false
|
|
306
|
+
}
|
|
307
|
+
],
|
|
308
|
+
"isUnique": false,
|
|
309
|
+
"where": null,
|
|
310
|
+
"origin": "manual",
|
|
311
|
+
"entityType": "indexes"
|
|
312
|
+
},
|
|
313
|
+
{
|
|
314
|
+
"table": "outcomes",
|
|
315
|
+
"name": "fk_outcomes_eventSeq_events_seq_fk",
|
|
316
|
+
"columns": ["eventSeq"],
|
|
317
|
+
"tableTo": "events",
|
|
318
|
+
"columnsTo": ["seq"],
|
|
319
|
+
"onUpdate": "NO ACTION",
|
|
320
|
+
"onDelete": "CASCADE",
|
|
321
|
+
"nameExplicit": false,
|
|
322
|
+
"entityType": "fks"
|
|
323
|
+
},
|
|
324
|
+
{
|
|
325
|
+
"table": "firings",
|
|
326
|
+
"name": "firings_pk",
|
|
327
|
+
"columns": ["seq"],
|
|
328
|
+
"nameExplicit": false,
|
|
329
|
+
"entityType": "pks"
|
|
330
|
+
},
|
|
331
|
+
{
|
|
332
|
+
"table": "events",
|
|
333
|
+
"name": "events_pk",
|
|
334
|
+
"columns": ["seq"],
|
|
335
|
+
"nameExplicit": false,
|
|
336
|
+
"entityType": "pks"
|
|
337
|
+
},
|
|
338
|
+
{
|
|
339
|
+
"table": "outcomes",
|
|
340
|
+
"name": "outcomes_pk",
|
|
341
|
+
"columns": ["seq"],
|
|
342
|
+
"nameExplicit": false,
|
|
343
|
+
"entityType": "pks"
|
|
344
|
+
},
|
|
345
|
+
{
|
|
346
|
+
"table": "poll_cursors",
|
|
347
|
+
"name": "poll_cursors_pk",
|
|
348
|
+
"columns": ["source"],
|
|
349
|
+
"nameExplicit": false,
|
|
350
|
+
"entityType": "pks"
|
|
351
|
+
},
|
|
352
|
+
{
|
|
353
|
+
"table": "rules",
|
|
354
|
+
"name": "rules_pk",
|
|
355
|
+
"columns": ["seq"],
|
|
356
|
+
"nameExplicit": false,
|
|
357
|
+
"entityType": "pks"
|
|
358
|
+
},
|
|
359
|
+
{
|
|
360
|
+
"table": "secrets",
|
|
361
|
+
"name": "secrets_pk",
|
|
362
|
+
"columns": ["name"],
|
|
363
|
+
"nameExplicit": false,
|
|
364
|
+
"entityType": "pks"
|
|
365
|
+
},
|
|
366
|
+
{
|
|
367
|
+
"table": "sources",
|
|
368
|
+
"name": "sources_pk",
|
|
369
|
+
"columns": ["name"],
|
|
370
|
+
"nameExplicit": false,
|
|
371
|
+
"entityType": "pks"
|
|
372
|
+
},
|
|
373
|
+
{
|
|
374
|
+
"table": "rules",
|
|
375
|
+
"name": "rules_id_unique",
|
|
376
|
+
"columns": ["id"],
|
|
377
|
+
"nameExplicit": false,
|
|
378
|
+
"entityType": "uniques"
|
|
379
|
+
}
|
|
380
|
+
],
|
|
381
|
+
"renames": []
|
|
382
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
-- Trust levels are now `owner | untrusted`: what v1 called `trusted` was always the user's own words.
|
|
2
|
+
UPDATE `events` SET `data` = json_set(`data`, '$.trust', 'owner') WHERE json_extract(`data`, '$.trust') = 'trusted';
|
|
3
|
+
--> statement-breakpoint
|
|
4
|
+
-- Every Source now states its Trust level; v1 fixed it by kind.
|
|
5
|
+
UPDATE `sources` SET `data` = json_set(`data`, '$.trust', CASE json_extract(`data`, '$.spec._tag') WHEN 'Webhook' THEN 'untrusted' WHEN 'Poll' THEN 'untrusted' ELSE 'owner' END);
|