@joe-broadhead/opencode-mem 0.12.5 → 0.13.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 (59) hide show
  1. package/CHANGELOG.md +85 -0
  2. package/README.md +1 -0
  3. package/package.json +10 -2
  4. package/src/collector.js +23 -5
  5. package/src/plugins/source-contract/index.js +2 -2
  6. package/src/plugins/source-contract/vendor/PROVENANCE.json +9 -9
  7. package/src/plugins/source-contract/vendor/RELEASE-SHA256SUMS +3 -3
  8. package/src/plugins/source-contract/vendor/RELEASE.json +9 -9
  9. package/src/plugins/source-contract/vendor/SHA256SUMS +36 -29
  10. package/src/plugins/source-contract/vendor/broker-client.js +14 -14
  11. package/src/plugins/source-contract/vendor/chunks/{chunk-JUWIMDGF.js → chunk-6ZSJSJMV.js} +2 -2
  12. package/src/plugins/source-contract/vendor/chunks/{chunk-77MJETEE.js → chunk-A2KM6BYK.js} +13 -13
  13. package/src/plugins/source-contract/vendor/chunks/{chunk-HVBOAYBO.js → chunk-BEU3WWNO.js} +59 -6
  14. package/src/plugins/source-contract/vendor/chunks/{chunk-T4QM7B3S.js → chunk-CUITXC5J.js} +1 -1
  15. package/src/{vendor/source-contract/chunks/chunk-OZMX7VR7.js → plugins/source-contract/vendor/chunks/chunk-EOS4LD6F.js} +1 -1
  16. package/src/plugins/source-contract/vendor/chunks/{chunk-F4K2Y64D.js → chunk-EUDLXWG4.js} +1 -1
  17. package/src/plugins/source-contract/vendor/chunks/{chunk-BOUWB5UP.js → chunk-GDBKZBG7.js} +2 -2
  18. package/src/plugins/source-contract/vendor/chunks/{chunk-EHIOPXPL.js → chunk-HR22TL23.js} +14 -14
  19. package/src/plugins/source-contract/vendor/chunks/{chunk-X6XP7YK2.js → chunk-IGPRJ63D.js} +2 -2
  20. package/src/plugins/source-contract/vendor/chunks/{chunk-XVA6H6OO.js → chunk-IIUWLSGP.js} +2 -2
  21. package/src/plugins/source-contract/vendor/chunks/chunk-ITQZIF2U.js +191 -0
  22. package/src/plugins/source-contract/vendor/chunks/{chunk-IL565TRX.js → chunk-KXQYSM2Z.js} +1 -1
  23. package/src/plugins/source-contract/vendor/chunks/{chunk-YH323FAZ.js → chunk-LJL3EALP.js} +238 -12
  24. package/src/plugins/source-contract/vendor/chunks/{chunk-NUEROZNU.js → chunk-NUBUQFLH.js} +1 -1
  25. package/src/plugins/source-contract/vendor/cursor.js +3 -3
  26. package/src/plugins/source-contract/vendor/descriptor.js +11 -11
  27. package/src/plugins/source-contract/vendor/events.js +22 -4
  28. package/src/plugins/source-contract/vendor/hints.js +33 -0
  29. package/src/plugins/source-contract/vendor/index.js +3 -3
  30. package/src/plugins/source-contract/vendor/params.js +3 -3
  31. package/src/plugins/source-contract/vendor/permission.js +3 -3
  32. package/src/plugins/source-contract/vendor/pick.js +5 -5
  33. package/src/plugins/source-contract/vendor/read.js +14 -14
  34. package/src/plugins/source-contract/vendor/registry.js +4 -4
  35. package/src/plugins/source-contract/vendor/schema.js +14 -10
  36. package/src/plugins/source-contract/vendor/schemas/fact.commitment.json +57 -0
  37. package/src/plugins/source-contract/vendor/schemas/fact.meeting.attended.json +35 -0
  38. package/src/plugins/source-contract/vendor/schemas/fact.person.attribute.json +37 -0
  39. package/src/plugins/source-contract/vendor/schemas/hint.json +41 -0
  40. package/src/plugins/source-contract/vendor/schemas/routine.json +67 -0
  41. package/src/plugins/source-contract/vendor/schemas/sources.json +56 -0
  42. package/src/plugins/source-contract/vendor/schemas.js +16 -11
  43. package/src/plugins/source-contract/vendor/tools-rpc.js +4 -4
  44. package/src/records.js +3 -1
  45. package/src/vendor/source-contract/README.md +10 -8
  46. package/src/vendor/source-contract/VENDOR.json +48 -39
  47. package/src/vendor/source-contract/chunks/{chunk-JUWIMDGF.js → chunk-6ZSJSJMV.js} +2 -2
  48. package/src/vendor/source-contract/chunks/{chunk-T4QM7B3S.js → chunk-CUITXC5J.js} +1 -1
  49. package/src/{plugins/source-contract/vendor/chunks/chunk-OZMX7VR7.js → vendor/source-contract/chunks/chunk-EOS4LD6F.js} +1 -1
  50. package/src/vendor/source-contract/chunks/{chunk-BOUWB5UP.js → chunk-GDBKZBG7.js} +2 -2
  51. package/src/vendor/source-contract/chunks/{chunk-X6XP7YK2.js → chunk-IGPRJ63D.js} +2 -2
  52. package/src/vendor/source-contract/chunks/{chunk-YH323FAZ.js → chunk-LJL3EALP.js} +238 -12
  53. package/src/vendor/source-contract/chunks/{chunk-NUEROZNU.js → chunk-NUBUQFLH.js} +1 -1
  54. package/src/vendor/source-contract/cursor.js +3 -3
  55. package/src/vendor/source-contract/events.js +22 -4
  56. package/src/vendor/source-contract/registry.js +4 -4
  57. package/src/vendor/source-contract/tools-rpc.js +4 -4
  58. package/src/views/contracts.js +1 -3
  59. package/src/views/rpc.js +4 -5
@@ -1,18 +1,20 @@
1
1
  # Vendored `@we-the-rebel-alliance/source-contract`
2
2
 
3
- **The locked v0.2.0 release.** This is the package's `dist/` at
4
- `88bdc1e3` — `v0.1.0` plus #29–#41 (the keys a page and a declaration may now
5
- carry, the probe's scheme-qualified owner, and the checks a rules source and the
6
- kit now make), `package.json` version `0.2.0`. The `v0.2.0` tag is annotated
7
- (`6c2eaac8`), and `VENDOR.json` names the commit and the SHA-256 of every file
3
+ **The locked v0.3.0 release.** This is the package's `dist/` at
4
+ `2fd55cdc` — `v0.2.0` plus #46 (an actor's `kind`, `identities` and `self`, an
5
+ event's `reply_to`, `audience`, `domains`, `sections`, `parts` and `facts`, the
6
+ descriptor's `facts`, `hints` and `routines`, the `hints` module and the kit's
7
+ new checks), `package.json` version `0.3.0`. The `v0.3.0` tag is annotated
8
+ (`6e5136e2`), and `VENDOR.json` names the commit and the SHA-256 of every file
8
9
  here.
