@listen-fire/handbook 0.15.2 → 0.16.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.
@@ -9,8 +9,8 @@
9
9
  "via": "lf catalog over a project connecting the real @lf/github module against its fake (modules/github/__test__/fake_github.ts): the whole github entry"
10
10
  },
11
11
  "slack": {
12
- "capturedAt": "2026-11-01",
13
- "via": "lf catalog over a project connecting the real @lf/slack module against fake-channels: the whole slack entry (the fake's workspace names its channels)"
12
+ "capturedAt": "2026-11-13",
13
+ "via": "lf catalog over a project connecting the real @lf/slack module against fake-channels: the whole slack entry (the fake's workspace names its channels); 0.16: the claim fields User Email, Sent By This App and Pressed By Email"
14
14
  },
15
15
  "forms": {
16
16
  "capturedAt": "2026-10-31",
@@ -22,11 +22,11 @@
22
22
  },
23
23
  "attio": {
24
24
  "capturedAt": "2026-11-01",
25
- "via": "lf catalog over a project connecting the real @lf/attio module against fake-channels (0.13: each object's records list Changes, landing on its own change type, CompanyChange, PersonChange, DealChange and FundChange; the Webhook Event, its variants and the events settings are gone); the rest of the attio entry is the platform capture"
25
+ "via": "lf catalog over a project connecting the real @lf/attio module against fake-channels (0.13: each object's records list Changes, landing on its own change type, CompanyChange, PersonChange, DealChange and FundChange; the Webhook Event, its variants and the events settings are gone); the rest of the attio entry is the platform capture; 0.16: the four change types recaptured on 2026-11-13 with Changed By"
26
26
  },
27
27
  "telegram, whatsapp, system": {
28
28
  "capturedAt": "2026-11-01",
29
- "via": "lf catalog over a project connecting the real @lf/telegram, @lf/whatsapp and @lf/system modules (offline): the whole of each entry"
29
+ "via": "lf catalog over a project connecting the real @lf/telegram, @lf/whatsapp and @lf/system modules (offline): the whole of each entry; 0.16: telegram and whatsapp recaptured on 2026-11-13 with their claim fields (Sender Email, Sender Phone)"
30
30
  },
31
31
  "gmail": {
32
32
  "capturedAt": "2026-11-02",
@@ -944,7 +944,17 @@
944
944
  "Team"
945
945
  ]
946
946
  },
947
- "Record": "text"
947
+ "Record": "text",
948
+ "Changed By": {
949
+ "kind": "maybeAbsent",
950
+ "of": {
951
+ "kind": "branded",
952
+ "of": "text",
953
+ "brands": [
954
+ "claim:attio/user_id"
955
+ ]
956
+ }
957
+ }
948
958
  },
949
959
  "edges": {
950
960
  "Company": {
@@ -958,7 +968,8 @@
958
968
  "Id": "Names the change: the same on every redelivery of it.",
959
969
  "Kind": "What happened to the company.",
960
970
  "Field": "On an update, the attribute that changed, by its title (`Stage`).",
961
- "Record": "The company's record id."
971
+ "Record": "The company's record id.",
972
+ "Changed By": "The workspace member who made the change, by their Attio member id; null for a change by an api token or Attio itself. A claim Attio vouches for: a plugin function that accepts `claim:attio/user_id` takes it where it refuses plain text."
962
973
  }
963
974
  },
964
975
  "PersonChange": {
@@ -981,7 +992,17 @@
981
992
  "Company"
982
993
  ]
983
994
  },
984
- "Record": "text"
995
+ "Record": "text",
996
+ "Changed By": {
997
+ "kind": "maybeAbsent",
998
+ "of": {
999
+ "kind": "branded",
1000
+ "of": "text",
1001
+ "brands": [
1002
+ "claim:attio/user_id"
1003
+ ]
1004
+ }
1005
+ }
985
1006
  },
986
1007
  "edges": {
987
1008
  "Person": {
@@ -995,7 +1016,8 @@
995
1016
  "Id": "Names the change: the same on every redelivery of it.",
996
1017
  "Kind": "What happened to the person.",
997
1018
  "Field": "On an update, the attribute that changed, by its title (`Stage`).",
998
- "Record": "The person's record id."
1019
+ "Record": "The person's record id.",
1020
+ "Changed By": "The workspace member who made the change, by their Attio member id; null for a change by an api token or Attio itself. A claim Attio vouches for: a plugin function that accepts `claim:attio/user_id` takes it where it refuses plain text."
999
1021
  }
1000
1022
  },
1001
1023
  "DealChange": {
@@ -1018,7 +1040,17 @@
1018
1040
  "Company"
1019
1041
  ]
1020
1042
  },
1021
- "Record": "text"
1043
+ "Record": "text",
1044
+ "Changed By": {
1045
+ "kind": "maybeAbsent",
1046
+ "of": {
1047
+ "kind": "branded",
1048
+ "of": "text",
1049
+ "brands": [
1050
+ "claim:attio/user_id"
1051
+ ]
1052
+ }
1053
+ }
1022
1054
  },
1023
1055
  "edges": {
1024
1056
  "Deal": {
@@ -1032,7 +1064,8 @@
1032
1064
  "Id": "Names the change: the same on every redelivery of it.",
1033
1065
  "Kind": "What happened to the deal.",
1034
1066
  "Field": "On an update, the attribute that changed, by its title (`Stage`).",
1035
- "Record": "The deal's record id."
1067
+ "Record": "The deal's record id.",
1068
+ "Changed By": "The workspace member who made the change, by their Attio member id; null for a change by an api token or Attio itself. A claim Attio vouches for: a plugin function that accepts `claim:attio/user_id` takes it where it refuses plain text."
1036
1069
  }
1037
1070
  },
