@joe-broadhead/opencode-mem 0.9.14 → 0.11.3

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 (143) hide show
  1. package/CHANGELOG.md +1856 -0
  2. package/README.md +15 -7
  3. package/SECURITY.md +3 -1
  4. package/docs/agent-instructions.md +1 -1
  5. package/docs/agent-protocol.md +7 -7
  6. package/docs/permissions.md +16 -0
  7. package/package.json +8921 -1070
  8. package/shared/page-paths.js +44 -0
  9. package/skills/mem.pages/SKILL.md +3 -1
  10. package/skills/mem.usage/SKILL.md +15 -15
  11. package/src/action-grant-keys.js +159 -0
  12. package/src/action-grant.js +439 -0
  13. package/src/actions.js +1690 -0
  14. package/src/backend/records.js +25 -2
  15. package/src/backend/v3.js +76 -22
  16. package/src/call-shapes.js +17 -16
  17. package/src/collector-lock.js +533 -62
  18. package/src/collector-service.js +153 -26
  19. package/src/collector.js +623 -30
  20. package/src/config.js +88 -7
  21. package/src/connect.js +106 -8
  22. package/src/credentials.js +123 -25
  23. package/src/events.js +174 -3
  24. package/src/forget-turn.js +141 -0
  25. package/src/host-refusal.js +78 -0
  26. package/src/index.js +209 -22
  27. package/src/jobs/host.js +557 -0
  28. package/src/ops/codes.js +110 -0
  29. package/src/ops/copy-lineage.js +42 -0
  30. package/src/ops/index.js +28 -0
  31. package/src/ops/space-ops.js +1936 -0
  32. package/src/outlinks.js +103 -0
  33. package/src/p2-reservation.js +151 -0
  34. package/src/permissions.js +30 -0
  35. package/src/plugins/descriptor.js +62 -0
  36. package/src/plugins/discovery.js +318 -0
  37. package/src/plugins/grants.js +178 -0
  38. package/src/plugins/locate.js +319 -0
  39. package/src/plugins/manifest.js +1162 -0
  40. package/src/plugins/source-contract/index.js +34 -0
  41. package/src/plugins/source-contract/policy.js +102 -0
  42. package/src/plugins/source-contract/vendor/PROVENANCE.json +17 -0
  43. package/src/plugins/source-contract/vendor/RELEASE-SHA256SUMS +3 -0
  44. package/src/plugins/source-contract/vendor/RELEASE.json +17 -0
  45. package/src/plugins/source-contract/vendor/SHA256SUMS +41 -0
  46. package/src/plugins/source-contract/vendor/THIRD-PARTY-NOTICES.md +35 -0
  47. package/src/plugins/source-contract/vendor/broker-client.js +93 -0
  48. package/src/plugins/source-contract/vendor/chunks/chunk-3M5PAKSS.js +84 -0
  49. package/src/plugins/source-contract/vendor/chunks/chunk-4ERCA4TK.js +185 -0
  50. package/src/plugins/source-contract/vendor/chunks/chunk-6HDIB2SA.js +183 -0
  51. package/src/plugins/source-contract/vendor/chunks/chunk-ELPJD3ND.js +10 -0
  52. package/src/plugins/source-contract/vendor/chunks/chunk-HLVAKAYG.js +10 -0
  53. package/src/plugins/source-contract/vendor/chunks/chunk-I2RXJJJM.js +81 -0
  54. package/src/plugins/source-contract/vendor/chunks/chunk-KWEWSZ4V.js +505 -0
  55. package/src/plugins/source-contract/vendor/chunks/chunk-KYWBTAF4.js +182 -0
  56. package/src/plugins/source-contract/vendor/chunks/chunk-Q3RQA5J2.js +249 -0
  57. package/src/plugins/source-contract/vendor/chunks/chunk-RRUAIQ4I.js +156 -0
  58. package/src/plugins/source-contract/vendor/chunks/chunk-RYNKNCPP.js +165 -0
  59. package/src/plugins/source-contract/vendor/chunks/chunk-W5SHR7DQ.js +9477 -0
  60. package/src/plugins/source-contract/vendor/chunks/chunk-ZUKF7P6U.js +653 -0
  61. package/src/plugins/source-contract/vendor/cursor.js +26 -0
  62. package/src/plugins/source-contract/vendor/descriptor.js +34 -0
  63. package/src/plugins/source-contract/vendor/events.js +257 -0
  64. package/src/plugins/source-contract/vendor/index.js +10 -0
  65. package/src/plugins/source-contract/vendor/params.js +22 -0
  66. package/src/plugins/source-contract/vendor/permission.js +28 -0
  67. package/src/plugins/source-contract/vendor/pick.js +22 -0
  68. package/src/plugins/source-contract/vendor/read.js +29 -0
  69. package/src/plugins/source-contract/vendor/registry.js +23 -0
  70. package/src/plugins/source-contract/vendor/schema.js +17 -0
  71. package/src/plugins/source-contract/vendor/schemas/output.agenda.json +96 -0
  72. package/src/plugins/source-contract/vendor/schemas/output.countdown.json +28 -0
  73. package/src/plugins/source-contract/vendor/schemas/output.image.json +28 -0
  74. package/src/plugins/source-contract/vendor/schemas/output.inbox.json +84 -0
  75. package/src/plugins/source-contract/vendor/schemas/output.links.json +46 -0
  76. package/src/plugins/source-contract/vendor/schemas/output.list.json +57 -0
  77. package/src/plugins/source-contract/vendor/schemas/output.metric.json +61 -0
  78. package/src/plugins/source-contract/vendor/schemas/output.note.json +14 -0
  79. package/src/plugins/source-contract/vendor/schemas/output.progress.json +50 -0
  80. package/src/plugins/source-contract/vendor/schemas/output.record.json +38 -0
  81. package/src/plugins/source-contract/vendor/schemas/output.table.json +61 -0
  82. package/src/plugins/source-contract/vendor/schemas/output.thread.json +62 -0
  83. package/src/plugins/source-contract/vendor/schemas/sources.json +819 -0
  84. package/src/plugins/source-contract/vendor/schemas.js +19 -0
  85. package/src/plugins/source-contract/vendor/tools-rpc.js +42 -0
  86. package/src/plugins/verify.js +56 -0
  87. package/src/protocol.js +11 -6
  88. package/src/recall.js +92 -5
  89. package/src/records.js +61 -2
  90. package/src/requests.js +216 -0
  91. package/src/runtime.js +89 -7
  92. package/src/setup-time.js +68 -0
  93. package/src/skills.js +230 -8
  94. package/src/source-ids.js +25 -0
  95. package/src/sources/declaration.js +365 -0
  96. package/src/sources/reads.js +772 -0
  97. package/src/sources/rpc.js +151 -0
  98. package/src/sources.js +389 -92
  99. package/src/spaces.js +283 -11
  100. package/src/spool.js +61 -4
  101. package/src/stated.js +10 -5
  102. package/src/storable.js +139 -0
  103. package/src/tools/commitments.js +74 -23
  104. package/src/tools/held-write.js +46 -19
  105. package/src/tools/index.js +28 -0
  106. package/src/tools/ingest.js +38 -2
  107. package/src/tools/memory.js +56 -25
  108. package/src/tools/page.js +212 -95
  109. package/src/tools/recall.js +218 -4
  110. package/src/tools/share.js +42 -3
  111. package/src/tools/shared.js +84 -6
  112. package/src/tools/space-lifecycle.js +278 -0
  113. package/src/tools/spaces.js +381 -30
  114. package/src/tools/status.js +9 -2
  115. package/src/tools/wiki.js +231 -116
  116. package/src/util.js +110 -6
  117. package/src/vendor/source-contract/README.md +24 -0
  118. package/src/vendor/source-contract/THIRD-PARTY-NOTICES.md +35 -0
  119. package/src/vendor/source-contract/VENDOR.json +81 -0
  120. package/src/vendor/source-contract/chunks/chunk-3M5PAKSS.js +84 -0
  121. package/src/vendor/source-contract/chunks/chunk-6HDIB2SA.js +183 -0
  122. package/src/vendor/source-contract/chunks/chunk-HLVAKAYG.js +10 -0
  123. package/src/vendor/source-contract/chunks/chunk-I2RXJJJM.js +81 -0
  124. package/src/vendor/source-contract/chunks/chunk-KWEWSZ4V.js +505 -0
  125. package/src/vendor/source-contract/chunks/chunk-W5SHR7DQ.js +9477 -0
  126. package/src/vendor/source-contract/chunks/chunk-ZUKF7P6U.js +653 -0
  127. package/src/vendor/source-contract/cursor.js +26 -0
  128. package/src/vendor/source-contract/events.js +257 -0
  129. package/src/vendor/source-contract/registry.js +23 -0
  130. package/src/vendor/source-contract/tools-rpc.js +42 -0
  131. package/src/views/access-reads.js +256 -0
  132. package/src/views/communities.js +77 -0
  133. package/src/views/contracts.js +1082 -23
  134. package/src/views/inbox-bytes.js +103 -0
  135. package/src/views/profile.js +31 -0
  136. package/src/views/receipt.js +26 -1
  137. package/src/views/records-reads.js +520 -41
  138. package/src/views/rpc.js +153 -25
  139. package/src/views/shape.js +8 -5
  140. package/src/views/write-state.js +89 -0
  141. package/src/wiki-ingest.js +215 -0
  142. package/src/wiki-state.js +228 -0
  143. package/views/pages.html +2 -2
