@joe-broadhead/opencode-mem 0.12.5 → 0.12.6

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 +40 -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,5 +1,11 @@
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
+ ACTOR_KINDS,
4
+ ACTOR_ROLES,
5
+ ATTENDANCE_RESPONSES,
6
+ AUDIENCES,
7
+ AUTHOR_ROLES,
8
+ COMMITMENT_STATES,
3
9
  CONTRACT1_CODES,
4
10
  ERROR_ALIASES,
5
11
  ERROR_CODES,
@@ -9,8 +15,10 @@ import {
9
15
  EXTENSION_KIND,
10
16
  EXTENSION_NAME,
11
17
  EXTENSION_SEGMENT_MAX,
18
+ FACT_TYPES,
12
19
  FIRST_RUN_HOURS,
13
20
  GAP_REASONS,
21
+ IDENTITY_STRENGTHS,
14
22
  MAX_BYTES,
15
23
  MAX_PAGE_BYTES,
16
24
  PAGE,
@@ -30,6 +38,7 @@ import {
30
38
  eventProblems,
31
39
  eventsListResult,
32
40
  extensionNamespace,
41
+ factProblems,
33
42
  fitPage,
34
43
  isEventKind,
35
44
  isEventKindIn,
@@ -49,14 +58,14 @@ import {
49
58
  sinceTime,
50
59
  sourceNamespace,
51
60
  startTime
52
- } from "./chunks/chunk-YH323FAZ.js";
61
+ } from "./chunks/chunk-LJL3EALP.js";
53
62
  import {
54
63
  decodeBoundCursor,
55
64
  decodeCursor,
56
65
  encodeBoundCursor,
57
66
  encodeCursor
58
- } from "./chunks/chunk-NUEROZNU.js";
59
- import "./chunks/chunk-T4QM7B3S.js";
67
+ } from "./chunks/chunk-NUBUQFLH.js";
68
+ import "./chunks/chunk-CUITXC5J.js";
60
69
 
61
70
  // src/internal/events-conformance.ts
62
71
  var describeError = (error) => error instanceof Error ? error.message.split("\n", 1)[0] : String(error);