1038
1071
  "FundChange": {
@@ -1055,7 +1088,17 @@
1055
1088
  "Advisors"
1056
1089
  ]
1057
1090
  },
1058
- "Record": "text"
1091
+ "Record": "text",
1092
+ "Changed By": {
1093
+ "kind": "maybeAbsent",
1094
+ "of": {
1095
+ "kind": "branded",
1096
+ "of": "text",
1097
+ "brands": [
1098
+ "claim:attio/user_id"
1099
+ ]
1100
+ }
1101
+ }
1059
1102
  },
1060
1103
  "edges": {
1061
1104
  "Fund": {
@@ -1069,7 +1112,8 @@
1069
1112
  "Id": "Names the change: the same on every redelivery of it.",
1070
1113
  "Kind": "What happened to the fund.",
1071
1114
  "Field": "On an update, the attribute that changed, by its title (`Stage`).",
1072
- "Record": "The fund's record id."
1115
+ "Record": "The fund's record id.",
1116
+ "Changed By": "The workspace member who made the change, by their Attio member id; null for a change by an api token or Attio itself. A claim Attio vouches for: a plugin function that accepts `claim:attio/user_id` takes it where it refuses plain text."
1073
1117
  }
1074
1118
  }
1075
1119
  },
@@ -1470,7 +1514,18 @@
1470
1514
  "Channel": "text",
1471
1515
  "Timestamp": "date",
1472
1516
  "Topic": "text",
1473
- "Mentions App": "boolean"
1517
+ "Mentions App": "boolean",
1518
+ "User Email": {
1519
+ "kind": "maybeAbsent",
1520
+ "of": {
1521
+ "kind": "branded",
1522
+ "of": "text",
1523
+ "brands": [
1524
+ "claim:email/address"
1525
+ ]
1526
+ }
1527
+ },
1528
+ "Sent By This App": "boolean"
1474
1529
  },
1475
1530
  "edges": {
1476
1531
  "Files": {
@@ -1482,7 +1537,10 @@
1482
1537
  "sequenced": "chronological",
1483
1538
  "writable": true,
1484
1539
  "listenable": true,
1485
- "cursor": false
1540
+ "cursor": false,
1541
+ "carries": [
1542
+ "Channels"
1543
+ ]
1486
1544
  },
1487
1545
  "Interactions": {
1488
1546
  "target": "Interaction",
@@ -1553,7 +1611,9 @@
1553
1611
  "Channel": "The C… channel id (read-only — a post is written along a Channel's `Messages` edge).",
1554
1612
  "Timestamp": "When the message was posted.",
1555
1613
  "Topic": "A marker of your own for a message with Buttons (`Topic: \"lunch-poll\"`), so a listen can tell its presses from other messages' presses: `listen to chat-[:Channels]->-[m:Messages WHERE m.Topic == \"lunch-poll\"]->-[:Interactions]->`. Only a message with Buttons takes one: Slack keeps no other data on a message that comes back with a press, so the Topic is stored as the id of the block its buttons sit in (`lf:<topic>`), and read back from there — on the pressed message and on a listed one alike. It is written only with Buttons, and block ids starting `lf:` are reserved for it: a message whose own Blocks use one is refused.",
1556
- "Mentions App": "Whether the message @-mentions the connected app: `listen to chat-[:Channels]->-[m:Messages WHERE m.`Mentions App` == true]->` runs when somebody asks it something."
1614
+ "Mentions App": "Whether the message @-mentions the connected app: `listen to chat-[:Channels]->-[m:Messages WHERE m.`Mentions App` == true]->` runs when somebody asks it something.",
1615
+ "User Email": "The address Slack holds for the member who sent the message, lower case; null for a member with none and for a bot. A claim Slack vouches for: a plugin function such as a team check accepts it where it refuses plain text.",
1616
+ "Sent By This App": "Whether this app itself sent the message. A listen that should not hear the app's own posts filters on NOT Sent By This App. False when Slack does not say who the app is."
1557
1617
  },
1558
1618
  "fieldIds": {
1559
1619
  "Id": "id",
@@ -1562,7 +1622,9 @@
1562
1622
  "Channel": "channel",
1563
1623
  "Timestamp": "timestamp",
1564
1624
  "Topic": "topic",
1565
- "Mentions App": "mentions_app"
1625
+ "Mentions App": "mentions_app",
1626
+ "User Email": "user_email",
1627
+ "Sent By This App": "sent_by_this_app"
1566
1628
  }
1567
1629
  },