@@ -0,0 +1,84 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "unread": {
6
+ "anyOf": [
7
+ {
8
+ "type": "integer",
9
+ "minimum": 0,
10
+ "maximum": 9007199254740991
11
+ },
12
+ {
13
+ "type": "null"
14
+ }
15
+ ]
16
+ },
17
+ "unit": {
18
+ "type": "string",
19
+ "maxLength": 20
20
+ },
21
+ "label": {
22
+ "type": "string",
23
+ "maxLength": 60
24
+ },
25
+ "items": {
26
+ "maxItems": 30,
27
+ "type": "array",
28
+ "items": {
29
+ "type": "object",
30
+ "properties": {
31
+ "id": {
32
+ "type": "string",
33
+ "minLength": 1,
34
+ "maxLength": 128
35
+ },
36
+ "url": {
37
+ "type": "string",
38
+ "maxLength": 2048
39
+ },
40
+ "ask": {
41
+ "type": "string",
42
+ "maxLength": 200
43
+ },
44
+ "title": {
45
+ "type": "string",
46
+ "maxLength": 120
47
+ },
48
+ "from": {
49
+ "type": "string",
50
+ "maxLength": 60
51
+ },
52
+ "preview": {
53
+ "type": "string",
54
+ "maxLength": 200
55
+ },
56
+ "at": {
57
+ "type": "string",
58
+ "format": "date-time",
59
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
60
+ },
61
+ "count": {
62
+ "type": "integer",
63
+ "minimum": 0,
64
+ "maximum": 9007199254740991
65
+ },
66
+ "important": {
67
+ "type": "boolean"
68
+ }
69
+ },
70
+ "required": [
71
+ "id",
72
+ "title",
73
+ "at"
74
+ ],
75
+ "additionalProperties": false
76
+ }
77
+ }
78
+ },
79
+ "required": [
80
+ "unread",
81
+ "items"
82
+ ],
83
+ "additionalProperties": false
84
+ }
@@ -0,0 +1,46 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "items": {
6
+ "maxItems": 12,
7
+ "type": "array",
8
+ "items": {
9
+ "type": "object",
10
+ "properties": {
11
+ "id": {
12
+ "type": "string",
13
+ "minLength": 1,
14
+ "maxLength": 128
15
+ },
16
+ "url": {
17
+ "type": "string",
18
+ "maxLength": 2048
19
+ },
20
+ "ask": {
21
+ "type": "string",
22
+ "maxLength": 200
23
+ },
24
+ "title": {
25
+ "type": "string",
26
+ "maxLength": 60
27
+ },
28
+ "hint": {
29
+ "type": "string",
30
+ "maxLength": 60
31
+ }
32
+ },
33
+ "required": [
34
+ "id",
35
+ "url",
36
+ "title"
37
+ ],
38
+ "additionalProperties": false
39
+ }
40
+ }
41
+ },
42
+ "required": [
43
+ "items"
44
+ ],
45
+ "additionalProperties": false
46
+ }
@@ -0,0 +1,57 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "items": {
6
+ "maxItems": 50,
7
+ "type": "array",
8
+ "items": {
9
+ "type": "object",
10
+ "properties": {
11
+ "id": {
12
+ "type": "string",
13
+ "minLength": 1,
14
+ "maxLength": 128
15
+ },
16
+ "text": {
17
+ "type": "string",
18
+ "maxLength": 200
19
+ },
20
+ "done": {
21
+ "type": "boolean"
22
+ },
23
+ "note": {
24
+ "type": "string",
25
+ "maxLength": 200
26
+ },
27
+ "due": {
28
+ "anyOf": [
29
+ {
30
+ "type": "string",
31
+ "format": "date-time",
32
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
33
+ },
34
+ {
35
+ "type": "string",
36
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
37
+ }
38
+ ]
39
+ }
40
+ },
41
+ "required": [
42
+ "id",
43
+ "text"
44
+ ],
45
+ "additionalProperties": false
46
+ }
47
+ },
48
+ "editable": {
49
+ "type": "boolean"
50
+ }
51
+ },
52
+ "required": [
53
+ "items",
54
+ "editable"
55
+ ],
56
+ "additionalProperties": false
57
+ }
@@ -0,0 +1,61 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "label": {
6
+ "type": "string",
7
+ "maxLength": 40
8
+ },
9
+ "value": {
10
+ "anyOf": [
11
+ {
12
+ "type": "number"
13
+ },
14
+ {
15
+ "type": "string",
16
+ "maxLength": 20
17
+ }
18
+ ]
19
+ },
20
+ "unit": {
21
+ "type": "string",
22
+ "maxLength": 10
23
+ },
24
+ "delta": {
25
+ "type": "object",
26
+ "properties": {
27
+ "value": {
28
+ "type": "number"
29
+ },
30
+ "direction": {
31
+ "type": "string",
32
+ "enum": [
33
+ "up",
34
+ "down",
35
+ "flat"
36
+ ]
37
+ },
38
+ "good": {
39
+ "type": "boolean"
40
+ }
41
+ },
42
+ "required": [
43
+ "value",
44
+ "direction"
45
+ ],
46
+ "additionalProperties": false
47
+ },
48
+ "spark": {
49
+ "maxItems": 48,
50
+ "type": "array",
51
+ "items": {
52
+ "type": "number"
53
+ }
54
+ }
55
+ },
56
+ "required": [
57
+ "label",
58
+ "value"
59
+ ],
60
+ "additionalProperties": false
61
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "markdown": {
6
+ "type": "string",
7
+ "maxLength": 16384
8
+ }
9
+ },
10
+ "required": [
11
+ "markdown"
12
+ ],
13
+ "additionalProperties": false
14
+ }
@@ -0,0 +1,50 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "label": {
6
+ "type": "string",
7
+ "maxLength": 60
8
+ },
9
+ "value": {
10
+ "type": "number",
11
+ "minimum": 0
12
+ },
13
+ "max": {
14
+ "type": "number",
15
+ "exclusiveMinimum": 0
16
+ },
17
+ "steps": {
18
+ "maxItems": 12,
19
+ "type": "array",
20
+ "items": {
21
+ "type": "object",
22
+ "properties": {
23
+ "label": {
24
+ "type": "string",
25
+ "maxLength": 40
26
+ },
27
+ "done": {
28
+ "type": "boolean"
29
+ }
30
+ },
31
+ "required": [
32
+ "label",
33
+ "done"
34
+ ],
35
+ "additionalProperties": false
36
+ }
37
+ },
38
+ "eta": {
39
+ "type": "string",
40
+ "format": "date-time",
41
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
42
+ }
43
+ },
44
+ "required": [
45
+ "label",
46
+ "value",
47
+ "max"
48
+ ],
49
+ "additionalProperties": false
50
+ }
@@ -0,0 +1,38 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "title": {
6
+ "type": "string",
7
+ "maxLength": 120
8
+ },
9
+ "fields": {
10
+ "minItems": 1,
11
+ "maxItems": 24,
12
+ "type": "array",
13
+ "items": {
14
+ "type": "object",
15
+ "properties": {
16
+ "label": {
17
+ "type": "string",
18
+ "maxLength": 60
19
+ },
20
+ "value": {
21
+ "type": "string",
22
+ "maxLength": 400
23
+ }
24
+ },
25
+ "required": [
26
+ "label",
27
+ "value"
28
+ ],
29
+ "additionalProperties": false
30
+ }
31
+ }
32
+ },
33
+ "required": [
34
+ "title",
35
+ "fields"
36
+ ],
37
+ "additionalProperties": false
38
+ }
@@ -0,0 +1,61 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "columns": {
6
+ "minItems": 1,
7
+ "maxItems": 8,
8
+ "type": "array",
9
+ "items": {
10
+ "type": "object",
11
+ "properties": {
12
+ "key": {
13
+ "type": "string",
14
+ "pattern": "^[A-Za-z0-9_-]{1,40}$"
15
+ },
16
+ "label": {
17
+ "type": "string",
18
+ "maxLength": 40
19
+ }
20
+ },
21
+ "required": [
22
+ "key",
23
+ "label"
24
+ ],
25
+ "additionalProperties": false
26
+ }
27
+ },
28
+ "rows": {
29
+ "maxItems": 100,
30
+ "type": "array",
31
+ "items": {
32
+ "type": "object",
33
+ "propertyNames": {
34
+ "type": "string"
35
+ },
36
+ "additionalProperties": {
37
+ "anyOf": [
38
+ {
39
+ "type": "string",
40
+ "maxLength": 200
41
+ },
42
+ {
43
+ "type": "number"
44
+ },
45
+ {
46
+ "type": "boolean"
47
+ },
48
+ {
49
+ "type": "null"
50
+ }
51
+ ]
52
+ }
53
+ }
54
+ }
55
+ },
56
+ "required": [
57
+ "columns",
58
+ "rows"
59
+ ],
60
+ "additionalProperties": false
61
+ }
@@ -0,0 +1,62 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "subject": {
6
+ "type": "string",
7
+ "maxLength": 200
8
+ },
9
+ "messages": {
10
+ "minItems": 1,
11
+ "maxItems": 50,
12
+ "type": "array",
13
+ "items": {
14
+ "type": "object",
15
+ "properties": {
16
+ "id": {
17
+ "type": "string",
18
+ "minLength": 1,
19
+ "maxLength": 128
20
+ },
21
+ "url": {
22
+ "type": "string",
23
+ "maxLength": 2048
24
+ },
25
+ "ask": {
26
+ "type": "string",
27
+ "maxLength": 200
28
+ },
29
+ "from": {
30
+ "type": "string",
31
+ "maxLength": 120
32
+ },
33
+ "at": {
34
+ "type": "string",
35
+ "format": "date-time",
36
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
37
+ },
38
+ "body": {
39
+ "type": "string",
40
+ "maxLength": 4000
41
+ },
42
+ "quoted": {
43
+ "type": "string",
44
+ "maxLength": 4000
45
+ }
46
+ },
47
+ "required": [
48
+ "id",
49
+ "from",
50
+ "at",
51
+ "body"
52
+ ],
53
+ "additionalProperties": false
54
+ }
55
+ }
56
+ },
57
+ "required": [
58
+ "subject",
59
+ "messages"
60
+ ],
61
+ "additionalProperties": false
62
+ }