9
10
 
10
11
  - **Runtime:** `tools-rpc.js`, `events.js`, `cursor.js` and `registry.js` are what
11
12
  Memory's sources carry the protocol with, so the copy ships inside the plugin (the
12
13
  plugin may not import npm packages).
13
- - **Tests:** `conformance.js` and `schemas/` are the conformance kit and the
14
- declaration schema. `test/sources-conformance.test.js` runs the kit over every
15
- source Memory declares, and holds each `x-` output's `data` to its inline schema.
14
+ - **Tests:** `conformance.js`, `hints.js` and `schemas/` are the conformance kit,
15
+ the hint and routine file formats, and the declaration schema.
16
+ `test/sources-conformance.test.js` runs the kit over every source Memory
17
+ declares, and holds each `x-` output's `data` to its inline schema.
16
18
  - **Replaced by the tag.** When the package publishes `vX.Y.Z`, delete this
17
19
  directory, pin `github:we-the-rebel-alliance/source-contract#vX.Y.Z`, and bundle
18
20
  what is imported.
@@ -1,67 +1,75 @@
1
1
  {
2
- "commit": "88bdc1e32af83098e06e6fb234ae267d91a4320e",
2
+ "commit": "2fd55cdc0c6c1067927fefc403a88bfd18c9a971",
3
3
  "package": "@we-the-rebel-alliance/source-contract",
4
4
  "repository": "https://github.com/we-the-rebel-alliance/source-contract",
5
- "tag": "v0.2.0",
6
- "tagObject": "6c2eaac8d3cc83886b4916e96f79fe1fd7d6199a",
7
- "release": "https://github.com/we-the-rebel-alliance/source-contract/releases/tag/v0.2.0",
8
- "vendoredAt": "2026-11-17",
9
- "version": "0.2.0",
10
- "why": "v0.2.0's tagged release (tag v0.2.0 on 88bdc1e), copied from the release tarball's dist/ after verifying it against the release's SHA256SUMS. tools-rpc, events, cursor and registry are what the sources' protocol uses at runtime; the kit and the schema are read by Memory's tests.",
5
+ "tag": "v0.3.0",
6
+ "tagObject": "6e5136e274b7071d326d09d4ae5812b135228afb",
7
+ "release": "https://github.com/we-the-rebel-alliance/source-contract/releases/tag/v0.3.0",
8
+ "vendoredAt": "2026-11-18",
9
+ "version": "0.3.0",
10
+ "why": "v0.3.0's tagged release (tag v0.3.0 on 2fd55cdc), copied from the release tarball's dist/ after verifying it against the release's SHA256SUMS. tools-rpc, events, cursor, registry and hints are what the sources' protocol uses at runtime; the kit and the schema are read by Memory's tests.",
11
11
  "files": {
12
12
  "THIRD-PARTY-NOTICES.md": "1a00d3f937d6c65cd6987bbd0f0da1591d6f423bd7751aedfdc8cdd152bfa04e",
13
13
  "broker-client.d.ts": "cf65170b6e960ae4b3501f91913fb4ddbf95d600239ef6bdeac12f872c8b9801",
14
- "broker-client.js": "32b2940e7c9bbe6b9cbdd777f5eb0dfd8ae6177ec3c76360992a39d0161460ff",
15
- "chunks/chunk-77MJETEE.js": "92f2543c72ad90e59357ffd904c6ab92eba6e062b7acb7dbb54c3ed08bb92620",
16
- "chunks/chunk-BOUWB5UP.js": "c1576a886f7d67c8bb5afeb40f9282893e276012861a21f5952fc6a2b17051a4",
17
- "chunks/chunk-EHIOPXPL.js": "cf4c37cdf92c51a182e5c91f540fcd41dc798a8e90c6c4a9911a0dac4ac54a6c",
18
- "chunks/chunk-F4K2Y64D.js": "3f460580a07cf2011b3971d00af8306598cd73b59d43844b7610b38917c93bb5",
19
- "chunks/chunk-HVBOAYBO.js": "8d4d5b011223794170623f008e3d62a1e397af5bf74ee5ced268399d776177da",
20
- "chunks/chunk-IL565TRX.js": "ce20e775c75c7f13ff4c0608510819a57e134b885f33934933fd4a29b79df1e0",
21
- "chunks/chunk-JUWIMDGF.js": "58a2f8598a2120c567ae89f9c2302083164d5271d5de2dcbf9949fb53eecc471",
22
- "chunks/chunk-NUEROZNU.js": "a9b21faf6e418d1f484749908123fab5db2843f4eac68978edd01f28e651330e",
23
- "chunks/chunk-OZMX7VR7.js": "02119d5b15c6dc03306a1f5fcfd0ede841a252a94137a47ad18c438d7fe46782",
24
- "chunks/chunk-T4QM7B3S.js": "847c456d855db47ca014344b0a7d38af2050675d3bd3e22cdfa02254985417d2",
25
- "chunks/chunk-X6XP7YK2.js": "1edd6b1242779f4d604ed9010dfc35a05fd112eab1186b218e06c2d45096ede7",
26
- "chunks/chunk-XVA6H6OO.js": "a73cbef67fd6b6d9b40e77d88038ca74e1398990614732d0b3b714a76fc94071",
27
- "chunks/chunk-YH323FAZ.js": "7fc90ad68ef25be1633cc86a0f59f08cab04f27fed562eac43ac5532772acc5d",
14
+ "broker-client.js": "7338322bbbcf2a9aa4970be52b49d64f8d9b29a4817225de817415fc5df38ce7",
15
+ "chunks/chunk-6ZSJSJMV.js": "f4dce407e43e69044733d1c777f8f675da019b35b61829f5427a7399c378d473",
16
+ "chunks/chunk-A2KM6BYK.js": "3b48f3dce57ce54db9cfd760b92b1e6785297a9624792e66d3a99c404f8fdbc1",
17
+ "chunks/chunk-BEU3WWNO.js": "1a84c77dea7873ca5454d1e141a7abf9fbc2088cdbd2521aab0985be37e15c4b",
18
+ "chunks/chunk-CUITXC5J.js": "7356ce701b8031c195cd80c607e42132327c70f5ce77d8d90136fdbf229391be",
19
+ "chunks/chunk-EOS4LD6F.js": "284e0921f6e59c8f25b5627587388628e0e58cf836ea58a067ba059b06c34cf3",
20
+ "chunks/chunk-EUDLXWG4.js": "94a7d607142cc65a444f5136115cdb52c19a8f8e6a3148d2b0f67d5757a53b3e",
21
+ "chunks/chunk-GDBKZBG7.js": "95bda4fd3eabc20c99415c099d3bf8f217d6875491ca9b95fd7a350480114364",
22
+ "chunks/chunk-HR22TL23.js": "686b9fb992371b09b2410c26e4ae1434cd5537093dff500f8408df0960a48393",
23
+ "chunks/chunk-IGPRJ63D.js": "d3760e44d7b51aeabf6a79ea6b36b8193746c91e2bdcf4af5b847e05213c1cda",
24
+ "chunks/chunk-IIUWLSGP.js": "5a77c6f0147828e322361180282b16ffa5ec532460047f67462dff7b3614653b",
25
+ "chunks/chunk-ITQZIF2U.js": "66c80befaab4e4a60030aff86536c8714c3689007eae952d9fe64e4c0bfc755d",
26
+ "chunks/chunk-KXQYSM2Z.js": "2db8791393a51144ad625a93c32ed7b513d62b32c1e8a5aa04ef5d9367128de5",
27
+ "chunks/chunk-LJL3EALP.js": "6e9f5bcb4ed13a1bce165a37f766d0cc6ff60f8103bcbe357061977cfb2669d8",
28
+ "chunks/chunk-NUBUQFLH.js": "7af09eece1414e0b0f9bb201427d662b96f29b650bb6115998362135dce303b6",
28
29
  "conformance.d.ts": "e7bff576b2085cde07b9fc82244b1b41475175f28c6fd5d26eac383306ecb01e",
29
- "conformance.js": "f64e742976a4c3a9442305eb735532716c86bb049de0a7ef90dcf53518c5c88d",
30
+ "conformance.js": "79c27dccfa5792298d15e0c5772e02af88194f3696af5063aebf43b94e0b64f0",
30
31
  "cursor.d.ts": "b6bd52b4f5267fba84fc6ac4c46f06aeddc8f77d216980929aaed8577f8caa32",
31
- "cursor.js": "fd1cfd69b0d5765ccdcd0b451d51f7a422c5c87f89465f73da24e938339665e1",
32
+ "cursor.js": "e79fac955db3d8441c1e74e8e2c8197c6cce6046974528805771c87d46192acc",
32
33
  "descriptor.d.ts": "da9eeaf84362a3954e53ad695d86ef37c0721f6ef61667054a81b5a5c968345d",
33
- "descriptor.js": "1c182a6594c02af158b2104c967e76eb09acb3342157326ac71204ffa6fe2e77",
34
+ "descriptor.js": "024e4036fbe3a2de25253a222565901429fc05acc62babd7624aabd8763dc471",
34
35
  "events.d.ts": "cee2042a1a8216ceabd1ea22a997f6fb1754516ce4d3fa241ab135904e5d33db",
35
- "events.js": "40829989df80afa24b5c4313b66dc9dfd22dcd6296ae23da3b7d747329d4f65a",
36
+ "events.js": "4371c957d5b8482410a1a4b3112eb6846de3fba672cc9862d129a77780cfd040",
37
+ "hints.d.ts": "a47860e1184688ccca2b73f41ccc30e70046658a9cce33ab5d408815a0039ac9",
38
+ "hints.js": "46cf305d3f0a6a56e6062d0f3af98acd84466ca04ed85ccbbc487962bd843e6b",
36
39
  "index.d.ts": "04416e21fe8ff873f320ddc2e55b4c061760fc5c3a908d9636119135dc4272d2",
37
- "index.js": "7b690aa81cb7967ace45c9fb6fe319540387b06ad7366e69170955abb24f1ecc",
40
+ "index.js": "66079527c7f5526d0b7629cce7882c1b07edcdfe0c3493a69f630c778f60c2d0",
38
41
  "internal/checked.d.ts": "b139039477b76f14aa42683729f059607218a059180e638620c98c70ac4a8d09",
39
42
  "internal/conformance/details.d.ts": "abc4d34f01b11ac668510030a10646d306919f176de72d245454a8fbe1c8061c",
40
- "internal/conformance/kit.d.ts": "69d4c478ee0cd94046d38c4ab0d3e39e7bb762c884f00f0d4967dfc3528732a2",
43
+ "internal/conformance/kit.d.ts": "d7edb96bb675ced2eb27c51fca93ec2002c074af6e3ea2078465ad6b0a8f1bb1",
41
44
  "internal/conformance/page.d.ts": "839e4b9768d60d5d0b89da9f40a1b33a91c5497059a3167f1123493962604773",
42
45
  "internal/conformance/permission.d.ts": "e7b64e4de90c2a44982c73451bd5a04779433b2a9c45afc9c7910a2fa609d34c",
43
46
  "internal/conformance/probe.d.ts": "76fca0d07bb8de25931c0520a4a928b0957e852679d410f044a1fe1e8e305c6a",
44
47
  "internal/conformance/rules.d.ts": "b5566a7b8c68d67ad017114bb49b18d77b1720f6352aa2f5d2517e55a95802ca",
45
48
  "internal/conformance/suggest.d.ts": "fc75a1f0a495afe4d2289aa597fcb3d862b9d9326060f897b085a4772744674a",
46
49
  "internal/events-conformance.d.ts": "4ba72ddf14447b064f5e9e775b57bf182c8d504fd9076a1b8cd55a0a1d329c95",
47
- "internal/events.d.ts": "d6e7539333d6253550e26b87243bbeeefa8bdb4aec23bb173ab782bf279018fe",
50
+ "internal/events.d.ts": "dc2b849b52f589ae1d355d299f04b0776e127e9da45d2164b5b4e57027aa40e1",
48
51
  "internal/failure.d.ts": "8a97c06868c3004afce0c17ad3f34a456be7e263e4f6437c2ec5f463f988275b",
49
- "internal/schema/types.d.ts": "e03754e83dd8f79f0fa23e2bf3d77622f1e3060474c8a0f11416af2e71176e1b",
52
+ "internal/schema/facts.d.ts": "38c5e2cdc18ddd2daf7a1d25acd320a860af6e5d3c6e208af46e3f7a8eb10fe7",
53
+ "internal/schema/types.d.ts": "c485499c89221790ef410ee2794deb0824829b9e32306a800fa7301d7fe24f19",
50
54
  "internal/secrets.d.ts": "8e294e3b5c0c84eedd90bc60af8476e2bbcfc5f9f775963f07a9ec180a5e3b13",
51
55
  "params.d.ts": "454d5aa201c4f80be08502de442e835fa2619a923440f7b25969def6436676d3",
52
- "params.js": "624ff0a0afbb2359491f5e808365232a0c49852acb3f95de64cbf0f126f54aa4",
56
+ "params.js": "3bfa29b240986be60c838c21c5f0ea16183dd965ee772987d56d28f82e03cdbb",
53
57
  "permission.d.ts": "70c5a80e43971e8b81920ae053e0c7de36ecbfb09414cf91080e75ece09bdd96",
54
- "permission.js": "0d1cedeec5d097753dcb50a40de7e0e0fccd102f96a3688785dfa2550cccd778",
58
+ "permission.js": "c4102e605cadc767603a297f158375bbbe7d36c26fa5cedf367f8574be07d03f",
55
59
  "pick.d.ts": "e41f48be4cbde48049ad1a34dbd844b532a0b0d37f6490b4de60e24252591d8a",
56
- "pick.js": "66fb3d6b18732cca8ce5d8470b3b2dc9310cc5a29c98f7d76c5c8bbdccadad27",
60
+ "pick.js": "2932b5e06b55546c53a49947cdaedcca35d4e9f67265e024feb0bd23e1cfcfb3",
57
61
  "read.d.ts": "1cdc2123f9094c8aaaffd10dfbd7c89f58269b774f9e6e3cf4ab875a2f5bab08",
58
- "read.js": "f5f4cb67818fa346f45199356a0ab7ff6e1eb2c859a7cdfc0a65141b41a072f8",
62
+ "read.js": "2db6b59d39209acfe0cc1c6ebf7819d3c1e44fb0f57875769524550d7692978c",
59
63
  "registry.d.ts": "d28922618fa5e6b6601ff5c1cf250545a86fe9cc342712115bd57716d0637760",
60
- "registry.js": "89b6e892ed4f36774e5e455220305d29f9a0bcd8ca3ad38fab0855d1458f4b91",
61
- "schema.d.ts": "e7322f2604e2dac1cca02fc8d2201de5e369cecf817accea3b28c2760a7a44e3",
62
- "schema.js": "4ad50a25cd4cb4561d983b94d169e4a453d76be35b013d73b79f48e9a1e26b4c",
64
+ "registry.js": "6d2b55b4fceacefd17d3fbac4d59fb270802ab55d4f99ed503f4a738f1dbf189",
65
+ "schema.d.ts": "a5e78ab6df089c6141c5e622541f5e5c201bfc512c01fe057b79a1af5c276cb9",
66
+ "schema.js": "702e50402f5c1223ddc2106d414b5af3b3758b4eeefe81276b416e8da7acc06e",
63
67
  "schemas.d.ts": "5893b16f86f605ac68d37496e0a79c825fa412acb804977e28c3e44f2c90ede9",
64
- "schemas.js": "49c63338b4bcd3de82f1702d4a79c16f9ecd57bdee8d72cd7650b4dee7836c62",
68
+ "schemas.js": "a88ec1bbf780363580e50c3ac034a7793888cdb93a7904c0e083eaa650bcc87e",
69
+ "schemas/fact.commitment.json": "6b28eb55681a16ec008f80ec50d1406ef5841b81d06142265e0d34592227294a",
70
+ "schemas/fact.meeting.attended.json": "57ae58c8631b9e430acd4ad93d2f605d6edb1111c50a0dd6ed9f28bae8187f44",
71
+ "schemas/fact.person.attribute.json": "d7c146d58ba5a4331c54211ecc007fa515a04208e1685b6b73a5a17c49c23a43",
72
+ "schemas/hint.json": "b6a74c4c70be553c84be2028186336ed8e20264a350aad60995b3ee612cb0f06",
65
73
  "schemas/output.agenda.json": "afdcaa972b3294394883025d8c531ff51d4117cb8f5d2240b5f55319cf646b10",
66
74
  "schemas/output.countdown.json": "2bb069201056c91056b3590417918970e3b79950df39f45f1537cc59eb3b9933",
67
75
  "schemas/output.image.json": "b162cf16515ffb3eb324c4cc62d9898e6c894ba882d91af60025b60cf33129f9",
@@ -74,8 +82,9 @@
74
82
  "schemas/output.record.json": "30fbb81a6f8df5d0601e428f2503eb726eca603cc350805852dc7c909a9b59a1",
75
83
  "schemas/output.table.json": "3d9695004dbf803576efcca0ff5bcef94af2d9475131db2fc694f974bc217dae",
76
84
  "schemas/output.thread.json": "ffaaaa5107a2a6b7b36230e2e458383591b687af77c1be2e1876194bdeb40f90",
77
- "schemas/sources.json": "b94a3e678154aafd9fa206d46fb1dfa93e6cdbd2f6eb27ef7391f99c95dce9d2",
85
+ "schemas/routine.json": "57e741ae3ff5b5685da7f267457d55459b66339e5aad6307eefc66e3c17921e0",
86
+ "schemas/sources.json": "94960ad9f02464e80cbfb27cf85ad1383f27a33e1b7760319d0a925c0ca68101",
78
87
  "tools-rpc.d.ts": "f54924d710ff8f75fc9607bec13db2b74ae74753ff6d640dbfdd809d9aa13bbd",
79
- "tools-rpc.js": "2a27cbb7910bab01fe52f128141202a7ca26cc45fa2b6ae55dc28377e92e1fd1"
88
+ "tools-rpc.js": "c29b83c40ccb62a519250ac077e8469428402b8eeec0615b11bf6ef2bd9718d3"
80
89
  }
81
90
  }