1568
1630
  "File": {
@@ -1587,7 +1649,17 @@
1587
1649
  "Interaction": {
1588
1650
  "properties": {
1589
1651
  "Id": "text",
1590
- "At": "date"
1652
+ "At": "date",
1653
+ "Pressed By Email": {
1654
+ "kind": "maybeAbsent",
1655
+ "of": {
1656
+ "kind": "branded",
1657
+ "of": "text",
1658
+ "brands": [
1659
+ "claim:email/address"
1660
+ ]
1661
+ }
1662
+ }
1591
1663
  },
1592
1664
  "edges": {
1593
1665
  "Actions": {
@@ -1607,11 +1679,13 @@
1607
1679
  "description": "Someone pressing a button (or using another control) on a message — what `await msg-[:Interactions]->` binds, and what a listen on a message's `Interactions` runs on. `Actions` are the controls used, `By` the member who pressed, `Message` the message pressed.",
1608
1680
  "fieldDocs": {
1609
1681
  "Id": "Names this press (Slack's trigger id).",
1610
- "At": "When the press was made."
1682
+ "At": "When the press was made.",
1683
+ "Pressed By Email": "The address Slack holds for the member who pressed, lower case; null for a member with none. A claim Slack vouches for: a plugin function such as a team check accepts it where it refuses plain text."
1611
1684
  },
1612
1685
  "fieldIds": {
1613
1686
  "Id": "id",
1614
- "At": "pressed_at"
1687
+ "At": "pressed_at",
1688
+ "Pressed By Email": "pressed_by_email"
1615
1689
  }
1616
1690
  },
1617
1691
  "Action": {
@@ -1634,7 +1708,18 @@
1634
1708
  "properties": {
1635
1709
  "Emoji": "text",
1636
1710
  "Channel": "text",
1637
- "Reactor": "text"
1711
+ "Reactor": "text",
1712
+ "User Email": {
1713
+ "kind": "maybeAbsent",
1714
+ "of": {
1715
+ "kind": "branded",
1716
+ "of": "text",
1717
+ "brands": [
1718
+ "claim:email/address"
1719
+ ]
1720
+ }
1721
+ },
1722
+ "Sent By This App": "boolean"
1638
1723
  },
1639
1724
  "edges": {
1640
1725
  "Message": {
@@ -1651,12 +1736,16 @@
1651
1736
  "fieldDocs": {
1652
1737
  "Emoji": "The reaction emoji name (e.g. \"thumbsup\"), without colons. On a write along `msg-[:Reactions]->`: the single emoji to react with — required.",
1653
1738
  "Channel": "The C… channel id the reaction is in (read-only — walk the `Channel` edge for the Channel node).",
1654
- "Reactor": "The U… id of the user who added the reaction (read-only — walk the `Reactor` edge for the User node)."
1739
+ "Reactor": "The U… id of the user who added the reaction (read-only — walk the `Reactor` edge for the User node).",
1740
+ "User Email": "The address Slack holds for the member who sent the reaction, lower case; null for a member with none and for a bot. A claim Slack vouches for: a plugin function such as a team check accepts it where it refuses plain text.",
1741
+ "Sent By This App": "Whether this app itself sent the reaction. A listen that should not hear the app's own posts filters on NOT Sent By This App. False when Slack does not say who the app is."
1655
1742
  },
1656
1743
  "fieldIds": {
1657
1744
  "Emoji": "emoji",
1658
1745
  "Channel": "channel",
1659
- "Reactor": "reactor"
1746
+ "Reactor": "reactor",
1747
+ "User Email": "user_email",
1748
+ "Sent By This App": "sent_by_this_app"
1660
1749
  }
1661
1750
  },
1662
1751
  "Channel": {
@@ -1761,6 +1850,17 @@
1761
1850
  "Timestamp": "date",
1762
1851
  "Topic": "text",
1763
1852
  "Mentions App": "boolean",
1853
+ "User Email": {
1854
+ "kind": "maybeAbsent",
1855
+ "of": {
1856
+ "kind": "branded",
1857
+ "of": "text",
1858
+ "brands": [
1859
+ "claim:email/address"
1860
+ ]
1861
+ }
1862
+ },
1863
+ "Sent By This App": "boolean",
1764
1864
  "File": "file",
1765
1865
  "Blocks": {
1766
1866
  "kind": "list",
@@ -1781,7 +1881,10 @@
1781
1881
  "sequenced": "chronological",
1782
1882
  "writable": true,
1783
1883
  "listenable": true,
1784
- "cursor": false
1884
+ "cursor": false,
1885
+ "carries": [
1886
+ "Channels"
1887
+ ]
1785
1888
  },
1786
1889
  "Interactions": {
1787
1890
  "target": "Interaction",
@@ -1868,7 +1971,18 @@
1868
1971
  "url": "text",
1869
1972
  "Emoji": "text",
1870
1973
  "Channel": "text",
1871
- "Reactor": "text"
1974
+ "Reactor": "text",
1975
+ "User Email": {
1976
+ "kind": "maybeAbsent",
1977
+ "of": {
1978
+ "kind": "branded",
1979
+ "of": "text",
1980
+ "brands": [
1981
+ "claim:email/address"
1982
+ ]
1983
+ }
1984
+ },
1985
+ "Sent By This App": "boolean"
1872
1986
  },
1873
1987
  "edges": {
1874
1988
  "Message": {
@@ -2746,6 +2860,16 @@
2746
2860
  "Sender Id": "text",
2747
2861
  "Sender Username": "text",
2748
2862
  "Sender First Name": "text",
2863
+ "Sender Email": {
2864
+ "kind": "maybeAbsent",
2865
+ "of": {
2866
+ "kind": "branded",
2867
+ "of": "text",
2868
+ "brands": [
2869
+ "claim:email/address"
2870
+ ]
2871
+ }
2872
+ },
2749
2873
  "Date": "text"
2750
2874
  },
2751
2875
  "edges": {
@@ -2778,6 +2902,7 @@
2778
2902
  "Sender Id": "The numeric id of the user who sent the message.",
2779
2903
  "Sender Username": "The @username of the sender, when set.",
2780
2904
  "Sender First Name": "The sender's first name.",
2905
+ "Sender Email": "The address the sender bound to their Telegram account by the link handshake, lower case; null for a sender who has not linked. A claim Telegram vouches for: a plugin function such as a team check accepts it where it refuses plain text.",
2781
2906
  "Date": "When the message was sent (ISO-8601)."
2782
2907
  },
2783
2908
  "fieldIds": {
@@ -2789,6 +2914,7 @@
2789
2914
  "Sender Id": "sender_id",
2790
2915
  "Sender Username": "sender_username",
2791
2916
  "Sender First Name": "sender_first_name",
2917
+ "Sender Email": "sender_email",
2792
2918
  "Date": "date"
2793
2919
  }
2794
2920
  },
@@ -2869,6 +2995,16 @@
2869
2995
  "Sender Id": "text",
2870
2996
  "Sender Username": "text",
2871
2997
  "Sender First Name": "text",
2998
+ "Sender Email": {
2999
+ "kind": "maybeAbsent",
3000
+ "of": {
3001
+ "kind": "branded",
3002
+ "of": "text",
3003
+ "brands": [
3004
+ "claim:email/address"
3005
+ ]
3006
+ }
3007
+ },
2872
3008
  "Date": "text",
2873
3009
  "Reply Markup": "json"
2874
3010
  },
@@ -2905,6 +3041,16 @@
2905
3041
  "properties": {
2906
3042
  "Message Id": "text",
2907
3043
  "From": "text",
3044
+ "Sender Phone": {
3045
+ "kind": "maybeAbsent",
3046
+ "of": {
3047
+ "kind": "branded",
3048
+ "of": "text",
3049
+ "brands": [
3050
+ "claim:phone/e164"
3051
+ ]
3052
+ }
3053
+ },
2908
3054
  "To": "text",
2909
3055
  "Body": "text",
2910
3056
  "WhatsApp Id": "text",
@@ -2944,6 +3090,7 @@
2944
3090
  "fieldDocs": {
2945
3091
  "Message Id": "The WhatsApp message id — the value a reply or reaction addresses.",
2946
3092
  "From": "The sender's phone number, digits with the country code first and no plus (`447700900001`): the conversation a message is in, so a listen narrows to one by it.",
3093
+ "Sender Phone": "The sender's number with its plus (`+447700900001`), a claim WhatsApp vouches for: Meta signs the delivery. A plugin function that accepts `claim:phone/e164` takes it where it refuses plain text.",
2947
3094
  "To": "Inbound: the team's own WhatsApp business number (the message's recipient). On a send: the other party's phone number, derived from the message the write is anchored on (an inbound parent's From, a sent parent's To) — read-only either way.",
2948
3095
  "Body": "The message text. Empty for media-only messages. At least one of Body / File on a send (the Body captions the file).",
2949
3096
  "File": "A file to send (image / PDF / audio / video, routed by content type). At least one of Body / File. Send-side only: a received message's media is on its Attachments edge — read `msg-[:Attachments]->.File`.",
@@ -2955,6 +3102,7 @@
2955
3102
  "fieldIds": {
2956
3103
  "Message Id": "messageId",
2957
3104
  "From": "from",
3105
+ "Sender Phone": "senderPhone",
2958
3106
  "To": "to",
2959
3107
  "Body": "body",
2960
3108
  "WhatsApp Id": "waId",
@@ -2983,6 +3131,16 @@
2983
3131
  "Reacted Message Id": "text",
2984
3132
  "Message Id": "text",
2985
3133
  "From": "text",
3134
+ "Sender Phone": {
3135
+ "kind": "maybeAbsent",
3136
+ "of": {
3137
+ "kind": "branded",
3138
+ "of": "text",
3139
+ "brands": [
3140
+ "claim:phone/e164"
3141
+ ]
3142
+ }
3143
+ },
2986
3144
  "Profile Name": "text",
2987
3145
  "Timestamp": "text"
2988
3146
  },
@@ -2992,13 +3150,15 @@
2992
3150
  "Emoji": "The reaction emoji. Inbound: empty when the reaction was removed. On a write along msg-[:Reactions]->: the single emoji to react with — required.",
2993
3151
  "Reacted Message Id": "The message the reaction is on.",
2994
3152
  "Message Id": "The reaction event's own id.",
2995
- "From": "The reactor's phone number."
3153
+ "From": "The reactor's phone number.",
3154
+ "Sender Phone": "The reactor's number with its plus (`+447700900001`), a claim WhatsApp vouches for: Meta signs the delivery. A plugin function that accepts `claim:phone/e164` takes it where it refuses plain text."
2996
3155
  },
2997
3156
  "fieldIds": {
2998
3157
  "Emoji": "emoji",
2999
3158
  "Reacted Message Id": "reactedMessageId",
3000
3159
  "Message Id": "messageId",
3001
3160
  "From": "from",
3161
+ "Sender Phone": "senderPhone",
3002
3162
  "Profile Name": "profileName",
3003
3163
  "Timestamp": "timestamp"
3004
3164
  }
@@ -3011,13 +3171,24 @@
3011
3171
  "Address": "text",
3012
3172
  "Message Id": "text",
3013
3173
  "From": "text",
3174
+ "Sender Phone": {
3175
+ "kind": "maybeAbsent",
3176
+ "of": {
3177
+ "kind": "branded",
3178
+ "of": "text",
3179
+ "brands": [
3180
+ "claim:phone/e164"
3181
+ ]
3182
+ }
3183
+ },
3014
3184
  "Profile Name": "text",
3015
3185
  "Timestamp": "text"
3016
3186
  },
3017
3187
  "edges": {},
3018
3188
  "description": "Someone shared a location with the team number. What a listen on `Locations` delivers.",
3019
3189
  "fieldDocs": {
3020
- "Name": "The place name, when the sender picked one."
3190
+ "Name": "The place name, when the sender picked one.",
3191
+ "Sender Phone": "The sender's number with its plus (`+447700900001`), a claim WhatsApp vouches for: Meta signs the delivery. A plugin function that accepts `claim:phone/e164` takes it where it refuses plain text."
3021
3192
  },
3022
3193
  "fieldIds": {
3023
3194
  "Latitude": "latitude",
@@ -3026,6 +3197,7 @@
3026
3197
  "Address": "address",
3027
3198
  "Message Id": "messageId",
3028
3199
  "From": "from",
3200
+ "Sender Phone": "senderPhone",
3029
3201
  "Profile Name": "profileName",
3030
3202
  "Timestamp": "timestamp"
3031
3203
  }
@@ -3073,6 +3245,16 @@
3073
3245
  "url": "text",
3074
3246
  "Message Id": "text",
3075
3247
  "From": "text",
3248
+ "Sender Phone": {
3249
+ "kind": "maybeAbsent",
3250
+ "of": {
3251
+ "kind": "branded",
3252
+ "of": "text",
3253
+ "brands": [
3254
+ "claim:phone/e164"
3255
+ ]
3256
+ }
3257
+ },
3076
3258
  "To": "text",
3077
3259
  "Body": "text",
3078
3260
  "WhatsApp Id": "text",
@@ -3123,6 +3305,16 @@
3123
3305
  "Reacted Message Id": "text",
3124
3306
  "Message Id": "text",
3125
3307
  "From": "text",
3308
+ "Sender Phone": {
3309
+ "kind": "maybeAbsent",
3310
+ "of": {
3311
+ "kind": "branded",
3312
+ "of": "text",
3313
+ "brands": [
3314
+ "claim:phone/e164"
3315
+ ]
3316
+ }
3317
+ },
3126
3318
  "Profile Name": "text",
3127
3319
  "Timestamp": "text"
3128
3320
  },
@@ -33,7 +33,7 @@ import { fetchUrl } from plugins
33
33
  import { \`Log Lead\`, Lead as \`Inbound Lead\` } from "lib/intake-routines"
34
34
  \`\`\`
35
35
 
36
- - \`plugins\` — functions the platform ships, called as a function is, by position, with any other inputs in one settings record last: \`page = fetchUrl(c.website)\`, \`deck = fetchUrl(o.deck_url, { email: @user_email })\`.
36
+ - \`plugins\` — functions the platform ships, called as a function is, by position, with any other inputs in one settings record last: \`page = fetchUrl(c.website)\`, \`deck = fetchUrl(o.deck_url, { email: "deals@acme.test" })\`.
37
37
  - A quoted path — automations and record structures from another saved file. Only declarations it marks \`export\` are importable, and \`as\` renames locally.
38
38
 
39
39
  The quoted path is the other file's saved name, matched exactly — no folders, no extension, no case-folding; \`"lib/…"\` is a naming habit, not a directory. Importing from a file changes nothing about that file: its own \`listen\` lines keep firing it, and never fire yours.
@@ -64,17 +64,15 @@ if (\`Suggested Action\` != null) {
64
64
  \`\`\`
65
65
  write crm-[:Companies]-> {
66
66
  Name: msg.Subject
67
- Description ?: "Owner: \${@user_email} — forwarded in by \${@actor_name} on \${@current_date}"
67
+ Description ?: "Forwarded in on \${@current_date}"
68
68
  }
69
69
  \`\`\`
70
70
 
71
- Values that come from the run itself rather than from any record wear an \`@\` prefix and read like any other value, anywhere an expression can appear. There are eight, in three groups:
71
+ Values that come from the run itself rather than from any record wear an \`@\` prefix and read like any other value, anywhere an expression can appear. There are two:
72
72
 
73
73
  - \`@current_date\` (\`"2026-03-12"\`) and \`@current_timestamp\`, the moment the run fires, in UTC — \`Deadline: Date.addDays(@current_date, 14)\`. Every clock reading in a run gives that same moment, however long the run takes. For the date somewhere in particular, reach for \`Date.today(zone)\`.
74
- - \`@user_email\`, \`@user_name\`, \`@user_id\` — the identity the host resolves for the run: the person it acts *on behalf of*. The platform resolves it through its workspace members, \`listen-fire\` through the project. Forwarders are followed back to the real person: a message forwarded in by a teammate still names the original sender, the person whose work this is.
75
- - \`@actor_email\`, \`@actor_name\`, \`@actor_id\` — whoever literally triggered the event in the source system, exactly as it reported them, member or not.
76
74
 
77
- The two agree until a forward, relay, or service account sits between the originator and the responsible person. A meta-field the run can't resolve — an event the host maps to no identity, a source that reports no sender — is simply empty, never an error.
75
+ Who sent or pressed something is never a meta-field. A module publishes it as a field of what landed (listeners chapter, *who-acted*).
78
76
 
79
77
  ### aggregates
80
78
 
@@ -552,7 +550,7 @@ function \`Intake\`(m: <inbox-[:Emails]->>) {
552
550
  `,
553
551
  },
554
552
  {
555
- construct: 'ambient values (@user_email, @actor_*, @current_date)',
553
+ construct: 'ambient values (@current_date)',
556
554
  status: 'runs',
557
555
  probe: `
558
556
  inbox = connect \`@lf/email\`
@@ -561,7 +559,7 @@ crm = connect \`@lf/attio\` using acme
561
559
  function \`Intake\`(m: <inbox-[:Emails]->>) {
562
560
  write crm-[:Companies]-> {
563
561
  Name: m.Subject
564
- Description ?: "Owner: \${@user_email} — from \${@actor_name} on \${@current_date}"
562
+ Description ?: "Forwarded in on \${@current_date}"
565
563
  }
566
564
  }
567
565
  `,
@@ -111,7 +111,7 @@ These hold everywhere, in every chapter, and are not restated per situation:
111
111
  order the callee declares them (\`\`Log Lead\`(msg)\`), as TypeScript calls a
112
112
  function, with an optional settings record last
113
113
  (\`map(xs, (x) => x.Name, { concurrency: 2 })\`). A plugin is called the
114
- same way (\`fetchUrl(c.website)\`, \`fetchUrl(u, { email: @user_email })\`). A function, a plugin, a built-in and a
114
+ same way (\`fetchUrl(c.website)\`, \`fetchUrl(u, { email: "deals@acme.test" })\`). A function, a plugin, a built-in and a
115
115
  closure bound to a name are all called the same way. Names are exact in
116
116
  case, inside walk brackets too. Braces are declarative bodies.
117
117
  - Fields read with a dot (\`msg.Subject\`); "double quotes" are strings;
@@ -25,7 +25,7 @@ Saving the file registers its listeners; if one can't go live, the save says so.
25
25
 
26
26
  ### where-a-filter-is-judged
27
27
 
28
- A listen may filter any hop: \`chat-[ch:Channels WHERE ch.Name == "deals"]->-[m:Messages WHERE m.Message CONTAINS "intro"]->\`. A \`WHERE\` reads only its own hops and literals — never a name a run holds, \`ai(…)\`, or another walk. Each part of it is judged in one of three places:
28
+ A listen may filter any hop: \`chat-[ch:Channels WHERE ch.Name == "deals"]->-[m:Messages WHERE m.Message CONTAINS "intro"]->\`. A \`WHERE\` reads only its own hops, literals and pure calls — never a name a run holds, \`ai(…)\`, or another walk. A call is pure when it reads no clock, model or source: a built-in such as \`Text.regexExtract\`, or a host's function that declares itself pure (*who-acted*). Each part of it is judged in one of three places:
29
29
 
30
30
  - **By the system**, which sends only what matches, as it does for a read.
31
31
  - **On arrival**, against the record that landed and the records it carries: a Slack message carries its channel, a press its channel and message. Each system's chapter says what its arrivals carry.
@@ -71,28 +71,80 @@ Once the system answers again, \`listen-fire listens replay <file>:<movement> --
71
71
 
72
72
  ### who-acted
73
73
 
74
- What lands can say who acted. \`listen-fire\` and the platform both give a landing an \`Actor\`, once its system reports who acted, and a filter and a run read it like any other field:
74
+ A module publishes who acted as a **claim**: a field of what landed whose type carries a brand, \`text & Brand<"claim:email/address">\`. A module publishes a claim only when it vouches for it.
75
75
 
76
- - \`Id\` — the system's own id for them.
77
- - \`Email\` and \`Domain\` — their address in lower case, and the part after its last \`@\`.
78
- - \`Phone\` — digits only, country code first.
79
- - \`Name\` — as the system reports it.
80
- - \`Proven\` — true when the module checked that the system vouches for who it names.
76
+ - Slack: \`User Email\` on a message and a reaction, \`Pressed By Email\` on a press.
77
+ - Telegram: \`Sender Email\`. WhatsApp: \`Sender Phone\` (\`+447700900123\`). Granola: \`Note Owner Email\`. Attio: \`Changed By\`, a workspace member's id.
78
+ - Email publishes none. Its \`From\` is plain text anyone can forge.
81
79
 
82
- \`Actor\` is missing when the system names nobody, and so are all of its fields but \`Id\` and \`Proven\`, so read it with \`?.\`. A \`Domain\` is exact: \`"acme.test"\` does not match \`acme.test.example.com\`.
80
+ What a claim means to the team is a **host function**'s answer. A host offers functions as a plugin package, imported like any plugin, and a listen's filter may call one that is pure. This example uses one host's package, the platform's \`@lf-platform/team\`:
83
81
 
84
82
  \`\`\`
85
- listen to inbox-[e:Emails WHERE e.Key == "deals" AND e.Actor?.Domain == "acme.test"]-> fire \`Intake\`
83
+ import { \`@lf-platform/team\` as team } from plugins
84
+ slack = connect \`@lf/slack\` using team_workspace
85
+
86
+ function intake(m: <slack-[:Message]->>) {
87
+ write m-[:Reactions]-> { Emoji: "eyes" }
88
+ }
89
+
90
+ listen to slack-[ch:Channels WHERE ch.Name == "dealflow"]->-[m:Messages WHERE m.\`User Email\` != null AND team.isMember(m.\`User Email\`)]-> fire intake
86
91
  \`\`\`
87
92
 
88
- \`Proven\` is false for email: nothing in a message vouches for its \`From\` line. Slack, Telegram, Attio, WhatsApp and Granola set it when they name someone.
93
+ - Which functions exist is the host's choice. The platform's \`@lf-platform/team\` offers \`isMember(claim)\` and \`userFor(claim)\`; \`listen-fire\` alone offers none.
94
+ - A function takes the claim it matches. Plain text where a claim is wanted is refused, so a \`From\` line cannot be passed to \`isMember\`.
95
+ - A function may answer a record, or none. Read its field with \`?.\`: \`m.\`User Email\` != null AND team.userFor(m.\`User Email\`)?.Level == "admin"\`. Without the \`?\` it is refused, since the answer may be none.
96
+ - Write the checks that need no host first. The host is called only for a sender the cheaper terms let through, and each answer is kept.
97
+ - When the host cannot be reached, the arrival waits unjudged and nothing runs until it is judged.
98
+ - To keep a listen off the app's own posts, add \`AND NOT m.\`Sent By This App\`\` (Slack).
99
+ - To limit by domain, read it off a claim: \`Text.regexExtract(m.\`User Email\`, "@([^@]+)$", 1) == "acme.com"\`. The match is exact (\`acme.com.evil.com\` is not \`acme.com\`).
89
100
 
90
- If a system has a field of its own called \`Actor\`, that field is the one you read.
101
+ A claim can be missing (a bot, a member with no address), so test it for null before passing it on, as above. \`team.isMember(m.\`User Email\`)\` alone is refused.
91
102
 
92
103
  ### inbound-mail
93
104
 
94
105
  \`\`connect \`@lf/email\` \`\` is inbound mail. Which carrier delivers it is a setting of the deployment, not a choice an automation makes.`,
95
106
  engineClaims: [
107
+ {
108
+ construct: "a host function in a listen's filter (a claim passed to team.isMember), the app's own posts left out",
109
+ status: 'runs',
110
+ probe: `
111
+ import { \`@lf-platform/team\` as team } from plugins
112
+ slack = connect \`@lf/slack\` using team_workspace
113
+
114
+ function intake(m: <slack-[:Message]->>) {
115
+ write m-[:Reactions]-> { Emoji: "eyes" }
116
+ }
117
+
118
+ listen to slack-[ch:Channels WHERE ch.Name == "dealflow"]->-[m:Messages WHERE NOT m.\`Sent By This App\` AND m.\`User Email\` != null AND team.isMember(m.\`User Email\`)]-> fire intake
119
+ `,
120
+ },
121
+ {
122
+ construct: "a field of a host function's record answer in a listen's filter (team.userFor(…)?.Level)",
123
+ status: 'runs',
124
+ probe: `
125
+ import { \`@lf-platform/team\` as team } from plugins
126
+ slack = connect \`@lf/slack\` using team_workspace
127
+
128
+ function intake(m: <slack-[:Message]->>) {
129
+ write m-[:Reactions]-> { Emoji: "eyes" }
130
+ }
131
+
132
+ listen to slack-[ch:Channels WHERE ch.Name == "dealflow"]->-[m:Messages WHERE m.\`User Email\` != null AND team.userFor(m.\`User Email\`)?.Level == "admin"]-> fire intake
133
+ `,
134
+ },
135
+ {
136
+ construct: "a domain test off a claim with Text.regexExtract in a listen's filter",
137
+ status: 'runs',
138
+ probe: `
139
+ slack = connect \`@lf/slack\` using team_workspace
140
+
141
+ function intake(m: <slack-[:Message]->>) {
142
+ write m-[:Reactions]-> { Emoji: "eyes" }
143
+ }
144
+
145
+ listen to slack-[ch:Channels WHERE ch.Name == "dealflow"]->-[m:Messages WHERE Text.regexExtract(m.\`User Email\`, "@([^@]+)$", 1) == "acme.com"]-> fire intake
146
+ `,
147
+ },
96
148
  {
97
149
  construct: 'listen as "…" — two aliased lanes on one channel firing one movement',
98
150
  status: 'runs',
@@ -87,20 +87,14 @@ Types **always** wear angle brackets; positions, scalar values, and handles **ne
87
87
 
88
88
  ### meta-fields
89
89
 
90
- \`@\`-prefixed values from the run itself; read like any other value. Eight, in three groups:
91
-
92
- - Time: \`@current_date\` (\`YYYY-MM-DD\`), \`@current_timestamp\`.
93
- - Responsible user (forwarder-resolved — *whose work is this*): \`@user_email\`, \`@user_name\`, \`@user_id\`.
94
- - Raw originator (*who literally sent this*, unresolved): \`@actor_email\`, \`@actor_name\`, \`@actor_id\`.
95
-
96
- A meta-field the run can't resolve is simply empty.
90
+ \`@\`-prefixed values from the run itself; read like any other value. Two: \`@current_date\` (\`YYYY-MM-DD\`) and \`@current_timestamp\`.
97
91
 
98
92
  ### writes
99
93
 
100
94
  \`\`\`
101
95
  company = write crm-[:Companies]-> {
102
96
  Name: msg.Subject # plain — overwrites every run
103
- Owner ?: @user_email # set-if-empty — leaves an existing value alone
97
+ Owner ?: msg.From # set-if-empty — leaves an existing value alone
104
98
  Tags +: ["inbound"] # append to a multi-value field (duplicates allowed)
105
99
  Sources +?:["email"] # append only what's missing (set-union)
106
100
  ?...e # every field of e (extracted, <Decl>-typed, or a graph), set-if-empty; \`...e\`: plain
@@ -55,14 +55,14 @@ Read the message's \`From\` for this, not its \`To\` — on a forward, \`To\` is
55
55
  The substance of a dealflow message is in the deck, and a deck arrives two ways. Read **both**:
56
56
 
57
57
  \`\`\`
58
- decks = vcUrlRetrieval(msg.Body, { email: @user_email })
58
+ decks = vcUrlRetrieval(msg.Body, { email: "deals@acme.test" })
59
59
  content = [msg.Body, ...msg-[a:Attachments]->.File, ...map(decks, (d) => coalesce(d.text, ""))]
60
60
  companies = extract(content, Company, { tier: "careful" })
61
61
  \`\`\`
62
62
 
63
63
  The content carries the body *and* the attached files (a PDF, a slide deck, a voice note whose spoken words are transcribed). \`vcUrlRetrieval\` covers the other channel — it finds the deck *links* in the body, works out which are decks, and loads them. Extract from the body alone and the deck never reaches the model.
64
64
 
65
- The \`email\` argument gets past an *enter your email to view* gate. \`@user_email\` — the team member responsible for the run, resolved through forwarders — is right almost always; reach for \`@actor_email\`, the raw sender of the triggering message, only when the gated link was shared with that sender rather than with the team.
65
+ The \`email\` argument gets past an *enter your email to view* gate. Give it an address the team reads, as above.
66
66
 
67
67
  Everything after the extraction is the ordinary shape: each founder written along their company's own edge, names matched with \`FUZZY\`. The extraction and patterns chapters carry it.
68
68
  `,
@@ -90,7 +90,7 @@ node Introducer: "the person who sent or forwarded this message to us" {
90
90
  }
91
91
 
92
92
  function \`Log Dealflow\`(msg: <inbox-[:Emails]->>) {
93
- decks = vcUrlRetrieval(msg.Body, { email: @user_email })
93
+ decks = vcUrlRetrieval(msg.Body, { email: "deals@acme.test" })
94
94
  content = [msg.Body, ...msg-[a:Attachments]->.File, ...map(decks, (d) => coalesce(d.text, ""))]
95
95
  companies = extract(content, Company, { tier: "careful" })
96
96
  introducer = extractOne(content, Introducer, { tier: "careful" })
@@ -55,7 +55,7 @@ changed = was != null && was.Domains != company.Domains
55
55
  write crm-[:Companies]-> {
56
56
  unique by (Name)
57
57
  Name: msg.Subject
58
- Description ?: "Owner: \${@user_email}"
58
+ Description ?: "Filed on \${@current_date}"
59
59
  }
60
60
  \`\`\`
61
61
 
@@ -83,7 +83,7 @@ A few fields take a **structured value** — an object with named keys, nested a
83
83
  \`\`\`
84
84
  Layout: {
85
85
  heading: "\${company.Name} is ready",
86
- blocks: [{ kind: "text", value: "Approved by \${@user_email}" }]
86
+ blocks: [{ kind: "text", value: "Approved on \${@current_date}" }]
87
87
  }
88
88
  \`\`\`
89
89
 
@@ -347,7 +347,7 @@ function \`Intake\`(m: <inbox-[:Emails]->>) {
347
347
  write crm-[:Companies]-> {
348
348
  unique by (Name)
349
349
  Name: m.Subject
350
- Description ?: "Owner: \${@user_email}"
350
+ Description ?: "Filed on \${@current_date}"
351
351
  }
352
352
  }
353
353
  `,
package/dist/testing.js CHANGED
@@ -94,6 +94,37 @@ const CAPTURED_PACKAGES = {
94
94
  forms: '@lf/forms',
95
95
  gmail: '@lf/gmail',
96
96
  };
97
+ const EMAIL_CLAIM = { kind: 'branded', of: 'text', brands: ['claim:email/address'] };
98
+ /**
99
+ * A host's functions, as the examples meet them: the team a platform serves
100
+ * (`import { \`@lf-platform/team\` as team } from plugins`). Whether a host
101
+ * offers any, and which, is its own choice; the language only reads what a
102
+ * plugin package declares.
103
+ */
104
+ const TEAM_PLUGINS = {
105
+ '@lf-platform/team/isMember': {
106
+ args: ['claim'],
107
+ requiredArgs: ['claim'],
108
+ argTypes: { claim: EMAIL_CLAIM },
109
+ priced: false,
110
+ effects: {},
111
+ output: { kind: 'value', type: 'boolean' },
112
+ package: '@lf-platform/team',
113
+ name: 'isMember',
114
+ pure: true,
115
+ },
116
+ '@lf-platform/team/userFor': {
117
+ args: ['claim'],
118
+ requiredArgs: ['claim'],
119
+ argTypes: { claim: EMAIL_CLAIM },
120
+ priced: false,
121
+ effects: {},
122
+ output: { kind: 'record', fields: { Id: 'text', Email: EMAIL_CLAIM, Name: 'text', Level: { kind: 'enum', options: ['read', 'write', 'admin'] } }, maybeAbsent: true },
123
+ package: '@lf-platform/team',
124
+ name: 'userFor',
125
+ pure: true,
126
+ },
127
+ };
97
128
  /** The snapshot a run of any example would be handed. */
98
129
  exports.HANDBOOK_CATALOG = (0, movement_lang_1.mockCatalogSnapshot)({
99
130
  adapters: {
@@ -107,7 +138,7 @@ exports.HANDBOOK_CATALOG = (0, movement_lang_1.mockCatalogSnapshot)({
107
138
  // The real registry, not a hand-kept copy: a chapter teaching an argument
108
139
  // the plugin doesn't accept fails here rather than passing against a
109
140
  // literal someone remembered to update.
110
- plugins: (0, plugins_1.bundledPluginSpecs)(),
141
+ plugins: { ...(0, plugins_1.bundledPluginSpecs)(), ...TEAM_PLUGINS },
111
142
  });
112
143
  /**
113
144
  * Probes deliberately NOT checked, each with the reason. A probe belongs here
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.15.2",
4
+ "version": "0.16.0",
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"
@@ -21,9 +21,9 @@
21
21
  },
22
22
  "type": "commonjs",
23
23
  "peerDependencies": {
24
- "@listen-fire/engine": ">=0.15.0 <1.0.0",
25
- "@listen-fire/engine-contracts": ">=0.15.0 <1.0.0",
26
- "@listen-fire/movement-lang": ">=0.15.0 <1.0.0"
24
+ "@listen-fire/engine": ">=0.16.0 <1.0.0",
25
+ "@listen-fire/engine-contracts": ">=0.16.0 <1.0.0",
26
+ "@listen-fire/movement-lang": ">=0.16.0 <1.0.0"
27
27
  },
28
28
  "devDependencies": {
29
29
  "@types/jest": "29.5.14",