@listen-fire/handbook 0.14.0 → 0.14.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.
@@ -3,266 +3,282 @@
3
3
  "canFire": true,
4
4
  "schema": {
5
5
  "positions": {
6
- "Node Type": {
7
- "properties": {},
8
- "edges": {},
9
- "undescribed": true
10
- },
11
- "Record Change": {
6
+ "Company": {
12
7
  "properties": {
13
- "action": {
14
- "kind": "enum",
15
- "options": [
16
- "record.created",
17
- "record.updated",
18
- "record.deleted"
19
- ]
8
+ "Name": "text",
9
+ "Domains": {
10
+ "kind": "list",
11
+ "of": "text"
20
12
  },
21
- "type": "text",
22
- "record": "text"
13
+ "Stage": "text"
23
14
  },
24
15
  "edges": {
25
- "Record": {
26
- "target": "Node Type",
27
- "subject": true,
28
- "requiresLiveRecord": true
29
- }
30
- }
31
- },
32
- "[\"Record Change\",[[\"action\",\"record.created\"],[\"type\",\"Company\"]]]": {
33
- "properties": {
34
- "action": {
35
- "kind": "enum",
36
- "options": [
37
- "record.created",
38
- "record.updated",
39
- "record.deleted"
40
- ]
16
+ "Team": {
17
+ "target": "Person",
18
+ "writable": true
41
19
  },
42
- "type": "text",
43
- "record": "text"
44
- },
45
- "edges": {
46
- "Record": {
47
- "target": "Company",
48
- "subject": true
20
+ "Support Tickets": {
21
+ "target": "Support Ticket",
22
+ "writable": true
23
+ },
24
+ "Resources": {
25
+ "target": "Attached Resource",
26
+ "resources": true
27
+ },
28
+ "Changes": {
29
+ "target": "Company Change",
30
+ "readable": false,
31
+ "listenable": true,
32
+ "identity": "Id",
33
+ "delivery": "connection",
34
+ "carries": [
35
+ "Company"
36
+ ],
37
+ "attributes": true,
38
+ "description": "What happens to a Company in the graph, each change once: created, updated (`Changed Fields` names what moved), deleted."
49
39
  }
50
40
  },
51
- "displayName": "Record Change where action=record.created, type=Company"
41
+ "deletable": true,
42
+ "fieldIds": {
43
+ "Name": "pt-company-name",
44
+ "Domains": "pt-company-domains",
45
+ "Stage": "pt-company-stage"
46
+ }
52
47
  },
53
- "[\"Record Change\",[[\"action\",\"record.updated\"],[\"type\",\"Company\"]]]": {
48
+ "Person": {
54
49
  "properties": {
55
- "action": {
56
- "kind": "enum",
57
- "options": [
58
- "record.created",
59
- "record.updated",
60
- "record.deleted"
61
- ]
62
- },
63
- "type": "text",
64
- "record": "text"
50
+ "Name": "text",
51
+ "Email": "text"
65
52
  },
66
53
  "edges": {
67
- "Record": {
54
+ "Companies": {
68
55
  "target": "Company",
69
- "subject": true
70
- }
71
- },
72
- "displayName": "Record Change where action=record.updated, type=Company"
73
- },
74
- "[\"Record Change\",[[\"action\",\"record.deleted\"],[\"type\",\"Company\"]]]": {
75
- "properties": {
76
- "action": {
77
- "kind": "enum",
78
- "options": [
79
- "record.created",
80
- "record.updated",
81
- "record.deleted"
82
- ]
56
+ "writable": true
83
57
  },
84
- "type": "text",
85
- "record": "text"
86
- },
87
- "edges": {},
88
- "displayName": "Record Change where action=record.deleted, type=Company"
89
- },
90
- "[\"Record Change\",[[\"action\",\"record.created\"],[\"type\",\"Person\"]]]": {
91
- "properties": {
92
- "action": {
93
- "kind": "enum",
94
- "options": [
95
- "record.created",
96
- "record.updated",
97
- "record.deleted"
98
- ]
58
+ "Reported Tickets": {
59
+ "target": "Support Ticket",
60
+ "writable": true
99
61
  },
100
- "type": "text",
101
- "record": "text"
102
- },
103
- "edges": {
104
- "Record": {
105
- "target": "Person",
106
- "subject": true
62
+ "Resources": {
63
+ "target": "Attached Resource",
64
+ "resources": true
65
+ },
66
+ "Changes": {
67
+ "target": "Person Change",
68
+ "readable": false,
69
+ "listenable": true,
70
+ "identity": "Id",
71
+ "delivery": "connection",
72
+ "carries": [
73
+ "Person"
74
+ ],
75
+ "attributes": true,
76
+ "description": "What happens to a Person in the graph, each change once: created, updated (`Changed Fields` names what moved), deleted."
107
77
  }
108
78
  },
109
- "displayName": "Record Change where action=record.created, type=Person"
79
+ "deletable": true,
80
+ "fieldIds": {
81
+ "Name": "pt-person-name",
82
+ "Email": "pt-person-email"
83
+ }
110
84
  },
111
- "[\"Record Change\",[[\"action\",\"record.updated\"],[\"type\",\"Person\"]]]": {
85
+ "Support Ticket": {
112
86
  "properties": {
113
- "action": {
114
- "kind": "enum",
115
- "options": [
116
- "record.created",
117
- "record.updated",
118
- "record.deleted"
119
- ]
120
- },
121
- "type": "text",
122
- "record": "text"
87
+ "Status": "text",
88
+ "Priority": "number"
123
89
  },
124
90
  "edges": {
125
- "Record": {
91
+ "Reporter": {
126
92
  "target": "Person",
127
- "subject": true
93
+ "writable": true
94
+ },
95
+ "Company": {
96
+ "target": "Company",
97
+ "writable": true
98
+ },
99
+ "Resources": {
100
+ "target": "Attached Resource",
101
+ "resources": true
102
+ },
103
+ "Changes": {
104
+ "target": "Support Ticket Change",
105
+ "readable": false,
106
+ "listenable": true,
107
+ "identity": "Id",
108
+ "delivery": "connection",
109
+ "carries": [
110
+ "Support Ticket"
111
+ ],
112
+ "attributes": true,
113
+ "description": "What happens to a Support Ticket in the graph, each change once: created, updated (`Changed Fields` names what moved), deleted."
128
114
  }
129
115
  },
130
- "displayName": "Record Change where action=record.updated, type=Person"
116
+ "deletable": true,
117
+ "fieldIds": {
118
+ "Status": "pt-ticket-status",
119
+ "Priority": "pt-ticket-priority"
120
+ }
131
121
  },
132
- "[\"Record Change\",[[\"action\",\"record.deleted\"],[\"type\",\"Person\"]]]": {
122
+ "Company Change": {
133
123
  "properties": {
134
- "action": {
124
+ "Id": "text",
125
+ "Kind": {
135
126
  "kind": "enum",
136
127
  "options": [
137
- "record.created",
138
- "record.updated",
139
- "record.deleted"
128
+ "created",
129
+ "updated",
130
+ "deleted"
140
131
  ]
141
132
  },
142
- "type": "text",
143
- "record": "text"
144
- },
145
- "edges": {},
146
- "displayName": "Record Change where action=record.deleted, type=Person"
147
- },
148
- "[\"Record Change\",[[\"action\",\"record.created\"],[\"type\",\"Support Ticket\"]]]": {
149
- "properties": {
150
- "action": {
151
- "kind": "enum",
152
- "options": [
153
- "record.created",
154
- "record.updated",
155
- "record.deleted"
156
- ]
133
+ "Changed Fields": {
134
+ "kind": "list",
135
+ "of": {
136
+ "kind": "enum",
137
+ "options": [
138
+ "Name",
139
+ "Domains",
140
+ "Stage",
141
+ "Team",
142
+ "Support Tickets"
143
+ ]
144
+ }
157
145
  },
158
- "type": "text",
159
- "record": "text"
146
+ "Record Id": "text",
147
+ "Current": {
148
+ "kind": "maybeAbsent",
149
+ "of": {
150
+ "kind": "record",
151
+ "position": {
152
+ "kind": "position",
153
+ "position": "Company"
154
+ }
155
+ }
156
+ }
160
157
  },
161
158
  "edges": {
162
159
  "Record": {
163
- "target": "Support Ticket",
164
- "subject": true
160
+ "target": "Company",
161
+ "requiresLiveRecord": true,
162
+ "description": "The record as it is now, read from the graph: none once it is deleted."
165
163
  }
166
164
  },
167
- "displayName": "Record Change where action=record.created, type=Support Ticket"
165
+ "description": "A change to a Company in the graph: what happened (`Kind`), which properties and edges moved (`Changed Fields`), and the record as the change left it (`Current`, absent once deleted; test it present before reading through it: `exists(c.Current) AND c.Current.Status == \"Open\"`). Walk `Record` for the record as it is now.",
166
+ "fieldDocs": {
167
+ "Id": "Names the change: the same each time the graph reports it.",
168
+ "Kind": "What happened to the record.",
169
+ "Changed Fields": "The properties and edges the change moved, by name: every one a created record was given, none for a deleted one.",
170
+ "Record Id": "The graph's id for the record, a deleted one's too.",
171
+ "Current": "The record as the change left it, every property by name. Absent when it was deleted."
172
+ }
168
173
  },
169
- "[\"Record Change\",[[\"action\",\"record.updated\"],[\"type\",\"Support Ticket\"]]]": {
174
+ "Person Change": {
170
175
  "properties": {
171
- "action": {
176
+ "Id": "text",
177
+ "Kind": {
172
178
  "kind": "enum",
173
179
  "options": [
174
- "record.created",
175
- "record.updated",
176
- "record.deleted"
180
+ "created",
181
+ "updated",
182
+ "deleted"
177
183
  ]
178
184
  },
179
- "type": "text",
180
- "record": "text"
185
+ "Changed Fields": {
186
+ "kind": "list",
187
+ "of": {
188
+ "kind": "enum",
189
+ "options": [
190
+ "Name",
191
+ "Email",
192
+ "Companies",
193
+ "Reported Tickets"
194
+ ]
195
+ }
196
+ },
197
+ "Record Id": "text",
198
+ "Current": {
199
+ "kind": "maybeAbsent",
200
+ "of": {
201
+ "kind": "record",
202
+ "position": {
203
+ "kind": "position",
204
+ "position": "Person"
205
+ }
206
+ }
207
+ }
181
208
  },
182
209
  "edges": {
183
210
  "Record": {
184
- "target": "Support Ticket",
185
- "subject": true
211
+ "target": "Person",
212
+ "requiresLiveRecord": true,
213
+ "description": "The record as it is now, read from the graph: none once it is deleted."
186
214
  }
187
215
  },
188
- "displayName": "Record Change where action=record.updated, type=Support Ticket"
216
+ "description": "A change to a Person in the graph: what happened (`Kind`), which properties and edges moved (`Changed Fields`), and the record as the change left it (`Current`, absent once deleted; test it present before reading through it: `exists(c.Current) AND c.Current.Status == \"Open\"`). Walk `Record` for the record as it is now.",
217
+ "fieldDocs": {
218
+ "Id": "Names the change: the same each time the graph reports it.",
219
+ "Kind": "What happened to the record.",
220
+ "Changed Fields": "The properties and edges the change moved, by name: every one a created record was given, none for a deleted one.",
221
+ "Record Id": "The graph's id for the record, a deleted one's too.",
222
+ "Current": "The record as the change left it, every property by name. Absent when it was deleted."
223
+ }
189
224
  },
190
- "[\"Record Change\",[[\"action\",\"record.deleted\"],[\"type\",\"Support Ticket\"]]]": {
225
+ "Support Ticket Change": {
191
226
  "properties": {
192
- "action": {
227
+ "Id": "text",
228
+ "Kind": {
193
229
  "kind": "enum",
194
230
  "options": [
195
- "record.created",
196
- "record.updated",
197
- "record.deleted"
231
+ "created",
232
+ "updated",
233
+ "deleted"
198
234
  ]
199
235
  },
200
- "type": "text",
201
- "record": "text"
202
- },
203
- "edges": {},
204
- "displayName": "Record Change where action=record.deleted, type=Support Ticket"
205
- },
206
- "Company": {
207
- "properties": {
208
- "Name": "text",
209
- "Domains": {
236
+ "Changed Fields": {
210
237
  "kind": "list",
211
- "of": "text"
238
+ "of": {
239
+ "kind": "enum",
240
+ "options": [
241
+ "Status",
242
+ "Priority",
243
+ "Company",
244
+ "Reporter"
245
+ ]
246
+ }
212
247
  },
213
- "Stage": "text"
248
+ "Record Id": "text",
249
+ "Current": {
250
+ "kind": "maybeAbsent",
251
+ "of": {
252
+ "kind": "record",
253
+ "position": {
254
+ "kind": "position",
255
+ "position": "Support Ticket"
256
+ }
257
+ }
258
+ }
214
259
  },
215
260
  "edges": {
216
- "Team": {
217
- "target": "Person",
218
- "readable": true,
219
- "writable": true
220
- },
221
- "Support Tickets": {
261
+ "Record": {
222
262
  "target": "Support Ticket",
223
- "readable": true,
224
- "writable": true
263
+ "requiresLiveRecord": true,
264
+ "description": "The record as it is now, read from the graph: none once it is deleted."
225
265
  }
226
- }
227
- },
228
- "Person": {
229
- "properties": {
230
- "Name": "text",
231
- "Email": "text"
232
- },
233
- "edges": {}
234
- },
235
- "Support Ticket": {
236
- "properties": {
237
- "Status": "text",
238
- "Priority": "number"
239
266
  },
240
- "edges": {
241
- "Reporter": {
242
- "target": "Person",
243
- "readable": true,
244
- "writable": true
245
- }
267
+ "description": "A change to a Support Ticket in the graph: what happened (`Kind`), which properties and edges moved (`Changed Fields`), and the record as the change left it (`Current`, absent once deleted; test it present before reading through it: `exists(c.Current) AND c.Current.Status == \"Open\"`). Walk `Record` for the record as it is now.",
268
+ "fieldDocs": {
269
+ "Id": "Names the change: the same each time the graph reports it.",
270
+ "Kind": "What happened to the record.",
271
+ "Changed Fields": "The properties and edges the change moved, by name: every one a created record was given, none for a deleted one.",
272
+ "Record Id": "The graph's id for the record, a deleted one's too.",
273
+ "Current": "The record as the change left it, every property by name. Absent when it was deleted."
246
274
  }
275
+ },
276
+ "Attached Resource": {
277
+ "properties": {},
278
+ "edges": {},
279
+ "undescribed": true
247
280
  }
248
281
  },
249
- "unions": {
250
- "[\"Record Change\",[[\"type\",\"Company\"]]]": [
251
- "[\"Record Change\",[[\"action\",\"record.created\"],[\"type\",\"Company\"]]]",
252
- "[\"Record Change\",[[\"action\",\"record.updated\"],[\"type\",\"Company\"]]]",
253
- "[\"Record Change\",[[\"action\",\"record.deleted\"],[\"type\",\"Company\"]]]"
254
- ],
255
- "[\"Record Change\",[[\"type\",\"Person\"]]]": [
256
- "[\"Record Change\",[[\"action\",\"record.created\"],[\"type\",\"Person\"]]]",
257
- "[\"Record Change\",[[\"action\",\"record.updated\"],[\"type\",\"Person\"]]]",
258
- "[\"Record Change\",[[\"action\",\"record.deleted\"],[\"type\",\"Person\"]]]"
259
- ],
260
- "[\"Record Change\",[[\"type\",\"Support Ticket\"]]]": [
261
- "[\"Record Change\",[[\"action\",\"record.created\"],[\"type\",\"Support Ticket\"]]]",
262
- "[\"Record Change\",[[\"action\",\"record.updated\"],[\"type\",\"Support Ticket\"]]]",
263
- "[\"Record Change\",[[\"action\",\"record.deleted\"],[\"type\",\"Support Ticket\"]]]"
264
- ]
265
- },
266
282
  "collections": {
267
283
  "Company": {
268
284
  "target": "Company"
@@ -274,7 +290,6 @@
274
290
  "target": "Support Ticket"
275
291
  }
276
292
  },
277
- "supportsInPlaceUpdate": true,
278
293
  "writableRoots": {
279
294
  "Company": {
280
295
  "fields": {
@@ -285,35 +300,123 @@
285
300
  },
286
301
  "Stage": "text"
287
302
  },
288
- "requiredFields": [],
289
- "fuzzyResolution": true,
290
303
  "resultShape": {
291
304
  "externalId": "text",
292
- "Name": "text"
293
- }
305
+ "url": "text",
306
+ "Name": "text",
307
+ "Domains": {
308
+ "kind": "list",
309
+ "of": "text"
310
+ },
311
+ "Stage": "text"
312
+ },
313
+ "edges": {
314
+ "Team": {
315
+ "target": "Person",
316
+ "writable": true
317
+ },
318
+ "Support Tickets": {
319
+ "target": "Support Ticket",
320
+ "writable": true
321
+ },
322
+ "Resources": {
323
+ "target": "Attached Resource",
324
+ "resources": true
325
+ },
326
+ "Changes": {
327
+ "target": "Company Change",
328
+ "readable": false,
329
+ "listenable": true,
330
+ "identity": "Id",
331
+ "delivery": "connection",
332
+ "carries": [
333
+ "Company"
334
+ ],
335
+ "attributes": true,
336
+ "description": "What happens to a Company in the graph, each change once: created, updated (`Changed Fields` names what moved), deleted."
337
+ }
338
+ },
339
+ "fuzzyResolution": true
294
340
  },
295
341
  "Person": {
296
342
  "fields": {
297
343
  "Name": "text",
298
344
  "Email": "text"
299
345
  },
300
- "requiredFields": [],
301
346
  "resultShape": {
302
347
  "externalId": "text",
303
- "Name": "text"
304
- }
348
+ "url": "text",
349
+ "Name": "text",
350
+ "Email": "text"
351
+ },
352
+ "edges": {
353
+ "Companies": {
354
+ "target": "Company",
355
+ "writable": true
356
+ },
357
+ "Reported Tickets": {
358
+ "target": "Support Ticket",
359
+ "writable": true
360
+ },
361
+ "Resources": {
362
+ "target": "Attached Resource",
363
+ "resources": true
364
+ },
365
+ "Changes": {
366
+ "target": "Person Change",
367
+ "readable": false,
368
+ "listenable": true,
369
+ "identity": "Id",
370
+ "delivery": "connection",
371
+ "carries": [
372
+ "Person"
373
+ ],
374
+ "attributes": true,
375
+ "description": "What happens to a Person in the graph, each change once: created, updated (`Changed Fields` names what moved), deleted."
376
+ }
377
+ },
378
+ "fuzzyResolution": true
305
379
  },
306
380
  "Support Ticket": {
307
381
  "fields": {
308
382
  "Status": "text",
309
383
  "Priority": "number"
310
384
  },
311
- "requiredFields": [],
312
385
  "resultShape": {
313
386
  "externalId": "text",
314
- "Status": "text"
315
- }
387
+ "url": "text",
388
+ "Status": "text",
389
+ "Priority": "number"
390
+ },
391
+ "edges": {
392
+ "Reporter": {
393
+ "target": "Person",
394
+ "writable": true
395
+ },
396
+ "Company": {
397
+ "target": "Company",
398
+ "writable": true
399
+ },
400
+ "Resources": {
401
+ "target": "Attached Resource",
402
+ "resources": true
403
+ },
404
+ "Changes": {
405
+ "target": "Support Ticket Change",
406
+ "readable": false,
407
+ "listenable": true,
408
+ "identity": "Id",
409
+ "delivery": "connection",
410
+ "carries": [
411
+ "Support Ticket"
412
+ ],
413
+ "attributes": true,
414
+ "description": "What happens to a Support Ticket in the graph, each change once: created, updated (`Changed Fields` names what moved), deleted."
415
+ }
416
+ },
417
+ "fuzzyResolution": true
316
418
  }
317
- }
419
+ },
420
+ "supportsInPlaceUpdate": true
318
421
  }
319
422
  }
@@ -122,7 +122,7 @@ Message: "Logged \${count(orgs)} companies"
122
122
 
123
123
  ### Pitfalls
124
124
 
125
- - **Reaching for a loop.** "For each attachment…" is a traversal-headed block. If you're trying to enumerate, you're describing an edge to traverse.
125
+ - **Reaching for a loop.** Working through every attachment is a traversal-headed block. If you're trying to enumerate, you're describing an edge to traverse.
126
126
  - **Counting the wrong thing.** \`count\` over a *source* walk (\`count(msg-[:Attachments]->)\`) counts what the source holds; \`count\` over a bound block (\`count(orgs)\`) counts what the block *returned*. Both run — make sure you aggregate the one you mean.
127
127
  - **Reaching inside a block from outside it.** A name bound in the body — the head's alias \`a\` included — does not exist after the closing brace. \`return\` what the rest of the automation needs.`,
128
128
  engineClaims: [
@@ -30,7 +30,7 @@ const AUTHORING_TOOL_NAMES = [
30
30
  const RETIRED_SURFACE = [
31
31
  { pattern: /EXTRACT_VALUE/, label: 'EXTRACT_VALUE' },
32
32
  { pattern: /#extract/, label: '#extract' },
33
- { pattern: /\bfor each\b/, label: 'for each' },
33
+ { pattern: /\bfor\s+each\b/i, label: 'for each' },
34
34
  { pattern: /\bcallback\(/, label: 'callback(…) — buttons on the message, or a form from `@lf/forms`, then `await` the edge the answer lands on' },
35
35
  { pattern: /\bawait\s+first\(/, label: 'await first(…) — write `await x-[:Edge]->`' },
36
36
  ];
package/dist/testing.js CHANGED
@@ -72,6 +72,7 @@ const CREDENTIAL_ADAPTERS = {
72
72
  team_chat: 'slack',
73
73
  team_workspace: 'slack',
74
74
  team_telegram: 'telegram',
75
+ team_whatsapp: 'whatsapp',
75
76
  my_github: 'github',
76
77
  my_slack: 'slack',
77
78
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@listen-fire/handbook",
3
3
  "license": "Apache-2.0",
4
- "version": "0.14.0",
4
+ "version": "0.14.1",
5
5
  "description": "The movement language's handbook: the hand-written chapters, the front page, the routes into them and the language search over them. A host adds its own systems' and plugins' sections on top (the platform assembles system:* and plugin:* chapters). `testing` is the catalog every shown example is checked against, for a host's tests of its own sections.",
6
6
  "engines": {
7
7
  "node": ">=22.23.4 <23"