@@ -1,7 +1,7 @@
1
- // @we-the-rebel-alliance/source-contract 0.2.0. Built by scripts/build.mjs; do not edit.
1
+ // @we-the-rebel-alliance/source-contract 0.3.0. Built by scripts/build.mjs; do not edit.
2
2
  import {
3
3
  __export
4
- } from "./chunk-T4QM7B3S.js";
4
+ } from "./chunk-CUITXC5J.js";
5
5
 
6
6
  // node_modules/zod/v4/classic/schemas.js
7
7
  var schemas_exports2 = {};
@@ -1,4 +1,4 @@
1
- // @we-the-rebel-alliance/source-contract 0.2.0. Built by scripts/build.mjs; do not edit.
1
+ // @we-the-rebel-alliance/source-contract 0.3.0. Built by scripts/build.mjs; do not edit.
2
2
  var __defProp = Object.defineProperty;
3
3
  var __export = (target, all) => {
4
4
  for (var name in all)
@@ -1,4 +1,4 @@
1
- // @we-the-rebel-alliance/source-contract 0.2.0. Built by scripts/build.mjs; do not edit.
1
+ // @we-the-rebel-alliance/source-contract 0.3.0. Built by scripts/build.mjs; do not edit.
2
2
 
3
3
  // src/permission.ts
4
4
  var DENY_ALL = { action: "*", resource: "*", effect: "deny" };
@@ -1,4 +1,4 @@
1
- // @we-the-rebel-alliance/source-contract 0.2.0. Built by scripts/build.mjs; do not edit.
1
+ // @we-the-rebel-alliance/source-contract 0.3.0. Built by scripts/build.mjs; do not edit.
2
2
  import {
3
3
  _enum,
4
4
  _null,
@@ -13,7 +13,7 @@ import {
13
13
  string,
14
14
  union,
15
15
  validator
16
- } from "./chunk-JUWIMDGF.js";
16
+ } from "./chunk-6ZSJSJMV.js";
17
17
 
18
18
  // src/registry.ts
19
19
  var text = (max) => string().max(max);
@@ -1,8 +1,8 @@
1
- // @we-the-rebel-alliance/source-contract 0.2.0. Built by scripts/build.mjs; do not edit.
1
+ // @we-the-rebel-alliance/source-contract 0.3.0. Built by scripts/build.mjs; do not edit.
2
2
  import {
3
3
  ACCOUNT_PATTERN,
4
4
  evaluate
5
- } from "./chunk-OZMX7VR7.js";
5
+ } from "./chunk-EOS4LD6F.js";
6
6
 