@@ -205,6 +214,12 @@ async function assertEventsListConformance(list, fixtures) {
205
214
  - ${problems.join("\n- ")}`);
206
215
  }
207
216
  export {
217
+ ACTOR_KINDS,
218
+ ACTOR_ROLES,
219
+ ATTENDANCE_RESPONSES,
220
+ AUDIENCES,
221
+ AUTHOR_ROLES,
222
+ COMMITMENT_STATES,
208
223
  CONTRACT1_CODES,
209
224
  ERROR_ALIASES,
210
225
  ERROR_CODES,
@@ -214,8 +229,10 @@ export {
214
229
  EXTENSION_KIND,
215
230
  EXTENSION_NAME,
216
231
  EXTENSION_SEGMENT_MAX,
232
+ FACT_TYPES,
217
233
  FIRST_RUN_HOURS,
218
234
  GAP_REASONS,
235
+ IDENTITY_STRENGTHS,
219
236
  MAX_BYTES,
220
237
  MAX_PAGE_BYTES,
221
238
  PAGE,
@@ -239,6 +256,7 @@ export {
239
256
  eventsListConformance,
240
257
  eventsListResult,
241
258
  extensionNamespace,
259
+ factProblems,
242
260
  fitPage,
243
261
  isEventKind,
244
262
  isEventKindIn,
@@ -0,0 +1,33 @@
1
+ // @we-the-rebel-alliance/source-contract 0.3.0. Built by scripts/build.mjs; do not edit.
2
+ import {
3
+ FORBIDDEN_HINT_KEYS,
4
+ FORBIDDEN_ROUTINE_KEYS,
5
+ HINT_KEYS,
6
+ HINT_MAX,
7
+ HINT_SCHEMA,
8
+ PRODUCES_TYPES,
9
+ ROUTINE_BODY_MAX,
10
+ ROUTINE_KEYS,
11
+ ROUTINE_SCHEMA,
12
+ hintProblems,
13
+ parseFrontmatter,
14
+ routineProblems
15
+ } from "./chunks/chunk-ITQZIF2U.js";
16
+ import "./chunks/chunk-6ZSJSJMV.js";
17
+ import "./chunks/chunk-LJL3EALP.js";
18
+ import "./chunks/chunk-NUBUQFLH.js";
19
+ import "./chunks/chunk-CUITXC5J.js";
20
+ export {
21
+ FORBIDDEN_HINT_KEYS,
22
+ FORBIDDEN_ROUTINE_KEYS,
23
+ HINT_KEYS,
24
+ HINT_MAX,
25
+ HINT_SCHEMA,
26
+ PRODUCES_TYPES,
27
+ ROUTINE_BODY_MAX,
28
+ ROUTINE_KEYS,
29
+ ROUTINE_SCHEMA,
30
+ hintProblems,
31
+ parseFrontmatter,
32
+ routineProblems
33
+ };
@@ -1,9 +1,9 @@
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
  CONTRACT_VERSION,
4
4
  SUPPORTED_CONTRACT_VERSIONS
5
- } from "./chunks/chunk-IL565TRX.js";
6
- import "./chunks/chunk-T4QM7B3S.js";
5
+ } from "./chunks/chunk-KXQYSM2Z.js";
6
+ import "./chunks/chunk-CUITXC5J.js";
7
7
  export {
8
8
  CONTRACT_VERSION,
9
9
  SUPPORTED_CONTRACT_VERSIONS
@@ -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
  MAX_RELATIVE_DAYS,
4
4
  ME,
@@ -8,8 +8,8 @@ import {
8
8
  resolveRelativeTime,
9
9
  resolveSince,
10
10
  resolveWindow
11
- } from "./chunks/chunk-F4K2Y64D.js";
12
- import "./chunks/chunk-T4QM7B3S.js";
11
+ } from "./chunks/chunk-EUDLXWG4.js";
12
+ import "./chunks/chunk-CUITXC5J.js";
13
13
  export {
14
14
  MAX_RELATIVE_DAYS,
15
15
  ME,
@@ -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
  ACCOUNT_PATTERN,
4
4
  DEFAULT_ACCOUNT,
@@ -14,8 +14,8 @@ import {
14
14
  probeRules,
15
15
  serverOf,
16
16
  sessionRules
17
- } from "./chunks/chunk-OZMX7VR7.js";
18
- import "./chunks/chunk-T4QM7B3S.js";
17
+ } from "./chunks/chunk-EOS4LD6F.js";
18
+ import "./chunks/chunk-CUITXC5J.js";
19
19
  export {
20
20
  ACCOUNT_PATTERN,
21
21
  DEFAULT_ACCOUNT,
@@ -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
  MAX_PICK_PATHS,
4
4
  MAX_PICK_PATH_LENGTH,
@@ -7,10 +7,10 @@ import {
7
7
  pick,
8
8
  pickProblems,
9
9
  pickProblemsForOutput
10
- } from "./chunks/chunk-XVA6H6OO.js";
11
- import "./chunks/chunk-BOUWB5UP.js";
12
- import "./chunks/chunk-JUWIMDGF.js";
13
- import "./chunks/chunk-T4QM7B3S.js";
10
+ } from "./chunks/chunk-IIUWLSGP.js";
11
+ import "./chunks/chunk-GDBKZBG7.js";
12
+ import "./chunks/chunk-6ZSJSJMV.js";
13
+ import "./chunks/chunk-CUITXC5J.js";
14
14
  export {
15
15
  MAX_PICK_PATHS,
16
16
  MAX_PICK_PATH_LENGTH,
@@ -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
  acceptAnswer,
4
4
  checkReadRequest,
@@ -6,19 +6,19 @@ import {
6
6
  probe,
7
7
  read,
8
8
  readDetail
9
- } from "./chunks/chunk-77MJETEE.js";
10
- import "./chunks/chunk-EHIOPXPL.js";
11
- import "./chunks/chunk-HVBOAYBO.js";
12
- import "./chunks/chunk-X6XP7YK2.js";
13
- import "./chunks/chunk-IL565TRX.js";
14
- import "./chunks/chunk-YH323FAZ.js";
15
- import "./chunks/chunk-NUEROZNU.js";
16
- import "./chunks/chunk-F4K2Y64D.js";
17
- import "./chunks/chunk-OZMX7VR7.js";
18
- import "./chunks/chunk-XVA6H6OO.js";
19
- import "./chunks/chunk-BOUWB5UP.js";
20
- import "./chunks/chunk-JUWIMDGF.js";
21
- import "./chunks/chunk-T4QM7B3S.js";
9
+ } from "./chunks/chunk-A2KM6BYK.js";
10
+ import "./chunks/chunk-IIUWLSGP.js";
11
+ import "./chunks/chunk-HR22TL23.js";
12
+ import "./chunks/chunk-GDBKZBG7.js";
13
+ import "./chunks/chunk-BEU3WWNO.js";
14
+ import "./chunks/chunk-IGPRJ63D.js";
15
+ import "./chunks/chunk-KXQYSM2Z.js";
16
+ import "./chunks/chunk-6ZSJSJMV.js";
17
+ import "./chunks/chunk-LJL3EALP.js";
18
+ import "./chunks/chunk-NUBUQFLH.js";
19
+ import "./chunks/chunk-EUDLXWG4.js";
20
+ import "./chunks/chunk-EOS4LD6F.js";
21
+ import "./chunks/chunk-CUITXC5J.js";
22
22
  export {
23
23
  acceptAnswer,
24
24
  checkReadRequest,
@@ -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
  EXTENSION_OUTPUT,
4
4
  IMAGE_DATA_URI_MAX,
@@ -8,9 +8,9 @@ import {
8
8
  isExtensionOutput,
9
9
  isOutputName,
10
10
  outputValidator
11
- } from "./chunks/chunk-BOUWB5UP.js";
12
- import "./chunks/chunk-JUWIMDGF.js";
13
- import "./chunks/chunk-T4QM7B3S.js";
11
+ } from "./chunks/chunk-GDBKZBG7.js";
12
+ import "./chunks/chunk-6ZSJSJMV.js";
13
+ import "./chunks/chunk-CUITXC5J.js";
14
14
  export {
15
15
  EXTENSION_OUTPUT,
16
16
  IMAGE_DATA_URI_MAX,
@@ -1,17 +1,21 @@
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
+ FACT_SCHEMAS,
3
4
  MAX_BYTES_DEFAULT,
4
5
  MAX_BYTES_LIMIT,
5
- SOURCES_SCHEMA
6
- } from "./chunks/chunk-HVBOAYBO.js";
7
- import "./chunks/chunk-X6XP7YK2.js";
8
- import "./chunks/chunk-YH323FAZ.js";
9
- import "./chunks/chunk-NUEROZNU.js";
10
- import "./chunks/chunk-OZMX7VR7.js";
11
- import "./chunks/chunk-JUWIMDGF.js";
12
- import "./chunks/chunk-T4QM7B3S.js";
6
+ SOURCES_SCHEMA,
7
+ factSchema
8
+ } from "./chunks/chunk-BEU3WWNO.js";
9
+ import "./chunks/chunk-IGPRJ63D.js";
10
+ import "./chunks/chunk-6ZSJSJMV.js";
11
+ import "./chunks/chunk-LJL3EALP.js";
12
+ import "./chunks/chunk-NUBUQFLH.js";
13
+ import "./chunks/chunk-EOS4LD6F.js";
14
+ import "./chunks/chunk-CUITXC5J.js";
13
15
  export {
16
+ FACT_SCHEMAS,
14
17
  MAX_BYTES_DEFAULT,
15
18
  MAX_BYTES_LIMIT,
16
- SOURCES_SCHEMA
19
+ SOURCES_SCHEMA,
20
+ factSchema
17
21
  };
@@ -0,0 +1,57 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "type": {
6
+ "type": "string",
7
+ "const": "commitment"
8
+ },
9
+ "key": {
10
+ "type": "string",
11
+ "minLength": 1,
12
+ "maxLength": 200,
13
+ "description": "A stable id of this commitment within the source and account."
14
+ },
15
+ "title": {
16
+ "type": "string",
17
+ "minLength": 1,
18
+ "maxLength": 300
19
+ },
20
+ "owner": {
21
+ "type": "string",
22
+ "minLength": 1,
23
+ "maxLength": 320,
24
+ "description": "An actor id on the same event."
25
+ },
26
+ "counterparty": {
27
+ "type": "string",
28
+ "minLength": 1,
29
+ "maxLength": 320,
30
+ "description": "An actor id on the same event."
31
+ },
32
+ "due": {
33
+ "type": "string",
34
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
35
+ },
36
+ "state": {
37
+ "type": "string",
38
+ "enum": [
39
+ "open",
40
+ "done",
41
+ "cancelled"
42
+ ]
43
+ },
44
+ "url": {
45
+ "type": "string",
46
+ "maxLength": 2048
47
+ }
48
+ },
49
+ "required": [
50
+ "type",
51
+ "key",
52
+ "title",
53
+ "owner",
54
+ "state"
55
+ ],
56
+ "additionalProperties": false
57
+ }
@@ -0,0 +1,35 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "type": {
6
+ "type": "string",
7
+ "const": "meeting.attended"
8
+ },
9
+ "actor": {
10
+ "type": "string",
11
+ "minLength": 1,
12
+ "maxLength": 320,
13
+ "description": "An actor id on the same event."
14
+ },
15
+ "response": {
16
+ "type": "string",
17
+ "enum": [
18
+ "accepted",
19
+ "declined",
20
+ "tentative",
21
+ "needs_action"
22
+ ]
23
+ },
24
+ "organizer": {
25
+ "type": "boolean"
26
+ }
27
+ },
28
+ "required": [
29
+ "type",
30
+ "actor",
31
+ "response",
32
+ "organizer"
33
+ ],
34
+ "additionalProperties": false
35
+ }
@@ -0,0 +1,37 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "type": {
6
+ "type": "string",
7
+ "const": "person.attribute"
8
+ },
9
+ "actor": {
10
+ "type": "string",
11
+ "minLength": 1,
12
+ "maxLength": 320,
13
+ "description": "An actor id on the same event."
14
+ },
15
+ "org": {
16
+ "type": "string",
17
+ "minLength": 1,
18
+ "maxLength": 120
19
+ },
20
+ "team": {
21
+ "type": "string",
22
+ "minLength": 1,
23
+ "maxLength": 120
24
+ },
25
+ "role": {
26
+ "type": "string",
27
+ "minLength": 1,
28
+ "maxLength": 120
29
+ }
30
+ },
31
+ "required": [
32
+ "type",
33
+ "actor"
34
+ ],
35
+ "additionalProperties": false,
36
+ "description": "A person's attribute, from structured profile or directory data only: at least one of org, team or role."
37
+ }
@@ -0,0 +1,41 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "source": {
6
+ "type": "string",
7
+ "maxLength": 64,
8
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z][a-z0-9-]*)+$",
9
+ "description": "One of the plugin's own source ids."
10
+ },
11
+ "kinds": {
12
+ "minItems": 1,
13
+ "type": "array",
14
+ "items": {
15
+ "type": "string",
16
+ "maxLength": 64
17
+ }
18
+ },
19
+ "produces": {
20
+ "minItems": 1,
21
+ "type": "array",
22
+ "items": {
23
+ "type": "string",
24
+ "enum": [
25
+ "commitment",
26
+ "decision",
27
+ "fact",
28
+ "preference",
29
+ "constraint",
30
+ "person",
31
+ "project"
32
+ ]
33
+ }
34
+ }
35
+ },
36
+ "required": [
37
+ "source",
38
+ "kinds"
39
+ ],
40
+ "additionalProperties": false
41
+ }
@@ -0,0 +1,67 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "id": {
6
+ "type": "string",
7
+ "maxLength": 64,
8
+ "pattern": "^[a-z][a-z0-9-]{0,63}$"
9
+ },
10
+ "title": {
11
+ "type": "string",
12
+ "minLength": 1,
13
+ "maxLength": 200
14
+ },
15
+ "reads": {
16
+ "type": "object",
17
+ "properties": {
18
+ "sources": {
19
+ "minItems": 1,
20
+ "type": "array",
21
+ "items": {
22
+ "type": "string",
23
+ "maxLength": 64,
24
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z][a-z0-9-]*)+$"
25
+ },
26
+ "description": "The plugin's own sources only."
27
+ },
28
+ "kinds": {
29
+ "minItems": 1,
30
+ "type": "array",
31
+ "items": {
32
+ "type": "string",
33
+ "maxLength": 64
34
+ }
35
+ }
36
+ },
37
+ "required": [
38
+ "sources",
39
+ "kinds"
40
+ ],
41
+ "additionalProperties": false
42
+ },
43
+ "produces": {
44
+ "minItems": 1,
45
+ "type": "array",
46
+ "items": {
47
+ "type": "string",
48
+ "enum": [
49
+ "commitment",
50
+ "decision",
51
+ "fact",
52
+ "preference",
53
+ "constraint",
54
+ "person",
55
+ "project"
56
+ ]
57
+ }
58
+ }
59
+ },
60
+ "required": [
61
+ "id",
62
+ "title",
63
+ "reads",
64
+ "produces"
65
+ ],
66
+ "additionalProperties": false
67
+ }
@@ -395,6 +395,39 @@
395
395
  "description": "One read of an event's detail: the tool, and the event fields its input comes from."
396
396
  }
397
397
  },
398
+ "facts": {
399
+ "description": "The fact types this source's events carry (#45 §3), each a core type. An event may carry a fact of a declared type and of no other; Memory stamps the installed package's version on each fact it files.",
400
+ "minItems": 1,
401
+ "type": "array",
402
+ "items": {
403
+ "type": "string",
404
+ "enum": [
405
+ "commitment",
406
+ "person.attribute",
407
+ "meeting.attended"
408
+ ]
409
+ }
410
+ },
411
+ "hints": {
412
+ "description": "The hint files the package ships for this source (#45 §4): how to read one kind of item, at most 1,500 characters each.",
413
+ "minItems": 1,
414
+ "type": "array",
415
+ "items": {
416
+ "type": "string",
417
+ "maxLength": 200,
418
+ "pattern": "^[a-z0-9][a-z0-9._-]*(?:\\/[a-z0-9][a-z0-9._-]*)*\\.md$"
419
+ }
420
+ },
421
+ "routines": {
422
+ "description": "The routine files the package ships for this source (#45 §5). Memory's first engine runs only its own core routines, so a plugin ships one only later.",
423
+ "minItems": 1,
424
+ "type": "array",
425
+ "items": {
426
+ "type": "string",
427
+ "maxLength": 200,
428
+ "pattern": "^[a-z0-9][a-z0-9._-]*(?:\\/[a-z0-9][a-z0-9._-]*)*\\.md$"
429
+ }
430
+ },
398
431
  "permission": {
399
432
  "type": "object",
400
433
  "properties": {
@@ -846,6 +879,26 @@
846
879
  "properties": {},
847
880
  "additionalProperties": {}
848
881
  },
882
+ "hints": {
883
+ "description": "The hint files the package ships for this source (#45 §4): how to read one kind of item, at most 1,500 characters each.",
884
+ "minItems": 1,
885
+ "type": "array",
886
+ "items": {
887
+ "type": "string",
888
+ "maxLength": 200,
889
+ "pattern": "^[a-z0-9][a-z0-9._-]*(?:\\/[a-z0-9][a-z0-9._-]*)*\\.md$"
890
+ }
891
+ },
892
+ "routines": {
893
+ "description": "The routine files the package ships for this source (#45 §5). Memory's first engine runs only its own core routines, so a plugin ships one only later.",
894
+ "minItems": 1,
895
+ "type": "array",
896
+ "items": {
897
+ "type": "string",
898
+ "maxLength": 200,
899
+ "pattern": "^[a-z0-9][a-z0-9._-]*(?:\\/[a-z0-9][a-z0-9._-]*)*\\.md$"
900
+ }
901
+ },
849
902
  "permission": {
850
903
  "type": "object",
851
904
  "properties": {
@@ -942,6 +995,9 @@
942
995
  "minimum": 1,
943
996
  "maximum": 9007199254740991
944
997
  },
998
+ "facts": {
999
+ "not": {}
1000
+ },
945
1001
  "reads": {
946
1002
  "not": {}
947
1003
  },
@@ -1,19 +1,24 @@
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
+ OUTPUTS
4
+ } from "./chunks/chunk-GDBKZBG7.js";
5
+ import {
6
+ FACT_SCHEMAS,
3
7
  SOURCES_SCHEMA
4
- } from "./chunks/chunk-HVBOAYBO.js";
5
- import "./chunks/chunk-X6XP7YK2.js";
6
- import "./chunks/chunk-YH323FAZ.js";
7
- import "./chunks/chunk-NUEROZNU.js";
8
- import "./chunks/chunk-OZMX7VR7.js";
8
+ } from "./chunks/chunk-BEU3WWNO.js";
9
+ import "./chunks/chunk-IGPRJ63D.js";
9
10
  import {
10
- OUTPUTS
11
- } from "./chunks/chunk-BOUWB5UP.js";
12
- import "./chunks/chunk-JUWIMDGF.js";
13
- import "./chunks/chunk-T4QM7B3S.js";
11
+ HINT_SCHEMA,
12
+ ROUTINE_SCHEMA
13
+ } from "./chunks/chunk-ITQZIF2U.js";
14
+ import "./chunks/chunk-6ZSJSJMV.js";
15
+ import "./chunks/chunk-LJL3EALP.js";
16
+ import "./chunks/chunk-NUBUQFLH.js";
17
+ import "./chunks/chunk-EOS4LD6F.js";
18
+ import "./chunks/chunk-CUITXC5J.js";
14
19
 
15
20
  // src/schemas.ts
16
- var SCHEMAS = [SOURCES_SCHEMA, ...Object.values(OUTPUTS)];
21
+ var SCHEMAS = [SOURCES_SCHEMA, ...Object.values(OUTPUTS), ...Object.values(FACT_SCHEMAS), HINT_SCHEMA, ROUTINE_SCHEMA];
17
22
  export {
18
23
  SCHEMAS
19
24
  };
@@ -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
  CLASSES,
4
4
  LOCATION_HEADER,
@@ -16,11 +16,11 @@ import {
16
16
  toolsRpcId,
17
17
  toolsRpcIdProblems,
18
18
  upstreamText
19
- } from "./chunks/chunk-X6XP7YK2.js";
19
+ } from "./chunks/chunk-IGPRJ63D.js";
20
20
  import {
21
21
  evaluate
22
- } from "./chunks/chunk-OZMX7VR7.js";
23
- import "./chunks/chunk-T4QM7B3S.js";
22
+ } from "./chunks/chunk-EOS4LD6F.js";
23
+ import "./chunks/chunk-CUITXC5J.js";
24
24
  export {
25
25
  CLASSES,
26
26
  LOCATION_HEADER,
package/src/records.js CHANGED
@@ -111,7 +111,9 @@ export function itemOfRecord(record) {
111
111
  updated: dayOf(record?.updated),
112
112
  // The version a change must name, as the commitment acts take it (#97): a
113
113
  // list answer carries it, so a control needs no second read of the item.
114
- revision: Number.isSafeInteger(Number(record?.version)) && Number(record.version) > 0 ? Number(record.version) : undefined,
114
+ // A record stored before versions existed reads as version 1 here and in
115
+ // the store's `fromRow`, so the list and the act that checks it agree.
116
+ revision: Number.isSafeInteger(Number(record?.version)) && Number(record.version) > 0 ? Number(record.version) : 1,
115
117
  closed: fields.closed_at ? dayOf(fields.closed_at) : undefined,
116
118
  session: record?.source?.session,
117
119
  legacy_id: fields.legacy_id,