@hraness/message-like-me 0.8.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.
Files changed (56) hide show
  1. package/CHANGELOG.md +151 -0
  2. package/LICENSE +21 -0
  3. package/README.md +698 -0
  4. package/SECURITY.md +318 -0
  5. package/dist/agentic-messaging-v1.d.ts +179 -0
  6. package/dist/agentic-messaging-v1.js +52 -0
  7. package/dist/canonical-json.d.ts +3 -0
  8. package/dist/cli-bs3db5jr.js +643 -0
  9. package/dist/cli-d7qv38ab.js +485 -0
  10. package/dist/cli-kw20gkk3.js +5 -0
  11. package/dist/cli-qqafdvz9.js +5 -0
  12. package/dist/cli-ry4128kz.js +584 -0
  13. package/dist/cli-ththzwja.js +20 -0
  14. package/dist/cli-x1qncxm7.js +1078 -0
  15. package/dist/cli.js +9436 -0
  16. package/dist/ensoul-source-v1.d.ts +121 -0
  17. package/dist/ensoul-source-v1.js +24 -0
  18. package/dist/index.d.ts +3 -0
  19. package/dist/index.js +47 -0
  20. package/dist/message-bundle-v1-identity.d.ts +2 -0
  21. package/dist/message-bundle-v1.d.ts +205 -0
  22. package/dist/message-bundle-v1.js +37 -0
  23. package/dist/message-bundle-v2-identity.d.ts +2 -0
  24. package/dist/message-bundle-v2.d.ts +215 -0
  25. package/dist/message-bundle-v2.js +43 -0
  26. package/dist/metrics.d.ts +41 -0
  27. package/dist/types.d.ts +568 -0
  28. package/docs/local-message-bundle-v1.md +245 -0
  29. package/docs/local-message-bundle-v2.md +167 -0
  30. package/docs/methodology.md +322 -0
  31. package/docs/research.md +164 -0
  32. package/package.json +82 -0
  33. package/schema/ensoul-messages-source-v1.schema.json +248 -0
  34. package/schema/local-message-bundle-v1.schema.json +449 -0
  35. package/schema/local-message-bundle-v2.schema.json +462 -0
  36. package/schema/style-profile-v1.schema.json +223 -0
  37. package/schema/style-profile-v2.schema.json +202 -0
  38. package/skills/ensoul/LICENSE +23 -0
  39. package/skills/ensoul/NOTICE.md +7 -0
  40. package/skills/ensoul/SKILL.md +226 -0
  41. package/skills/ensoul/VENDORED_FROM.md +7 -0
  42. package/skills/ensoul/agents/openai.yaml +4 -0
  43. package/skills/ensoul/references/ensoul-source-packet-v1.schema.json +187 -0
  44. package/skills/ensoul/references/evidence-method.md +148 -0
  45. package/skills/ensoul/references/output-blueprint.md +143 -0
  46. package/skills/ensoul/references/source-packets.md +139 -0
  47. package/skills/ensoul/scripts/prepare_x_archive.py +467 -0
  48. package/skills/ensoul/scripts/validate_source_packet.py +477 -0
  49. package/skills/message-like-me/SKILL.md +229 -0
  50. package/skills/message-like-me/agents/openai.yaml +4 -0
  51. package/skills/message-like-me/references/analysis.md +159 -0
  52. package/skills/message-like-me/references/drafting.md +86 -0
  53. package/skills/message-like-me/references/ensoul.md +94 -0
  54. package/skills/message-like-me/references/evaluation.md +81 -0
  55. package/skills/message-like-me/references/privacy.md +106 -0
  56. package/skills/message-like-me/references/profile-schema.md +148 -0