7
7
  // src/tools-rpc.ts
8
8
  import { randomUUID } from "node:crypto";
@@ -1,8 +1,8 @@
1
- // @we-the-rebel-alliance/source-contract 0.2.0. Built by scripts/build.mjs; do not edit.
1
+ // @we-the-rebel-alliance/source-contract 0.3.0. Built by scripts/build.mjs; do not edit.
2
2
  import {
3
3
  MAX_CURSOR_LENGTH,
4
4
  canonicalScope
5
- } from "./chunk-NUEROZNU.js";
5
+ } from "./chunk-NUBUQFLH.js";
6
6
 
7
7
  // src/internal/secrets.ts
8
8
  var PRIVATE_KEY_BLOCK = /-----BEGIN (?:[A-Z0-9]+ )*PRIVATE KEY(?: BLOCK)?-----[\s\S]*?(?:-----END (?:[A-Z0-9]+ )*PRIVATE KEY(?: BLOCK)?-----|$)/g;
@@ -152,13 +152,37 @@ var EVENT_LIMITS = {
152
152
  refused: 500,
153
153
  failed: 500,
154
154
  detail: 200,
155
- costUnits: 8
155
+ costUnits: 8,
156
+ /** #45 §1: the identities one actor may carry, and the lengths of each part of one. */
157
+ identities: 10,
158
+ identityBasis: 64,
159
+ /** #45 §2: the metadata one event may carry. */
160
+ replyTo: 512,
161
+ domains: 20,
162
+ domain: 253,
163
+ sections: 20,
164
+ sectionHeading: 300,
165
+ parts: 50,
166
+ partId: 512,
167
+ /** #45 §3: the facts one event may carry, and the lengths of their fields. */
168
+ facts: 20,
169
+ factKey: 200,
170
+ factTitle: 300,
171
+ factAttribute: 120
156
172
  };
157
173
  var PAGE = { default: 100, min: 1, max: 500 };
158
174
  var MAX_PAGE_BYTES = 65536;
159
175
  var MAX_BYTES = { default: 65536, max: 1048576 };
160
176
  var FIRST_RUN_HOURS = 24;
161
177
  var TRUST = "untrusted";
178
+ var ACTOR_KINDS = ["person", "agent", "bot", "service"];
179
+ var ACTOR_ROLES = ["from", "author", "to", "cc", "bcc", "mentioned", "assignee", "creator", "reviewer", "organizer", "attendee", "owner", "speaker", "agent"];
180
+ var AUTHOR_ROLES = ["from", "author"];
181
+ var IDENTITY_STRENGTHS = ["strong", "weak"];
182
+ var AUDIENCES = ["dm", "group", "channel", "email", "public"];
183
+ var FACT_TYPES = ["commitment", "person.attribute", "meeting.attended"];
184
+ var COMMITMENT_STATES = ["open", "done", "cancelled"];
185
+ var ATTENDANCE_RESPONSES = ["accepted", "declined", "tentative", "needs_action"];
162
186
  function ownerShapeProblems(owner, what) {
163
187
  if (!plainObject(owner) || !line(owner["id"], EVENT_LIMITS.ownerId) || !line(owner["label"], EVENT_LIMITS.ownerLabel) || Object.keys(owner).some((key) => key !== "id" && key !== "label" && key !== "verified")) {
164
188
  return [`${what} must be { id, label }, two non-empty lines`];
@@ -299,6 +323,20 @@ function cut(text2, max) {
299
323
  if (end > 0 && code >= 55296 && code <= 56319) end--;
300
324
  return `${text2.slice(0, end)}\u2026`;
301
325
  }
326
+ function stable(value) {
327
+ if (Array.isArray(value)) return value.map(stable);
328
+ if (typeof value === "object" && value !== null) {
329
+ const entries = Object.keys(value).filter((key) => value[key] !== void 0);
330
+ return Object.fromEntries(entries.sort().map((key) => [key, stable(value[key])]));
331
+ }
332
+ return value;
333
+ }
334
+ var HASHED_EVENT_FIELDS = ["reply_to", "audience", "domains", "sections", "parts", "facts"];
335
+ function actorFields(actor) {
336
+ const base = [actor.role, actor.id, actor.name ?? null];
337
+ const extra = stable({ kind: actor.kind, identities: actor.identities, self: actor.self });
338
+ return Object.keys(extra).length === 0 ? base : [...base, extra];
339
+ }
302
340
  function eventHash(event) {
303
341
  const fields = [
304
342
  event.source,
@@ -307,12 +345,16 @@ function eventHash(event) {
307
345
  event.kind,
308
346
  event.occurred_at,
309
347
  event.thread,
310
- event.actors.map((actor) => [actor.role, actor.id, actor.name ?? null]),
348
+ event.actors.map(actorFields),
311
349
  event.title,
312
350
  event.text,
313
351
  event.url,
314
352
  event.labels
315
353
  ];
354
+ for (const key of HASHED_EVENT_FIELDS) {
355
+ const value = event[key];
356
+ if (value !== void 0) fields.push([key, stable(value)]);
357
+ }
316
358
  return `sha256:${createHash("sha256").update(JSON.stringify(fields)).digest("hex")}`;
317
359
  }
318
360
  var clean = (text2) => text2.replaceAll("\0", "");
@@ -329,11 +371,27 @@ function makeEvent(draft) {
329
371
  if (!role || !id || seen.has(key) || actors.length >= EVENT_LIMITS.actors) continue;
330
372
  seen.add(key);
331
373
  const name = actor.name ? cut(oneLine(actor.name), EVENT_LIMITS.actorName) : "";
332
- actors.push(name ? { role, id, name } : { role, id });
374
+ actors.push({
375
+ role,
376
+ id,
377
+ ...name ? { name } : {},
378
+ ...actor.kind === void 0 ? {} : { kind: actor.kind },
379
+ // An empty list says nothing, and is left out so the actor hashes as if it had none.
380
+ ...actor.identities === void 0 || actor.identities.length === 0 ? {} : { identities: [...actor.identities] },
381
+ ...actor.self === void 0 ? {} : { self: actor.self }
382
+ });
333
383
  }
334
384
  const labels = [...new Set((draft.labels ?? []).map((label) => oneLine(label).replace(/\s/g, "-")).filter((label) => label.length > 0 && label.length <= EVENT_LIMITS.label))].slice(0, EVENT_LIMITS.labels);
335
385
  const url = draft.url && /^https:\/\/\S+$/.test(draft.url) && draft.url.length <= EVENT_LIMITS.url ? draft.url : null;
336
386
  const thread = draft.thread ? oneLine(draft.thread) || null : null;
387
+ const replyTo = draft.reply_to ? cut(oneLine(draft.reply_to), EVENT_LIMITS.replyTo) : void 0;
388
+ const domains = draft.domains === void 0 ? void 0 : [...new Set(draft.domains.map((domain) => oneLine(domain).toLowerCase()))].filter((domain) => domain.length > 0);
389
+ const sections = draft.sections?.map((section) => ({ heading: cut(oneLine(section.heading), EVENT_LIMITS.sectionHeading), text: cut(clean(section.text), EVENT_LIMITS.text) })).filter((section) => section.heading.length > 0);
390
+ const parts = draft.parts?.map((part) => {
391
+ const id = cut(oneLine(part.id), EVENT_LIMITS.partId);
392
+ const actor = part.actor === void 0 ? "" : oneLine(part.actor);
393
+ return { id, text: cut(clean(part.text), EVENT_LIMITS.text), ...actor ? { actor } : {} };
394
+ }).filter((part) => part.id.length > 0);
337
395
  const event = {
338
396
  source: draft.source,
339
397
  account: draft.account,
@@ -345,7 +403,13 @@ function makeEvent(draft) {
345
403
  title: cut(oneLine(draft.title ?? ""), EVENT_LIMITS.title),
346
404
  text: cut(clean(draft.text ?? "").trim(), EVENT_LIMITS.text),
347
405
  url,
348
- labels
406
+ labels,
407
+ ...replyTo === void 0 ? {} : { reply_to: replyTo },
408
+ ...draft.audience === void 0 || draft.audience === null ? {} : { audience: draft.audience },
409
+ ...domains === void 0 || domains.length === 0 ? {} : { domains },
410
+ ...sections === void 0 || sections.length === 0 ? {} : { sections },
411
+ ...parts === void 0 || parts.length === 0 ? {} : { parts },
412
+ ...draft.facts === void 0 || draft.facts.length === 0 ? {} : { facts: [...draft.facts] }
349
413
  };
350
414
  return { ...event, hash: eventHash(event) };
351
415
  }
@@ -460,15 +524,168 @@ var SCHEMED = /^[a-z][a-z0-9+.-]*:\S+$/;
460
524
  var HASH = /^sha256:[0-9a-f]{64}$/;
461
525
  var CODE = /^[A-Z][A-Z0-9_]*$/;
462
526
  var UNIT = /^[a-z][a-z0-9_-]*$/;
527
+ var DOMAIN = /^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]*[a-z0-9])?)+$/;
528
+ var DATE = /^\d{4}-\d{2}-\d{2}$/;
529
+ var listOf = (items) => items.length <= 1 ? items.join("") : `${items.slice(0, -1).join(", ")} or ${items.at(-1)}`;
463
530
  var text = (value, max, empty = false) => typeof value === "string" && value.length <= max && (empty || value.length > 0) && !value.includes("\0");