@@ -0,0 +1,449 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://messagelikeme.com/schema/local-message-bundle-v1.schema.json",
4
+ "title": "Message Like Me local message bundle v1 JSON objects",
5
+ "description": "Validates manifest.json or one NDJSON record. Runtime validation additionally enforces canonical UTF-8 bytes, filesystem safety, byte bounds, digests, account realms, identity joins, and graph laws.",
6
+ "oneOf": [
7
+ { "$ref": "#/$defs/manifest" },
8
+ { "$ref": "#/$defs/account" },
9
+ { "$ref": "#/$defs/participant" },
10
+ { "$ref": "#/$defs/conversation" },
11
+ { "$ref": "#/$defs/message" },
12
+ { "$ref": "#/$defs/reaction" },
13
+ { "$ref": "#/$defs/tombstone" }
14
+ ],
15
+ "$defs": {
16
+ "identifier": {
17
+ "type": "string",
18
+ "minLength": 1,
19
+ "maxLength": 1024,
20
+ "pattern": "^[^\\u0000-\\u001F\\u007F]+$",
21
+ "description": "Runtime bound is 1,024 UTF-8 bytes."
22
+ },
23
+ "shortText": {
24
+ "type": "string",
25
+ "maxLength": 8192,
26
+ "pattern": "^[^\\u0000]*$",
27
+ "description": "Runtime bound is 8 KiB UTF-8."
28
+ },
29
+ "mimeType": {
30
+ "type": "string",
31
+ "maxLength": 256,
32
+ "pattern": "^[^\\u0000]*$",
33
+ "description": "Runtime bound is 256 UTF-8 bytes."
34
+ },
35
+ "body": {
36
+ "type": "string",
37
+ "maxLength": 1048576,
38
+ "pattern": "^[^\\u0000]*$",
39
+ "description": "Runtime bound is 1 MiB UTF-8."
40
+ },
41
+ "token": {
42
+ "type": "string",
43
+ "maxLength": 128,
44
+ "pattern": "^[a-z0-9](?:[a-z0-9._+\\-]*[a-z0-9])?$"
45
+ },
46
+ "network": {
47
+ "type": "string",
48
+ "maxLength": 64,
49
+ "pattern": "^[a-z0-9](?:[a-z0-9._+\\-]*[a-z0-9])?$"
50
+ },
51
+ "version": {
52
+ "type": "string",
53
+ "maxLength": 128,
54
+ "pattern": "^[A-Za-z0-9](?:[A-Za-z0-9._+\\-]*[A-Za-z0-9])?$"
55
+ },
56
+ "timestamp": {
57
+ "type": "string",
58
+ "format": "date-time",
59
+ "maxLength": 64,
60
+ "description": "Runtime requires exact canonical Date#toISOString() millisecond UTC text."
61
+ },
62
+ "digest": {
63
+ "type": "string",
64
+ "pattern": "^[a-f0-9]{64}$"
65
+ },
66
+ "nullableIdentifier": {
67
+ "oneOf": [
68
+ { "type": "null" },
69
+ { "$ref": "#/$defs/identifier" }
70
+ ]
71
+ },
72
+ "nullableShortText": {
73
+ "oneOf": [
74
+ { "type": "null" },
75
+ { "$ref": "#/$defs/shortText" }
76
+ ]
77
+ },
78
+ "nullableMimeType": {
79
+ "oneOf": [
80
+ { "type": "null" },
81
+ { "$ref": "#/$defs/mimeType" }
82
+ ]
83
+ },
84
+ "nullableTimestamp": {
85
+ "oneOf": [
86
+ { "type": "null" },
87
+ { "$ref": "#/$defs/timestamp" }
88
+ ]
89
+ },
90
+ "provenance": {
91
+ "type": "object",
92
+ "additionalProperties": false,
93
+ "required": [
94
+ "providerId",
95
+ "providerRevision",
96
+ "observedAt",
97
+ "connectedAccountProviderId"
98
+ ],
99
+ "properties": {
100
+ "providerId": { "$ref": "#/$defs/identifier" },
101
+ "providerRevision": { "$ref": "#/$defs/nullableIdentifier" },
102
+ "observedAt": { "$ref": "#/$defs/timestamp" },
103
+ "connectedAccountProviderId": { "$ref": "#/$defs/identifier" }
104
+ }
105
+ },
106
+ "common": {
107
+ "type": "object",
108
+ "required": ["schemaVersion", "kind", "id", "accountId", "network", "provenance"],
109
+ "properties": {
110
+ "schemaVersion": { "const": 1 },
111
+ "kind": {
112
+ "enum": ["account", "participant", "conversation", "message", "reaction", "tombstone"]
113
+ },
114
+ "id": { "$ref": "#/$defs/identifier" },
115
+ "accountId": { "$ref": "#/$defs/identifier" },
116
+ "network": { "$ref": "#/$defs/network" },
117
+ "provenance": { "$ref": "#/$defs/provenance" }
118
+ }
119
+ },
120
+ "account": {
121
+ "allOf": [{ "$ref": "#/$defs/common" }],
122
+ "type": "object",
123
+ "unevaluatedProperties": false,
124
+ "required": ["displayName", "handle", "selfParticipantId"],
125
+ "properties": {
126
+ "kind": { "const": "account" },
127
+ "displayName": { "$ref": "#/$defs/nullableShortText" },
128
+ "handle": { "$ref": "#/$defs/nullableShortText" },
129
+ "selfParticipantId": { "$ref": "#/$defs/identifier" }
130
+ }
131
+ },
132
+ "participant": {
133
+ "allOf": [{ "$ref": "#/$defs/common" }],
134
+ "type": "object",
135
+ "unevaluatedProperties": false,
136
+ "required": ["displayName", "handle", "isSelf"],
137
+ "properties": {
138
+ "kind": { "const": "participant" },
139
+ "displayName": { "$ref": "#/$defs/nullableShortText" },
140
+ "handle": { "$ref": "#/$defs/nullableShortText" },
141
+ "isSelf": { "type": "boolean" }
142
+ }
143
+ },
144
+ "conversation": {
145
+ "allOf": [{ "$ref": "#/$defs/common" }],
146
+ "type": "object",
147
+ "unevaluatedProperties": false,
148
+ "required": [
149
+ "type",
150
+ "title",
151
+ "participantIds",
152
+ "participantsComplete",
153
+ "startedAt",
154
+ "lastMessageAt"
155
+ ],
156
+ "properties": {
157
+ "kind": { "const": "conversation" },
158
+ "type": { "enum": ["direct", "group", "channel", "unknown"] },
159
+ "title": { "$ref": "#/$defs/nullableShortText" },
160
+ "participantIds": {
161
+ "type": "array",
162
+ "maxItems": 10000,
163
+ "uniqueItems": true,
164
+ "items": { "$ref": "#/$defs/identifier" }
165
+ },
166
+ "participantsComplete": { "type": ["boolean", "null"] },
167
+ "startedAt": { "$ref": "#/$defs/nullableTimestamp" },
168
+ "lastMessageAt": { "$ref": "#/$defs/nullableTimestamp" }
169
+ }
170
+ },
171
+ "attachment": {
172
+ "type": "object",
173
+ "additionalProperties": false,
174
+ "required": ["kind", "mimeType", "name", "sizeBytes"],
175
+ "properties": {
176
+ "kind": { "enum": ["audio", "document", "image", "link", "sticker", "video", "unknown"] },
177
+ "mimeType": { "$ref": "#/$defs/nullableMimeType" },
178
+ "name": { "$ref": "#/$defs/nullableShortText" },
179
+ "sizeBytes": {
180
+ "oneOf": [
181
+ { "type": "null" },
182
+ { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }
183
+ ]
184
+ }
185
+ }
186
+ },
187
+ "reply": {
188
+ "type": "object",
189
+ "additionalProperties": false,
190
+ "required": ["messageId", "providerId"],
191
+ "properties": {
192
+ "messageId": { "$ref": "#/$defs/nullableIdentifier" },
193
+ "providerId": { "$ref": "#/$defs/identifier" }
194
+ }
195
+ },
196
+ "editInPlace": {
197
+ "type": "object",
198
+ "additionalProperties": false,
199
+ "required": ["kind", "editedAt", "providerRevision"],
200
+ "properties": {
201
+ "kind": { "const": "in-place" },
202
+ "editedAt": { "$ref": "#/$defs/timestamp" },
203
+ "providerRevision": { "$ref": "#/$defs/identifier" }
204
+ }
205
+ },
206
+ "editReplacement": {
207
+ "type": "object",
208
+ "additionalProperties": false,
209
+ "required": ["kind", "replacesMessageId", "replacesProviderId", "editedAt", "providerRevision"],
210
+ "properties": {
211
+ "kind": { "const": "replacement" },
212
+ "replacesMessageId": { "$ref": "#/$defs/nullableIdentifier" },
213
+ "replacesProviderId": { "$ref": "#/$defs/identifier" },
214
+ "editedAt": { "$ref": "#/$defs/timestamp" },
215
+ "providerRevision": { "$ref": "#/$defs/identifier" }
216
+ }
217
+ },
218
+ "deletion": {
219
+ "type": "object",
220
+ "additionalProperties": false,
221
+ "required": ["state", "observedAt", "providerRevision"],
222
+ "properties": {
223
+ "state": { "enum": ["revoked", "deleted-for-me", "revoked-and-deleted-for-me"] },
224
+ "observedAt": { "$ref": "#/$defs/timestamp" },
225
+ "providerRevision": { "$ref": "#/$defs/nullableIdentifier" }
226
+ }
227
+ },
228
+ "message": {
229
+ "allOf": [{ "$ref": "#/$defs/common" }],
230
+ "type": "object",
231
+ "unevaluatedProperties": false,
232
+ "required": [
233
+ "conversationId",
234
+ "senderParticipantId",
235
+ "direction",
236
+ "sentAt",
237
+ "sortKey",
238
+ "body",
239
+ "bodyTruncated",
240
+ "replyTo",
241
+ "edit",
242
+ "deletion",
243
+ "attachments"
244
+ ],
245
+ "properties": {
246
+ "kind": { "const": "message" },
247
+ "conversationId": { "$ref": "#/$defs/identifier" },
248
+ "senderParticipantId": { "$ref": "#/$defs/nullableIdentifier" },
249
+ "direction": { "enum": ["incoming", "outgoing", "unknown"] },
250
+ "sentAt": { "$ref": "#/$defs/timestamp" },
251
+ "sortKey": { "$ref": "#/$defs/identifier" },
252
+ "body": {
253
+ "oneOf": [
254
+ { "type": "null" },
255
+ { "$ref": "#/$defs/body" }
256
+ ]
257
+ },
258
+ "bodyTruncated": { "type": ["boolean", "null"] },
259
+ "replyTo": {
260
+ "oneOf": [
261
+ { "type": "null" },
262
+ { "$ref": "#/$defs/reply" }
263
+ ]
264
+ },
265
+ "edit": {
266
+ "oneOf": [
267
+ { "type": "null" },
268
+ { "$ref": "#/$defs/editInPlace" },
269
+ { "$ref": "#/$defs/editReplacement" }
270
+ ]
271
+ },
272
+ "deletion": {
273
+ "oneOf": [
274
+ { "type": "null" },
275
+ { "$ref": "#/$defs/deletion" }
276
+ ]
277
+ },
278
+ "attachments": {
279
+ "type": "array",
280
+ "maxItems": 256,
281
+ "items": { "$ref": "#/$defs/attachment" }
282
+ }
283
+ }
284
+ },
285
+ "reaction": {
286
+ "allOf": [{ "$ref": "#/$defs/common" }],
287
+ "type": "object",
288
+ "unevaluatedProperties": false,
289
+ "required": ["messageId", "messageProviderId", "participantId", "body", "reactedAt", "state"],
290
+ "properties": {
291
+ "kind": { "const": "reaction" },
292
+ "messageId": { "$ref": "#/$defs/nullableIdentifier" },
293
+ "messageProviderId": { "$ref": "#/$defs/identifier" },
294
+ "participantId": { "$ref": "#/$defs/nullableIdentifier" },
295
+ "body": { "$ref": "#/$defs/shortText" },
296
+ "reactedAt": { "$ref": "#/$defs/nullableTimestamp" },
297
+ "state": { "enum": ["active", "removed"] }
298
+ }
299
+ },
300
+ "tombstone": {
301
+ "allOf": [{ "$ref": "#/$defs/common" }],
302
+ "type": "object",
303
+ "unevaluatedProperties": false,
304
+ "required": ["entityKind", "entityId", "entityProviderId", "deletedAt", "scope", "providerRevision"],
305
+ "properties": {
306
+ "kind": { "const": "tombstone" },
307
+ "entityKind": { "enum": ["conversation", "message", "reaction"] },
308
+ "entityId": { "$ref": "#/$defs/nullableIdentifier" },
309
+ "entityProviderId": { "$ref": "#/$defs/identifier" },
310
+ "deletedAt": { "$ref": "#/$defs/timestamp" },
311
+ "scope": { "enum": ["remote", "local", "unknown"] },
312
+ "providerRevision": { "$ref": "#/$defs/nullableIdentifier" }
313
+ }
314
+ },
315
+ "artifact": {
316
+ "type": "object",
317
+ "additionalProperties": false,
318
+ "required": ["path", "mediaType", "recordKind", "records", "bytes", "sha256"],
319
+ "properties": {
320
+ "path": { "enum": ["accounts.ndjson", "participants.ndjson", "conversations.ndjson", "messages.ndjson", "reactions.ndjson", "tombstones.ndjson"] },
321
+ "mediaType": { "const": "application/x-ndjson" },
322
+ "recordKind": { "enum": ["account", "participant", "conversation", "message", "reaction", "tombstone"] },
323
+ "records": { "type": "integer", "minimum": 0, "maximum": 500000 },
324
+ "bytes": { "type": "integer", "minimum": 0, "maximum": 536870912 },
325
+ "sha256": { "$ref": "#/$defs/digest" }
326
+ }
327
+ },
328
+ "manifest": {
329
+ "type": "object",
330
+ "additionalProperties": false,
331
+ "required": [
332
+ "schemaVersion",
333
+ "format",
334
+ "source",
335
+ "provider",
336
+ "timestamps",
337
+ "completeness",
338
+ "warnings",
339
+ "privacy",
340
+ "counts",
341
+ "artifacts",
342
+ "integrity"
343
+ ],
344
+ "properties": {
345
+ "schemaVersion": { "const": 1 },
346
+ "format": { "const": "message-like-me.local-message-bundle" },
347
+ "source": {
348
+ "type": "object",
349
+ "additionalProperties": false,
350
+ "required": ["id", "version"],
351
+ "properties": {
352
+ "id": { "const": "beeper-local" },
353
+ "version": {
354
+ "const": "1.1.0",
355
+ "description": "Message Like Me v1 source-transform compatibility coordinate."
356
+ }
357
+ }
358
+ },
359
+ "provider": {
360
+ "type": "object",
361
+ "additionalProperties": false,
362
+ "required": ["id", "version"],
363
+ "properties": {
364
+ "id": { "const": "beeper" },
365
+ "version": { "$ref": "#/$defs/version" }
366
+ }
367
+ },
368
+ "timestamps": {
369
+ "type": "object",
370
+ "additionalProperties": false,
371
+ "required": ["startedAt", "finishedAt", "createdAt"],
372
+ "properties": {
373
+ "startedAt": { "$ref": "#/$defs/timestamp" },
374
+ "finishedAt": { "$ref": "#/$defs/timestamp" },
375
+ "createdAt": { "$ref": "#/$defs/timestamp" }
376
+ }
377
+ },
378
+ "completeness": {
379
+ "type": "object",
380
+ "additionalProperties": false,
381
+ "required": ["kind", "reason", "observedFrom", "observedThrough"],
382
+ "properties": {
383
+ "kind": { "enum": ["bounded-local", "truncated", "unknown"] },
384
+ "reason": {
385
+ "oneOf": [
386
+ { "type": "null" },
387
+ { "$ref": "#/$defs/token" }
388
+ ]
389
+ },
390
+ "observedFrom": { "$ref": "#/$defs/nullableTimestamp" },
391
+ "observedThrough": { "$ref": "#/$defs/nullableTimestamp" }
392
+ }
393
+ },
394
+ "warnings": {
395
+ "type": "array",
396
+ "maxItems": 128,
397
+ "uniqueItems": true,
398
+ "items": { "$ref": "#/$defs/token" }
399
+ },
400
+ "privacy": {
401
+ "type": "object",
402
+ "additionalProperties": false,
403
+ "required": ["classification", "attachments", "providerUrls", "credentials"],
404
+ "properties": {
405
+ "classification": { "const": "private-local" },
406
+ "attachments": { "const": "metadata-only" },
407
+ "providerUrls": { "const": "excluded" },
408
+ "credentials": { "const": "excluded" }
409
+ }
410
+ },
411
+ "counts": {
412
+ "type": "object",
413
+ "additionalProperties": false,
414
+ "required": ["account", "participant", "conversation", "message", "reaction", "tombstone"],
415
+ "properties": {
416
+ "account": { "type": "integer", "minimum": 0, "maximum": 128 },
417
+ "participant": { "type": "integer", "minimum": 0, "maximum": 500000 },
418
+ "conversation": { "type": "integer", "minimum": 0, "maximum": 500000 },
419
+ "message": { "type": "integer", "minimum": 0, "maximum": 500000 },
420
+ "reaction": { "type": "integer", "minimum": 0, "maximum": 500000 },
421
+ "tombstone": { "type": "integer", "minimum": 0, "maximum": 500000 }
422
+ }
423
+ },
424
+ "artifacts": {
425
+ "type": "array",
426
+ "minItems": 6,
427
+ "maxItems": 6,
428
+ "prefixItems": [
429
+ { "allOf": [{ "$ref": "#/$defs/artifact" }, { "type": "object", "properties": { "path": { "const": "accounts.ndjson" }, "recordKind": { "const": "account" } } }] },
430
+ { "allOf": [{ "$ref": "#/$defs/artifact" }, { "type": "object", "properties": { "path": { "const": "participants.ndjson" }, "recordKind": { "const": "participant" } } }] },
431
+ { "allOf": [{ "$ref": "#/$defs/artifact" }, { "type": "object", "properties": { "path": { "const": "conversations.ndjson" }, "recordKind": { "const": "conversation" } } }] },
432
+ { "allOf": [{ "$ref": "#/$defs/artifact" }, { "type": "object", "properties": { "path": { "const": "messages.ndjson" }, "recordKind": { "const": "message" } } }] },
433
+ { "allOf": [{ "$ref": "#/$defs/artifact" }, { "type": "object", "properties": { "path": { "const": "reactions.ndjson" }, "recordKind": { "const": "reaction" } } }] },
434
+ { "allOf": [{ "$ref": "#/$defs/artifact" }, { "type": "object", "properties": { "path": { "const": "tombstones.ndjson" }, "recordKind": { "const": "tombstone" } } }] }
435
+ ]
436
+ },
437
+ "integrity": {
438
+ "type": "object",
439
+ "additionalProperties": false,
440
+ "required": ["algorithm", "bundleSha256"],
441
+ "properties": {
442
+ "algorithm": { "const": "sha256" },
443
+ "bundleSha256": { "$ref": "#/$defs/digest" }
444
+ }
445
+ }
446
+ }
447
+ }
448
+ }
449
+ }