464
531
  var line = (value, max, empty = false) => text(value, max, empty) && !hasControl(value);
465
532
  var isoUtc = (value) => typeof value === "string" && ISO_UTC.test(value) && Number.isFinite(Date.parse(value));
533
+ function actorProblems(actor, at) {
534
+ const problems = [];
535
+ for (const key of Object.keys(actor)) if (!["role", "id", "name", "kind", "identities", "self"].includes(key)) problems.push(`${at} has the field "${key}", which the contract does not define`);
536
+ const role = actor.role;
537
+ const id = actor.id;
538
+ if (!line(role, EVENT_LIMITS.actorRole) || !ROLE.test(role)) problems.push(`${at}.role must be a lowercase word such as from`);
539
+ if (!line(id, EVENT_LIMITS.actorId) || !SCHEMED.test(id)) problems.push(`${at}.id must be a scheme-qualified id such as mailto:someone@example.com`);
540
+ if (actor.name !== void 0 && !line(actor.name, EVENT_LIMITS.actorName)) problems.push(`${at}.name must be one non-empty line of at most ${EVENT_LIMITS.actorName} characters`);
541
+ if (actor.kind !== void 0 && !ACTOR_KINDS.includes(actor.kind)) problems.push(`${at}.kind must be ${listOf(ACTOR_KINDS)}`);
542
+ if (actor.self !== void 0 && typeof actor.self !== "boolean") problems.push(`${at}.self must be true or false`);
543
+ if (actor.identities !== void 0) {
544
+ if (!Array.isArray(actor.identities) || actor.identities.length > EVENT_LIMITS.identities) problems.push(`${at}.identities must be a list of at most ${EVENT_LIMITS.identities}`);
545
+ else {
546
+ const seen = /* @__PURE__ */ new Set();
547
+ for (const [index, identity] of actor.identities.entries()) {
548
+ const here = `${at}.identities[${index}]`;
549
+ if (!plainObject(identity)) {
550
+ problems.push(`${here} is not an object`);
551
+ continue;
552
+ }
553
+ for (const key of Object.keys(identity)) if (!["id", "strength", "basis"].includes(key)) problems.push(`${here} has the field "${key}", which the contract does not define`);
554
+ const own = identity.id;
555
+ if (!line(own, EVENT_LIMITS.actorId) || !SCHEMED.test(own)) problems.push(`${here}.id must be a scheme-qualified id such as mailto:someone@example.com`);
556
+ else if (own === id) problems.push(`${here}.id is the actor's own id: an identity is another id for the same actor`);
557
+ else if (seen.has(own)) problems.push(`${here} repeats an identity`);
558
+ else seen.add(own);
559
+ if (!IDENTITY_STRENGTHS.includes(identity.strength)) problems.push(`${here}.strength must be ${listOf(IDENTITY_STRENGTHS)}`);
560
+ if (!line(identity.basis, EVENT_LIMITS.identityBasis)) {
561
+ problems.push(`${here}.basis must be one line of at most ${EVENT_LIMITS.identityBasis} characters naming the provider field it came from`);
562
+ }
563
+ }
564
+ }
565
+ }
566
+ return problems;
567
+ }
568
+ function targetProblems(e, where) {
569
+ const problems = [];
570
+ if (e.reply_to !== void 0 && !line(e.reply_to, EVENT_LIMITS.replyTo)) {
571
+ problems.push(`${where}.reply_to must be a non-empty id of at most ${EVENT_LIMITS.replyTo} characters`);
572
+ }
573
+ if (e.audience !== void 0 && !AUDIENCES.includes(e.audience)) {
574
+ problems.push(`${where}.audience must be ${listOf(AUDIENCES)}`);
575
+ }
576
+ if (e.domains !== void 0) {
577
+ if (!Array.isArray(e.domains) || e.domains.length > EVENT_LIMITS.domains) problems.push(`${where}.domains must be at most ${EVENT_LIMITS.domains} lowercase domains`);
578
+ else {
579
+ const seen = /* @__PURE__ */ new Set();
580
+ for (const [index, domain] of e.domains.entries()) {
581
+ if (!line(domain, EVENT_LIMITS.domain) || !DOMAIN.test(domain)) problems.push(`${where}.domains[${index}] must be a lowercase domain such as example.com`);
582
+ else if (seen.has(domain)) problems.push(`${where}.domains repeats a domain`);
583
+ else seen.add(domain);
584
+ }
585
+ }
586
+ }
587
+ return problems;
588
+ }
589
+ function partProblems(e, where, actorIds) {
590
+ const problems = [];
591
+ if (e.sections !== void 0) {
592
+ if (!Array.isArray(e.sections) || e.sections.length > EVENT_LIMITS.sections) problems.push(`${where}.sections must be a list of at most ${EVENT_LIMITS.sections}`);
593
+ else {
594
+ for (const [index, section] of e.sections.entries()) {
595
+ const at = `${where}.sections[${index}]`;
596
+ if (!plainObject(section)) {
597
+ problems.push(`${at} is not an object`);
598
+ continue;
599
+ }
600
+ for (const key of Object.keys(section)) if (!["heading", "text"].includes(key)) problems.push(`${at} has the field "${key}", which the contract does not define`);
601
+ if (!line(section.heading, EVENT_LIMITS.sectionHeading)) problems.push(`${at}.heading must be one line of at most ${EVENT_LIMITS.sectionHeading} characters`);
602
+ if (!text(section.text, EVENT_LIMITS.text, true)) problems.push(`${at}.text must be at most ${EVENT_LIMITS.text} characters`);
603
+ }
604
+ }
605
+ }
606
+ if (e.parts !== void 0) {
607
+ if (!Array.isArray(e.parts) || e.parts.length > EVENT_LIMITS.parts) problems.push(`${where}.parts must be a list of at most ${EVENT_LIMITS.parts}`);
608
+ else {
609
+ const seen = /* @__PURE__ */ new Set();
610
+ for (const [index, part] of e.parts.entries()) {
611
+ const at = `${where}.parts[${index}]`;
612
+ if (!plainObject(part)) {
613
+ problems.push(`${at} is not an object`);
614
+ continue;
615
+ }
616
+ for (const key of Object.keys(part)) if (!["id", "text", "actor"].includes(key)) problems.push(`${at} has the field "${key}", which the contract does not define`);
617
+ const id = part.id;
618
+ if (!line(id, EVENT_LIMITS.partId)) problems.push(`${at}.id must be a non-empty id of at most ${EVENT_LIMITS.partId} characters`);
619
+ else if (seen.has(id)) problems.push(`${at}.id repeats a part`);
620
+ else seen.add(id);
621
+ if (!text(part.text, EVENT_LIMITS.text, true)) problems.push(`${at}.text must be at most ${EVENT_LIMITS.text} characters`);
622
+ if (part.actor !== void 0) {
623
+ if (!line(part.actor, EVENT_LIMITS.actorId)) problems.push(`${at}.actor must be an actor id of the same event`);
624
+ else if (!actorIds.has(part.actor)) problems.push(`${at}.actor is not an actor of the same event`);
625
+ }
626
+ }
627
+ }
628
+ }
629
+ return problems;
630
+ }
631
+ function factProblems(fact, actors, where = "fact") {
632
+ if (!plainObject(fact)) return [`${where} is not an object`];
633
+ const type = fact.type;
634
+ if (!FACT_TYPES.includes(type)) return [`${where}.type must be ${listOf(FACT_TYPES)}`];
635
+ const allowed = {
636
+ commitment: ["type", "key", "title", "owner", "counterparty", "due", "state", "url"],
637
+ "person.attribute": ["type", "actor", "org", "team", "role"],
638
+ "meeting.attended": ["type", "actor", "response", "organizer"]
639
+ };
640
+ const problems = [];
641
+ for (const key of Object.keys(fact)) {
642
+ if (!allowed[type].includes(key)) problems.push(`${where} has the field "${key}", which the contract does not define`);
643
+ }
644
+ const reference = (key) => {
645
+ const id = fact[key];
646
+ if (!line(id, EVENT_LIMITS.actorId)) problems.push(`${where}.${key} must be an actor id of the same event`);
647
+ else if (!actors.has(id)) problems.push(`${where}.${key} is not an actor of the same event`);
648
+ };
649
+ if (type === "commitment") {
650
+ if (!line(fact.key, EVENT_LIMITS.factKey)) problems.push(`${where}.key must be a stable id of at most ${EVENT_LIMITS.factKey} characters`);
651
+ if (!line(fact.title, EVENT_LIMITS.factTitle)) problems.push(`${where}.title must be one line of at most ${EVENT_LIMITS.factTitle} characters`);
652
+ reference("owner");
653
+ if (fact.counterparty !== void 0) reference("counterparty");
654
+ if (fact.due !== void 0 && !(typeof fact.due === "string" && DATE.test(fact.due) && Number.isFinite(Date.parse(fact.due)))) problems.push(`${where}.due must be a date such as 2026-11-30`);
655
+ if (!COMMITMENT_STATES.includes(fact.state)) problems.push(`${where}.state must be ${listOf(COMMITMENT_STATES)}`);
656
+ if (fact.url !== void 0 && !(typeof fact.url === "string" && fact.url.length <= EVENT_LIMITS.url && /^https:\/\/\S+$/.test(fact.url))) problems.push(`${where}.url must be an https URL`);
657
+ }
658
+ if (type === "person.attribute") {
659
+ reference("actor");
660
+ if (fact.org === void 0 && fact.team === void 0 && fact.role === void 0) {
661
+ problems.push(`${where} must name org, team or role: a person's attribute comes from structured profile or directory data`);
662
+ }
663
+ for (const key of ["org", "team", "role"]) {
664
+ if (fact[key] !== void 0 && !line(fact[key], EVENT_LIMITS.factAttribute)) {
665
+ problems.push(`${where}.${key} must be one line of at most ${EVENT_LIMITS.factAttribute} characters`);
666
+ }
667
+ }
668
+ }
669
+ if (type === "meeting.attended") {
670
+ reference("actor");
671
+ if (!ATTENDANCE_RESPONSES.includes(fact.response)) problems.push(`${where}.response must be ${listOf(ATTENDANCE_RESPONSES)}`);
672
+ if (typeof fact.organizer !== "boolean") problems.push(`${where}.organizer must be true or false`);
673
+ }
674
+ return problems;
675
+ }
676
+ function factsProblems(e, where, actorIds) {
677
+ if (e.facts === void 0) return [];
678
+ if (!Array.isArray(e.facts) || e.facts.length > EVENT_LIMITS.facts) return [`${where}.facts must be a list of at most ${EVENT_LIMITS.facts}`];
679
+ return e.facts.flatMap((fact, index) => factProblems(fact, actorIds, `${where}.facts[${index}]`));
680
+ }
681
+ var EVENT_KEYS = ["source", "account", "external_id", "kind", "occurred_at", "thread", "actors", "title", "text", "url", "labels", "hash"];
682
+ var EVENT_METADATA_KEYS = ["reply_to", "audience", "domains", "sections", "parts", "facts"];
466
683
  function eventProblems(event, where = "event") {
467
684
  if (!plainObject(event)) return [`${where} is not an object`];
468
685
  const problems = [];
469
- const keys = ["source", "account", "external_id", "kind", "occurred_at", "thread", "actors", "title", "text", "url", "labels", "hash"];
686
+ const keys = [...EVENT_KEYS, ...EVENT_METADATA_KEYS];
470
687
  for (const key of Object.keys(event)) if (!keys.includes(key)) problems.push(`${where} has the field "${key}", which the contract does not define`);
471
- for (const key of keys) if (!Object.hasOwn(event, key)) problems.push(`${where} has no "${key}"`);
688
+ for (const key of EVENT_KEYS) if (!Object.hasOwn(event, key)) problems.push(`${where} has no "${key}"`);
472
689
  const e = event;
473
690
  if (!line(e.source, EVENT_LIMITS.source) || !SOURCE_PATTERN.test(e.source)) problems.push(`${where}.source must be a lowercase name such as gmail`);
474
691
  if (!line(e.account, EVENT_LIMITS.account)) problems.push(`${where}.account must be a non-empty name of at most ${EVENT_LIMITS.account} characters`);
@@ -482,6 +699,7 @@ function eventProblems(event, where = "event") {
482
699
  if (!Array.isArray(e.labels) || e.labels.length > EVENT_LIMITS.labels || e.labels.some((label) => !line(label, EVENT_LIMITS.label) || /\s/.test(label))) {
483
700
  problems.push(`${where}.labels must be at most ${EVENT_LIMITS.labels} labels of at most ${EVENT_LIMITS.label} characters without spaces`);
484
701
  } else if (new Set(e.labels).size !== e.labels.length) problems.push(`${where}.labels repeats a label`);
702
+ const actorIds = /* @__PURE__ */ new Set();
485
703
  if (!Array.isArray(e.actors) || e.actors.length > EVENT_LIMITS.actors) problems.push(`${where}.actors must be a list of at most ${EVENT_LIMITS.actors}`);
486
704
  else {
487
705
  const seen = /* @__PURE__ */ new Set();
@@ -491,15 +709,14 @@ function eventProblems(event, where = "event") {
491
709
  problems.push(`${at} is not an object`);
492
710
  continue;
493
711
  }
494
- for (const key2 of Object.keys(actor)) if (!["role", "id", "name"].includes(key2)) problems.push(`${at} has the field "${key2}", which the contract does not define`);
495
- if (!line(actor.role, EVENT_LIMITS.actorRole) || !ROLE.test(actor.role)) problems.push(`${at}.role must be a lowercase word such as from`);
496
- if (!line(actor.id, EVENT_LIMITS.actorId) || !SCHEMED.test(actor.id)) problems.push(`${at}.id must be a scheme-qualified id such as mailto:someone@example.com`);
497
- if (actor.name !== void 0 && !line(actor.name, EVENT_LIMITS.actorName)) problems.push(`${at}.name must be one non-empty line of at most ${EVENT_LIMITS.actorName} characters`);
712
+ problems.push(...actorProblems(actor, at));
713
+ if (typeof actor.id === "string") actorIds.add(actor.id);
498
714
  const key = `${String(actor.role)}\0${String(actor.id)}`;
499
715
  if (seen.has(key)) problems.push(`${at} repeats an actor`);
500
716
  seen.add(key);
501
717
  }
502
718
  }
719
+ problems.push(...targetProblems(e, where), ...partProblems(e, where, actorIds), ...factsProblems(e, where, actorIds));
503
720
  if (typeof e.hash !== "string" || !HASH.test(e.hash)) problems.push(`${where}.hash must be sha256: and 64 hex digits`);
504
721
  else if (problems.length === 0) {
505
722
  const { hash, ...rest } = e;
@@ -659,6 +876,14 @@ export {
659
876
  MAX_BYTES,
660
877
  FIRST_RUN_HOURS,
661
878
  TRUST,
879
+ ACTOR_KINDS,
880
+ ACTOR_ROLES,
881
+ AUTHOR_ROLES,
882
+ IDENTITY_STRENGTHS,
883
+ AUDIENCES,
884
+ FACT_TYPES,
885
+ COMMITMENT_STATES,
886
+ ATTENDANCE_RESPONSES,
662
887
  REFUSAL_REASONS,
663
888
  REMOVAL_REASONS,
664
889
  GAP_REASONS,
@@ -688,6 +913,7 @@ export {
688
913
  probeResult,
689
914
  probeResultProblems,
690
915
  eventsListResult,
916
+ factProblems,
691
917
  eventProblems,
692
918
  removalProblems,
693
919
  resultProblems
@@ -1,4 +1,4 @@
1
- // @we-the-rebel-alliance/source-contract 0.2.0. Built by scripts/build.mjs; do not edit.
1
+ // @we-the-rebel-alliance/source-contract 0.3.0. Built by scripts/build.mjs; do not edit.
2
2
 
3
3
  // src/cursor.ts
4
4
  import { createHash } from "node:crypto";
@@ -1,4 +1,4 @@
1
- // @we-the-rebel-alliance/source-contract 0.2.0. Built by scripts/build.mjs; do not edit.
1
+ // @we-the-rebel-alliance/source-contract 0.3.0. Built by scripts/build.mjs; do not edit.
2
2
  import {
3
3
  CURSOR_V1,
4
4
  CURSOR_V2,
@@ -10,8 +10,8 @@ import {
10
10
  decodeCursor,
11
11
  encodeBoundCursor,
12
12
  encodeCursor
13
- } from "./chunks/chunk-NUEROZNU.js";
14
- import "./chunks/chunk-T4QM7B3S.js";
13
+ } from "./chunks/chunk-NUBUQFLH.js";
14
+ import "./chunks/chunk-CUITXC5J.js";
15
15
  export {
16
16
  CURSOR_V1,
17
17
  CURSOR_V2,